private void OnAddNewMainInvestigationClick(object sender, EventArgs e) { MainInvestigation obj = new MainInvestigation(this.mOPDInvestigationProcedure); MainInvestigationForm.ShowForm(obj); MainInvestigationCollection opdMainInvestigationList = new MainInvestigationCollection(); this.cmbMainInvestigation.DataSource = opdMainInvestigationList; this.cmbMainInvestigation.DisplayMember = "DisplayName"; }
public static bool ShowForm(MainInvestigation obj) { bool r = false; if (!Objectbase.IsNullOrEmpty(obj)) { using (MainInvestigationForm frm = new MainInvestigationForm(obj)) { r = frm.ShowDialog() == DialogResult.OK; } } return(r); }