private void OnSaveAndContinueClicked(object sender, EventArgs e) { if (isTapped || this.dataGrid.IsTaped()) { return; } isTapped = true; string invalidMsg = EbFormHelper.ValidateDataGrid(this.dataGrid); if (invalidMsg == null) { OnInserted?.Invoke(mode == GridMode.New ? null : rowName); Utils.Toast("1 row added."); ResetControls(); EbFormHelper.ExecDGOuterDependency(this.dataGrid.Name); } else { Utils.Toast(invalidMsg); } isTapped = false; }
private void RowDelete_Clicked(object sender, EventArgs e) { if (isTapped) { return; } isTapped = true; Button button = sender as Button; foreach (View el in Body.Children) { if (el.ClassId == button.ClassId) { Body.Children.Remove(el); if (this.dataGrid.FormRenderMode == FormMode.EDIT) { if (dataDictionary.TryGetValue(el.ClassId, out MobileTableRow row)) { if (row.RowId == 0) { dataDictionary.Remove(el.ClassId); } else { row.IsDelete = true; } } } else { dataDictionary.Remove(el.ClassId); } EbFormHelper.ExecDGOuterDependency(this.dataGrid.Name); break; } } isTapped = false; }
private async void OnSaveAndCloseClicked(object sender, EventArgs e) { if (isTapped || this.dataGrid.IsTaped()) { return; } isTapped = true; string invalidMsg = EbFormHelper.ValidateDataGrid(this.dataGrid); if (invalidMsg == null) { OnInserted?.Invoke(mode == GridMode.New ? null : rowName); ResetControls(); EbFormHelper.ExecDGOuterDependency(this.dataGrid.Name); await App.Navigation.PopMasterModalAsync(true); this.dataGrid.IsDgViewOpen = false; } else { Utils.Toast(invalidMsg); } isTapped = false; }