예제 #1
0
        protected async Task ConfirmAddFieldAsync()
        {
            Contract.AddSafely(Form, newFieldModel.ToFormField());
            //Contract.DataModel.Entities.Add(newEntityModel.ToContractEntity());

            await createDialogWindow.CloseAsync();

            await addFieldSuccessSnackbar.ShowAsync();

            ResetNewFieldModel();
        }
        protected async Task ConfirmSaveAsync()
        {
            await saveDialogWindow.CloseAsync();

            try
            {
                Contract.ReplaceSafely(BusinessActivity, diagramToSave);
                await successSnackbar.ShowAsync();

                StateHasChanged();
            }
            catch (Exception e)
            {
                alertController.AddAlert("Confirm unsuccessful: " + e.Message, AlertScheme.Danger);
            }
        }
예제 #3
0
        async Task SaveAsync()
        {
            Loading = true;

            ContractFileSession.SerializedContract = EditorContractXML.To(Contract);
            try
            {
                await ContractFileSessionService.UpdateAsync(ContractFileSession);

                await successSnackbar.ShowAsync();
            }
            catch (Exception)
            {
                contractAlertController.AddAlert("Error while saving contract occured", AlertScheme.Danger);
            }

            Loading = false;
            //await LoadCurrentContractAsync();
        }
        protected async Task ConfirmSaveAsync()
        {
            try
            {
                Contract.ReplaceSafely(diagramToSave);
                await successSnackbar.ShowAsync();

                EditInProgress = false;
                StateHasChanged();
            }
            catch (Exception e)
            {
                alertController.AddAlert("Diagram confirm unsuccessful: " + e.Message, AlertScheme.Danger);
            }

            await saveDialogWindow.CloseAsync();

            await OnChange.InvokeAsync(null);
        }