|
create objects in C# and get the data from sql in the objects in c# windows application.
|
|
|
|
|
OK, and what is your question?
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
The trouble is that there are so many ways to retrieve info from SQL, and since everything in C# is object based or derived, we can't just go "do this" and it'll all sort itself out.
So sit back, think about what you are trying to do and give us better information!
Remember, the better the info you give us, the better or response can be.
So help us to help you!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Have a read of these Codeproject articles. They should show you the basics of connecting to a database and how to retrieve data. Also try out the samples and modify them as this is one of the best ways to start learning something in my opinion.
Using ADO.NET for beginners[^]
An Introduction to Entity Framework for Absolute Beginners[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
I have a set of tiff images. I converted those images to PDF using iTextSharp dll. I want to add bookmarks in that PDF file. Does it possible? I tried with the below code:
string bookMarkName = inputCriteria[0].IndexName;
Chapter chapter1 = new Chapter(new Paragraph(bookMarkName), 1);
chapter1.BookmarkTitle = bookMarkName;
chapter1.BookmarkOpen = true;
document.Add(chapter1);
Even though the PDF file is created with bookmarks, it simply added the bookMarkname in every page as bookMark even though that string is not available in that particular page. Is there any other way which I can achieve this? Please help.
|
|
|
|
|
Hi Guyz,
I am developing windows metro apps using vb.net and XAML.
I need to convert canvas element which contains ink strokes on it.
I am using the below code :
<grid grid.row="1">
<grid.rowdefinitions>
<rowdefinition height="1*">
<rowdefinition height="1*">
<grid.columndefinitions>
<columndefinition width="1*">
<columndefinition width="1*">
<stackpanel x:name="spCollectionSignature" margin="120,0,10,10">
<textblock text="Client signature at collection address" style="{StaticResource FieldTextStyle}" padding="0,5,5,5">
<textblock style="{StaticResource LabelTextStyle}" padding="0,5,5,5" textwrapping="WrapWholeWords" maxheight="120" texttrimming="WordEllipsis" text="{Binding PCollectionSignatureMessage, Source={StaticResource oSettingData}}">
<border x:name="borderCollectionSignature" horizontalalignment="Left" verticalalignment="Top" borderthickness="2" borderbrush="{StaticResource AppBorderBrush}">
<canvas x:name="CollectionSignature" height="120" width="350" background="White" margin="0" horizontalalignment="Left">
Vb.Net code :
Public Shared Async Function GetSignatureImageString(oElement As Canvas) As Task(Of String)
Try
Dim o As New RenderTargetBitmap
Await o.RenderAsync(oElement, Convert.ToInt32(oElement.Width), Convert.ToInt32(oElement.Height))
Dim aryData = Await o.GetPixelsAsync()
Dim logicaldpi = DisplayInformation.GetForCurrentView().LogicalDpi
Dim oStorageFile As StorageFile = Await ApplicationData.Current.TemporaryFolder.CreateFileAsync(oElement.Name + ".png", CreationCollisionOption.ReplaceExisting)
Dim oStream As IRandomAccessStream = Await oStorageFile.OpenAsync(FileAccessMode.ReadWrite)
Dim oEncoder As BitmapEncoder = Await BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, oStream)
oEncoder.SetPixelData(BitmapPixelFormat.Bgra8, BitmapAlphaMode.Ignore, Convert.ToInt16(oElement.Width), Convert.ToInt16(oElement.Height), logicaldpi, logicaldpi, aryData.ToArray())
Await oEncoder.FlushAsync()
Dim oBuffer As IBuffer = Await FileIO.ReadBufferAsync(oStorageFile)
Dim aryData1 As Byte() = oBuffer.ToArray()
oStream.Dispose()
oEncoder = Nothing
oStorageFile = Nothing
aryData = Nothing
o = Nothing
Return Convert.ToBase64String(aryData1)
Catch ex As Exception
End Try
End Function
I am getting 'Value does not false within expected range' on 'o.renderasync' method.
Can you please help?
Thanks,
Vinay
|
|
|
|
|
Rule 1: Learn to read.
See the big bit at the top of the page that says which forum it is: "C#"
That means it's a forum for C# questions, not VB.
This is not a C# question, so post it in the correct place.
Here: http://www.codeproject.com/Forums/1646/Visual-Basic.aspx[^]
Or here: http://www.codeproject.com/Questions/ask.aspx[^]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Hi OrginalGriff,
Thanks...
I have posted the same question on the VB forum.
|
|
|
|
|
I m creating a datagridviewcombobox at runtime ,in the items i have a item :--New--, when the user selects --New-- item , i want the combobox to be removed or changed to textbox control so that i can accept the input form the user.
Please suggest any help or any way to achieve this.
|
|
|
|
|
|
I need to print a specific page of a PDF that contains many pages in windows application using C#.
Thanks in advance.
|
|
|
|
|
Don not post the same thing in two different places: it duplicates work and annoys people.
You have this in QA, leave it there.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Hi,
I've 4 years experience in C# with Winfroms,wpf,silverlight. I placed my goal as become good technical architect in next two years. If you know the route map to reach, please guide me, where to start.
|
|
|
|
|
Learn?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
What you say?, i could not understand.
|
|
|
|
|
Study & practice, practice, practice. There is no simple route map, since it largely depends on your skills, experience and ability to learn.
|
|
|
|
|
Thank you Mr. @Richard . But what i have to study. I accept there is no simple rute map. but the map is there am right?. The peoples who are in that position they know, thay can guid where we can start. What are the things i have to study and what are the skills i have to improve. Guide me.
|
|
|
|
|
You are in the wrong place, this is a technical forum for C# questions.
If you want to become a technical architect you first need to decide which field you are going to specialise in and study the subjects that make up that field. As to the skills, you need to be an above average programmer, with a thorough understanding of the language(s) and framework(s) that you will work on. You need to be a good analyst who can identify the steps needed to turn a business problem into a discrete set of steps for automation. And you need to be a methodical problem solver, for those occasions when everyone comes to you to ask why things don't work.
|
|
|
|
|
|
my two cents.
experience goes above studying. (Which doesn't mean studying is not important.)
If you can try to be involved in more complex systems and preferably in systems where applications start interacting with one another be it through messages, database or an API.
I ussually try to map out the system in my head (or literally in VISIO or something). Even if I only have to design part of it.
My main goals in defining a system are:
- data flows (where is data saved, where does it come from, can anything go wrong?)
- "boxes" not boxing/unboxing, but encapsulating problems, creating frameworks, services, layers.
Anything to keep a problem as simple as possible. If the problem is too complex, divide it in subproblems.
- How can I figure out what went wrong (and fix it with the least impact possible)
- Who can touch it, who uses it and how?
...
for me, being an architect is more of seeing the big picture and working down from there, taking in account the pittfalls if I go down. The technology only comes in when you get down low enough.
To write down my design I use a plain old word document (and visio, excel, ...), but pre-defined as a template with chapters as define objects, define issues/risks, define hardware, define security, ...
You can also use methodologies like UML, ...
but again, experience is key. Probably you'll need to ask your boss to change from "software developer" to "technical analyst" first, which is similar to architect, but on a lower level basis.
Hope this helps.
(PS: for the record, I have 10 years of experience, but I wouldn't even call myself an architect, rather an experienced technical analyst )
|
|
|
|
|
Thanks a lot @V. But when we interacting with particular problem or system, before we must be qualified with technologies and its frequent updation right?
|
|
|
|
|
|
Architect is one of those terms that doesn't have a specific meaning. The route there involves picking up knowledge and skills in technical aspects (i.e. writing code and dealing with source control, CI etc), knowledge of frameworks and different technologies (part of designing a system is deciding what technology to deploy), and skills in breaking down a problem into parts and designing the parts and interactions between them.
Most of that will come from working with people who do it already.
|
|
|
|
|
Hi friends,
I have to use domino mail server in my c# winform app.
but when ı searched I must add reference dll file. but ı cant find this file. I think I must install some files, but ı couldnt found it. Can you help me?
|
|
|
|
|
From that little? Probably not.
But...reading here: http://stackoverflow.com/questions/8644955/send-mail-using-c-sharp-and-lotus-notes-using-client[^] suggests that it isn't a .NET assembly (which would be understandable) so you would need to use interop and DLLImport.
Not tried it as I won't allow BloatusGoats anywhere near my pc...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|