private void Back_Click(object sender, RoutedEventArgs e) { Fine fine = new Fine(); fine.Show(); this.Close(); }
private void Add_Click(object sender, RoutedEventArgs e) { try { FineModel fine = new FineModel() { IdDriver = LogicLicense.GetIdDriver(Driver.Text), Sum = double.Parse(Sum.Text), Description = Description.Text, IdInspector = Logic.SecurityContext.IdUser, FineDate = DateTime.Today }; LogicFine.SaveFine(fine); MessageBox.Show("Новый штраф успешно создан"); Fine fineList = new Fine(); fineList.Show(); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }