private void gridViewMedicals_RowCellClick(object sender, RowCellClickEventArgs e) { var mod = gridViewMedicals.GetRow(e.RowHandle) as DriverMedicalCatalogModel; if (mod == null) { return; } if (e.Clicks == 2 || e.Column.Name == col_Edit.Name) { if (XF_DriverMedicalNewEdit.F_ShowEdit(mod.DriverMedicalID) == System.Windows.Forms.DialogResult.Yes) { RefreshMedicals(); } } else if (e.Column.Name == col_Renew.Name) { var manager = DriverMedicalManager.CreateNewFromOld(mod.DriverMedicalID); if (XF_DriverMedicalNewEdit.F_Show(manager) == System.Windows.Forms.DialogResult.Yes) { RefreshMedicals(); } } }
private void btnNewMedical_Click(object sender, EventArgs e) { var manager = DriverMedicalManager.CreateNew(); if (XF_DriverMedicalNewEdit.F_Show(manager) == System.Windows.Forms.DialogResult.Yes) { RefreshMedicals(); } }
public static DialogResult F_Show(IDriverMedicalManager manager) { using (XF_DriverMedicalNewEdit form = new XF_DriverMedicalNewEdit(manager)) return(form.ShowDialog()); }
public static DialogResult F_Show(IDriverMedicalManager manager) { using (XF_DriverMedicalNewEdit form = new XF_DriverMedicalNewEdit(manager)) return form.ShowDialog(); }