Esempio n. 1
0
 public override void Cancel()
 {
     MainRowList.Clear();
     SelectedMainRows.Clear();
     AddNewMainRow(false);
     base.Cancel();
 }
Esempio n. 2
0
 public void DeleteMainRow()
 {
     if (SelectedMainRows != null)
     {
         var res = MessageBox.Show("Are You To Delete SelectedRecords From Database ?", "Delete",
                                   MessageBoxButton.OKCancel);
         if (res == MessageBoxResult.OK)
         {
             var ListInt = SelectedMainRows.Select(w => w.Iserial).ToList();
             var ObsInt  = new ObservableCollection <int>();
             foreach (var item in ListInt)
             {
                 ObsInt.Add(item);
             }
             if (AllowDelete != true)
             {
                 MessageBox.Show(strings.AllowDeleteMsg);
                 return;
             }
             Glclient.DeleteTblJournalSettingAsync(ObsInt, LoggedUserInfo.DatabasEname);
             foreach (var row in SelectedMainRows.Where(w => w.Iserial == 0).ToList())
             {
                 MainRowList.Remove(row);
             }
             if (!MainRowList.Any())
             {
                 AddNewMainRow(false);
             }
         }
     }
 }
Esempio n. 3
0
 public override void Cancel()
 {
     MainRowList.Clear();
     SelectedMainRows.Clear();
     AddNewMainRow(false);
     RaisePropertyChanged(nameof(IsReadOnly));
     base.Cancel();
 }