Beispiel #1
0
        private void HandleEdit(DriverLicenseModel mod, RowCellClickEventArgs e)
        {
            var manager = DriverLicenseManager.CreateEdit(mod.DriverLicenseID);

            if (XF_DriverLicenseNewEdit.ShowWindow(manager) == DialogResult.Yes)
            {
                RefreshLicenses();
            }
        }
Beispiel #2
0
        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();
            }
        }