public ReferenceDoctorForm(ReferenceDoctor referenceDoctor) : base(referenceDoctor) { this.mEntry = referenceDoctor; this.InitializeComponent(); this.UserInitialize(); }
private void OnAddClick(object sender, EventArgs e) { ReferenceDoctor obj = new ReferenceDoctor(); if (ReferenceDoctorForm.ShowForm(obj)) { this.LoadListData(obj); } }
public static bool ShowForm(ReferenceDoctor obj) { bool r = false; if (!Objectbase.IsNullOrEmpty(obj)) { using (ReferenceDoctorForm frm = new ReferenceDoctorForm(obj)) { r = frm.ShowDialog() == DialogResult.OK; } } return(r); }
private void OnOpenClick(object sender, EventArgs e) { ReferenceDoctor obj = this.GetSelected(); if (obj != null) { obj.RefershData(); } if (ReferenceDoctorForm.ShowForm(obj)) { this.LoadListData(obj); } }
private void LoadListData(ReferenceDoctor selected) { int count = 0; this.LoadEntityList <ReferenceDoctor>(this.dgvData, this.clmName.Index, new ReferenceDoctors(tstSearch.Text), selected, delegate(DataGridViewRow row, ReferenceDoctor obj) { count++; row.Cells[this.clmName.Index].Value = obj.Name; row.Cells[this.clmShare.Index].Value = obj.Share; row.Cells[this.clmDescription.Index].Value = obj.Description; } ); bool hasRows = count > 0; this.tsbOpen.Enabled = hasRows; }