internal void SaveOrUpdate() { Loading = true; if (SelectedMainRow != null) { var save = SelectedMainRow.Iserial == 0; if (AllowUpdate != true && !save) { MessageBox.Show(strings.AllowUpdateMsg); return; } var saveRow = new GenericTable(); saveRow.InjectFrom(SelectedMainRow); Glclient.GenericUpdateOrInsertAsync(TablEname, saveRow, MainRowList.IndexOf(SelectedMainRow), LoggedUserInfo.DatabasEname); } }
public void SaveImported(ObservableCollection <GenericViewModel> list) { foreach (var variable in list) { if (variable == null) { return; } var saveRow = new GenericTable(); saveRow.InjectFrom(variable); var save = variable.Iserial == 0; if (AllowUpdate != true && !save) { MessageBox.Show(strings.AllowUpdateMsg); return; } Loading = true; Glclient.GenericUpdateOrInsertAsync(TablEname, saveRow, 0, LoggedUserInfo.DatabasEname); } }