Click here to Skip to main content
15,357,967 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sql-guestion Pin
Christian Graus4-May-06 12:04
mveChristian Graus4-May-06 12:04 
GeneralRe: Sql-guestion Pin
JelleM5-May-06 0:24
MemberJelleM5-May-06 0:24 
GeneralRe: Sql-guestion Pin
Drew McGhie5-May-06 3:42
MemberDrew McGhie5-May-06 3:42 
GeneralRe: Sql-guestion Pin
JelleM8-May-06 22:52
MemberJelleM8-May-06 22:52 
GeneralRe: Sql-guestion Pin
led mike4-May-06 11:53
Memberled mike4-May-06 11:53 
QuestionHiding Properties at Design Time Pin
SnoopyJ4-May-06 10:16
MemberSnoopyJ4-May-06 10:16 
AnswerRe: Hiding Properties at Design Time Pin
Josh Smith4-May-06 10:52
MemberJosh Smith4-May-06 10:52 
Questionpassing Form as refernce to called from dynamically Pin
abhinish4-May-06 9:39
Memberabhinish4-May-06 9:39 
hi,
i m new to Visual Studio 2005 and i m developing a windows application in c#.

I m facing a problem in which i have to pass reference of the calling form (frmCityMaster.cs) to called form (frmList.cs).

The form frmList.cs has a datagrid control (dgList) which displays all the data of the table citymaster, and the form frmCityMaster has a int variable iMasterId and a method EDITMASTER() to load all the data about a city for editing purpose based upon the variable of the variable iMasterId.

COnsider the following programming case, i want to pass the reference of the calling form (frmCityMaster) to the called form (frmListMaster) so that i m able to set the variable iMasterId value with the city selected in the row of the datagrid (dgList) on frmList.cs... And also i want to call the method EDITMASTER() on frmCity.cs from form frmList.cs...


The above presented problem is just one of the n possiblilities that may occur and this i know can be easily solved by passing the reference of the form frmCityMaster.cs to the calling form frmList.cs but my question is what if the calling forms are dynamic i.e. the calling forms can be any from say frmCityMaster.cs, frmStateMaster.cs or say frmCountryMaster.cs each having a iMasterId as an integer variable to hold the PRIMARY KEY value of the current row from database table and EDITMASTER() method to fill the form controls with the current database master record based the current iMasterId value.

And now that i want to pass the reference of the calling form say frmCityMaster.cs or frmStateMaster.cs to called form (frmList.cs) form so as to be able initialise the calling form's iMasterId variable and EDITMASTER() to initialise the current PRIMARY KEY values.


How can i achieve this using C# Visual Studio 2005. My database server is SQL Server.

abhinav
AnswerRe: passing Form as refernce to called from dynamically Pin
led mike4-May-06 9:51
Memberled mike4-May-06 9:51 
AnswerRe: passing Form as refernce to called from dynamically Pin
Josh Smith4-May-06 9:56
MemberJosh Smith4-May-06 9:56 
QuestionPrint Visio Document with C#.NET ????? Pin
nicolas santana4-May-06 9:17
Membernicolas santana4-May-06 9:17 
QuestionXML string to DataTable Pin
lsugirljte4-May-06 8:36
Memberlsugirljte4-May-06 8:36 
QuestionComboBox... Pin
KORCARI4-May-06 7:42
MemberKORCARI4-May-06 7:42 
Questionsub report problem Pin
shabonaa4-May-06 7:24
Membershabonaa4-May-06 7:24 
QuestionDataset and Datagrid Pin
TheJudeDude4-May-06 6:00
MemberTheJudeDude4-May-06 6:00 
AnswerRe: Dataset and Datagrid Pin
esjq4-May-06 20:12
Memberesjq4-May-06 20:12 
GeneralRe: Dataset and Datagrid Pin
TheJudeDude5-May-06 3:30
MemberTheJudeDude5-May-06 3:30 
GeneralRe: Dataset and Datagrid Pin
TheJudeDude5-May-06 6:55
MemberTheJudeDude5-May-06 6:55 
Questioncheckbox control and rowID Pin
karinb4-May-06 5:44
Memberkarinb4-May-06 5:44 
QuestionFREE C# Material Pin
dotnetguide4-May-06 5:05
Memberdotnetguide4-May-06 5:05 
AnswerRe: FREE C# Material Pin
Paul Conrad4-May-06 5:35
professionalPaul Conrad4-May-06 5:35 
AnswerRe: FREE C# Material Pin
J4amieC4-May-06 5:38
MemberJ4amieC4-May-06 5:38 
GeneralRe: FREE C# Material Pin
Paul Conrad4-May-06 5:41
professionalPaul Conrad4-May-06 5:41 
GeneralRe: FREE C# Material Pin
J4amieC4-May-06 5:53
MemberJ4amieC4-May-06 5:53 
QuestionHigh speed/precision timer possible? Pin
Dan Neely4-May-06 4:16
MemberDan Neely4-May-06 4:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.