private void OnAddClick(object sender, EventArgs e) { OPDTreatment obj = new OPDTreatment(); if (OPDTreatmentForm.ShowForm(obj)) { this.LoadListData(obj); } }
private void OnAddNewTreatmentClick(object sender, EventArgs e) { OPDTreatment obj = new OPDTreatment(this.mOpdTreatmentProcedure); OPDTreatmentForm.ShowForm(obj); OPDTreatmentCollection opdTreatmentList = new OPDTreatmentCollection(); this.cmbTreatment.DataSource = opdTreatmentList; this.cmbTreatment.DisplayMember = "DisplayName"; }
public static bool ShowForm(OPDTreatment obj) { bool r = false; if (!Objectbase.IsNullOrEmpty(obj)) { using (OPDTreatmentForm frm = new OPDTreatmentForm(obj)) { r = frm.ShowDialog() == DialogResult.OK; } } return(r); }
private void OnOpenClick(object sender, EventArgs e) { OPDTreatment obj = this.GetSelected(); if (obj != null) { obj.RefershData(); } if (OPDTreatmentForm.ShowForm(obj)) { this.LoadListData(obj); } }
private void LoadListData(OPDTreatment selected) { int count = 0; this.LoadEntityList <OPDTreatment>(this.dgvData, this.clmChiefComplainName.Index, new OPDTreatmentCollection(tstSearch.Text), selected, delegate(DataGridViewRow row, OPDTreatment obj) { count++; row.Cells[this.clmChiefComplainName.Index].Value = obj.chiefcomplain.Name; row.Cells[this.clmTreatment.Index].Value = obj.Name; row.Cells[this.clmTreatmentDescription.Index].Value = obj.Description; } ); bool hasRows = count > 0; this.tsbOpen.Enabled = hasRows; }
public OPDTreatmentForm(OPDTreatment opdTreatment) : base(opdTreatment) { this.mEntry = opdTreatment; this.InitializeComponent(); this.UserInitialize(); }