コード例 #1
0
 private void Grid_Loaded(object sender, RoutedEventArgs e)
 {
     StatusName.ItemsSource = LogicStatusLicense.GetListNameStatus();
     if (SecurityContext.CurrentDriver != 0)
     {
         var driver = DriverLogic.GetCurrentDriver();
     }
 }
コード例 #2
0
        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);
            }
        }