internal void Delete() { var res = MessageBox.Show("Are You To Delete SelectedRecords From Database ?", "Delete", MessageBoxButton.OKCancel); if (res == MessageBoxResult.OK) { Loading = true; foreach (var item in SelectedMainRows) { if (item.Iserial == 0) { MainRowList.Remove(item); if (!MainRowList.Any()) { AddNewMainRow(false); } } else { if (AllowDelete != true) { MessageBox.Show(strings.AllowDeleteMsg); return; } Loading = true; Glclient.DeleteGenericAsync(TablEname, item.Iserial.ToString(CultureInfo.InvariantCulture), LoggedUserInfo.DatabasEname); } } } }