private void HandleEdit(DriverLicenseModel mod, RowCellClickEventArgs e) { var manager = DriverLicenseManager.CreateEdit(mod.DriverLicenseID); if (XF_DriverLicenseNewEdit.ShowWindow(manager) == DialogResult.Yes) { RefreshLicenses(); } }
private void btnNewLicense_Click(object sender, EventArgs e) { var manager = DriverLicenseManager.CreateNew(this.Manager.Filter.DriverIDUint); if (XF_DriverLicenseNewEdit.ShowWindow(manager) == DialogResult.Yes) { RefreshLicenses(); } }
private void btnNewLicense_Click(object sender, EventArgs e) { var manager = DriverCatalogManager.Create(true); using (XF_DriverFinder find = new XF_DriverFinder(manager)) { if (find.ShowDialog() == System.Windows.Forms.DialogResult.Yes) { var dmanager = DriverLicenseManager.CreateNew(manager.ActiveDriver.DriverID); if (XF_DriverLicenseNewEdit.ShowWindow(dmanager) == DialogResult.Yes) { RefreshLicenses(); } } } }
private void HandleDelete(DriverLicenseModel mod, RowCellClickEventArgs e) { if (Mess.Question("Are you sure you wish to delete this license?", "Caution") != DialogResult.Yes) { return; } var manager = DriverLicenseManager.CreateEdit(mod.DriverLicenseID); var res = manager.Delete(); if (res.Failed) { Mess.Error(res.Message); } else { RefreshLicenses(); } }