Hello.. i'm still new in C#.. and my programming language before C# is FoxPro.. and.. it's very different..
so after trying and learning C# for several weeks... i have a few question about this programming language.. pardon me if i ask a lot..
1. how to set public variabel in C#? if it's in VFP you can put public variable anywhere.. but in C#, where should i put it so that i can extract information for other forms.
e.g: i want to put user's name from loginForm into mainForm.
2. how to view the context of the cell's grid into a textbox. i've search for an example in MSDN.. but i can only found it how to insert it to listbox, or to view it with Console.WriteLine.
3. if i make an mdi form, can i make one database connection in my parent form for all of my child form? and how do i do that?
4. in VFP i can make a cursor that consist of 3 fields, and only two of them that i view in datagrid, but the 3rd field can still be extract for it's informations. e.g: i make a cursor from Customer table, which consist IDCust, NameCust, and PhoneCust. and i only show NameCust and PhoneCust. but i still can retrieve IDCustomer.
yesterday i've tried that method in C# with ColumnMappings (dtmForm2.ColumnMappings.Add("IDCustomer", "")
, but.. i can't retrieve the data... how can u do it in C#?
5. does dataset in C# is the same with data environment in VFP? can i make one dataset for all of my forms? because every forms usually needs different kind of joint cursors..
thanx before... sorry if my english is confusing, and sorry if ask to many question...
anyway i also appreciate if u can only give references..
so after trying and learning C# for several weeks... i have a few question about this programming language.. pardon me if i ask a lot..
1. how to set public variabel in C#? if it's in VFP you can put public variable anywhere.. but in C#, where should i put it so that i can extract information for other forms.
e.g: i want to put user's name from loginForm into mainForm.
2. how to view the context of the cell's grid into a textbox. i've search for an example in MSDN.. but i can only found it how to insert it to listbox, or to view it with Console.WriteLine.
3. if i make an mdi form, can i make one database connection in my parent form for all of my child form? and how do i do that?
4. in VFP i can make a cursor that consist of 3 fields, and only two of them that i view in datagrid, but the 3rd field can still be extract for it's informations. e.g: i make a cursor from Customer table, which consist IDCust, NameCust, and PhoneCust. and i only show NameCust and PhoneCust. but i still can retrieve IDCustomer.
yesterday i've tried that method in C# with ColumnMappings (dtmForm2.ColumnMappings.Add("IDCustomer", "")
5. does dataset in C# is the same with data environment in VFP? can i make one dataset for all of my forms? because every forms usually needs different kind of joint cursors..
thanx before... sorry if my english is confusing, and sorry if ask to many question...