public MainInvestigationForm(MainInvestigation MainInvestigation) : base(MainInvestigation) { this.mEntry = MainInvestigation; this.InitializeComponent(); this.UserInitialize(); }
private void OnAddClick(object sender, EventArgs e) { MainInvestigation obj = new MainInvestigation(); if (MainInvestigationForm.ShowForm(obj)) { this.LoadListData(obj); } }
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); }
private void OnOpenClick(object sender, EventArgs e) { MainInvestigation obj = this.GetSelected(); if (obj != null) { obj.RefershData(); } if (MainInvestigationForm.ShowForm(obj)) { this.LoadListData(obj); } }
private void LoadListData(MainInvestigation selected) { int count = 0; this.LoadEntityList <MainInvestigation>(this.dgvData, this.clmMainInvestigation.Index, new MainInvestigationCollection(tstSearch.Text), selected, delegate(DataGridViewRow row, MainInvestigation obj) { count++; row.Cells[this.clmMainInvestigation.Index].Value = obj.Name; row.Cells[this.clmMainInvestigationDescription.Index].Value = obj.Description; } ); bool hasRows = count > 0; this.tsbOpen.Enabled = hasRows; }