private void Grid_Loaded(object sender, RoutedEventArgs e) { StatusName.ItemsSource = LogicStatusLicense.GetListNameStatus(); if (SecurityContext.CurrentDriver != 0) { var driver = DriverLogic.GetCurrentDriver(); } }
private void Change_Click(object sender, RoutedEventArgs e) { try { StatusChangeModel status = new StatusChangeModel(); status.DateChange = DateTime.Today; status.Descriptoin = Description.Text; status.IdLicense = LogicLicense.GetId(License.Text); status.CurrentStatus = LogicStatusLicense.GetIdByName(StatusName.Text); LogicLicense.ChangeStatusLicense(status); MessageBox.Show("Статус лицензии успешно изменен!"); InspectorMainWindow inspector = new InspectorMainWindow(); inspector.Show(); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }