Esempio n. 1
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)
         {
             foreach (var row in SelectedMainRows)
             {
                 if (row.Iserial != 0)
                 {
                     if (AllowDelete != true)
                     {
                         MessageBox.Show(strings.AllowDeleteMsg);
                         return;
                     }
                     Glclient.DeleteTblGlExpensisAsync((TblGLExpensi) new TblGLExpensi().InjectFrom(row), MainRowList.IndexOf(row), LoggedUserInfo.DatabasEname);
                 }
                 else
                 {
                     MainRowList.Remove(row);
                     if (!MainRowList.Any())
                     {
                         AddNewMainRow(false);
                     }
                 }
             }
         }
     }
 }