private void UpdateDialPlanComplete(SubmitOperation so) { SIPDialPlan dialPlan = (SIPDialPlan)so.UserState; if (so.HasError) { if (m_editControl != null) { m_editControl.WriteStatusMessage(MessageLevelsEnum.Error, "There was an error performing a Dial Plan update." + so.Error.Message); } else { LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error performing a Dial Plan update." + so.Error.Message); } so.MarkErrorAsHandled(); } else { if (m_editControl != null) { m_editControl.WriteStatusMessage(MessageLevelsEnum.Info, "Update completed successfully for " + dialPlan.DialPlanName + "."); } } }
private void SIPProviderAddComplete(SubmitOperation so) { if (so.HasError) { if (m_addControl != null) { m_addControl.WriteStatusMessage(MessageLevelsEnum.Error, so.Error.Message); } else { LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error adding a SIP Provider. " + so.Error.Message); } m_riaContext.SIPProviders.Remove((SIPProvider)so.UserState); so.MarkErrorAsHandled(); } else { if (m_addControl != null) { SIPProvider sipProvider = (SIPProvider)so.UserState; SIPProvidersPanel_Add(); m_addControl.WriteStatusMessage(MessageLevelsEnum.Info, "SIP Provider was successfully created for " + sipProvider.ProviderName + "."); } m_sipProvidersPanel.AssetAdded(); } }
private void SubmitComplete(SubmitOperation submitOperation) { if (submitOperation.HasError) { submitOperation.MarkErrorAsHandled(); } }
public void OnUserProfileSaved(SubmitOperation op) { if (op.HasError) { //Show error message dialog string errorMessage = String.Format("{0}:\n{1}\n", "Неуспешен запис!", op.Error.Message); foreach (var errorEntity in op.EntitiesInError) { foreach (var validationResult in errorEntity.ValidationErrors) { errorMessage += string.Format("{0}\n", validationResult.ErrorMessage); } } var dialogErrorMessage = new ErrorDialogMessage( errorMessage, "Съхраняване на XXXX"); //TO DO: Update Messenger.Default.Send(dialogErrorMessage); op.MarkErrorAsHandled(); return; } this.SendSaveSuccessMessage(); this.SendUpdatedUserProfileMessage(); }
void submitQuestionOperation_Completed(object sender, EventArgs e) { SubmitOperation submitOperation = sender as SubmitOperation; if (submitOperation.HasError) { submitOperation.MarkErrorAsHandled(); NotifyWindow notifyWindow = new NotifyWindow("错误", "保存失败"); notifyWindow.Show(); } else { NotifyWindow notifyWindow = new NotifyWindow("保存成功", "保存成功!"); notifyWindow.Show(); } (OnViewQuestion as DelegateCommand).RaiseCanExecuteChanged(); (OnAnswerQuestion as DelegateCommand).RaiseCanExecuteChanged(); (OnViewTraceQuestion as DelegateCommand).RaiseCanExecuteChanged(); (OnCloseTraceQuestion as DelegateCommand).RaiseCanExecuteChanged(); using (questionTraceView.DeferRefresh()) { questionTraceView.MoveToFirstPage(); } using (questionTraceTraceView.DeferRefresh()) { questionTraceTraceView.MoveToFirstPage(); } IsBusy = false; }
public void UpdateRuleComplete(SubmitOperation so) { var rule = (SimpleWizardRule)so.UserState; if (so.HasError) { if (rule.Direction == SIPCallDirection.Out.ToString()) { m_outgoingRulesUpdateControl.SetErrorMessage(so.Error.Message); } else { m_incomingRulesUpdateControl.SetErrorMessage(so.Error.Message); } so.MarkErrorAsHandled(); } else { var updatedRule = m_riaContext.SimpleWizardRules.SingleOrDefault(x => x.ID == rule.ID); if (updatedRule != null) { if (rule.Direction == SIPCallDirection.Out.ToString()) { m_outgoingRulesUpdateControl.SetStatusMessage(SimpleWizardOutRuleControl.UPDATE_TEXT, false); m_outgoingRulesUpdateControl.SetRuleToUpdate(updatedRule); } else { m_incomingRulesUpdateControl.SetStatusMessage(SimpleWizardInRuleControl.UPDATE_TEXT, false); m_incomingRulesUpdateControl.SetRuleToUpdate(updatedRule); } } } }
private void SIPAccountAddComplete(SubmitOperation so) { if (so.HasError) { if (m_addControl != null) { m_addControl.WriteStatusMessage(MessageLevelsEnum.Error, so.Error.Message); } else { LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error adding a SIP Account. " + so.Error.Message); } m_riaContext.SIPAccounts.Remove((SIPAccount)so.UserState); so.MarkErrorAsHandled(); } else { if (m_addControl != null) { SIPAccount sipAccount = (SIPAccount)so.UserState; SIPAccountsAssetViewer_Add(); m_addControl.WriteStatusMessage(MessageLevelsEnum.Info, "SIP Account was successfully created for " + sipAccount.SIPUsername + "@" + sipAccount.SIPDomain + "."); } m_sipAccountsPanel.AssetAdded(); } }
private void UpdateCustomerComplete(SubmitOperation so) { if (so.HasError) { if (!m_customer.HasValidationErrors) { // Only display the exception message if it's not already being set in the validation summary. // Remove the error information the RIA domain services framework adds in and that will just confuse things. string errorMessage = Regex.Replace(so.Error.Message, @"Submit operation failed.", ""); UIHelper.SetText(m_statusTextBlock, errorMessage); } else { UIHelper.SetText(m_statusTextBlock, "There was a validation error updating your details."); } so.MarkErrorAsHandled(); } else { UIHelper.SetText(m_statusTextBlock, "Details successfully updated."); } SetUpdateButtonsEnabled(true); }
private void submit_Completed(SubmitOperation so) { if (so.HasError) { Debug.WriteLine(so.Error.StackTrace); so.MarkErrorAsHandled(); } }
private void SubmitComplete(SubmitOperation so) { if (so.HasError) { LogActivityMessage_External(MessageLevelsEnum.Error, so.Error.Message); so.MarkErrorAsHandled(); } }
private void DeleteComplete(SubmitOperation so) { if (so.HasError) { UIHelper.SetText(m_statusTextBlock, "Error deleting account. " + so.Error.Message); so.MarkErrorAsHandled(); } else { Logout_External(false); } }
/// <summary> /// This is used to handle the domaincontext submit operation result, and check whether there are any errors. /// If not, user is show success message /// </summary> /// <param name="so"></param> public void OnFormSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message), "Error", MessageBoxButton.OK); so.MarkErrorAsHandled(); } else { MessageBox.Show("Saved Successfully", "Success", MessageBoxButton.OK); } }
private void DeleteDialPlanComplete(SubmitOperation so) { if (so.HasError) { LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error deleting the dial plan. " + so.Error.Message); so.MarkErrorAsHandled(); } else { m_dialPlansPanel.AssetDeleted(); } }
void submitOperation_Completed(object sender, EventArgs e) { SubmitOperation submitOperation = sender as SubmitOperation; ProductManagersViewModel.IsBusy = false; if (submitOperation.HasError) { if (!isUserProject) { submitOperation.MarkErrorAsHandled(); NotifyWindow notifyWindow = new NotifyWindow("错误", "取消自选失败!"); notifyWindow.Show(); } else { submitOperation.MarkErrorAsHandled(); NotifyWindow notifyWindow = new NotifyWindow("错误", "添加自选失败!"); notifyWindow.Show(); } } else { if (!isUserProject) { NotifyWindow notifyWindow = new NotifyWindow("成功", "取消自选成功!"); notifyWindow.Show(); //isUserProject = false; UserProjectEntityDictionary.Remove(manufactureNumber); } else { NotifyWindow notifyWindow = new NotifyWindow("成功", "添加自选成功!"); notifyWindow.Show(); //isUserProject = true; UserProjectEntityDictionary.Add(manufactureNumber, UserProjectEntity); } } }
private ServiceSubmitChangesResult CreateResult(SubmitOperation op) { if (op.HasError) { op.MarkErrorAsHandled(); } return(new ServiceSubmitChangesResult( op.ChangeSet, op.EntitiesInError, op.Error, op.IsCanceled, op.UserState)); }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { MessageBox.Show("Đã xóa log !"); this.DialogResult = false; } }
private void OnSubmitCompleted1(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { EntityQuery<mytv> Query = dstb.GetMytvsQuery(); LoadOperation<mytv> LoadOp = dstb.Load(Query, LoadOpM_Complete, null); } }
private void SubmitChangesCallback(SubmitOperation submitOperation) { if (submitOperation.HasError) { Status = "Data was missing or incorrect. Please try again"; // submitOperation.Error.Message; submitOperation.MarkErrorAsHandled(); return; } UpdateState(false); Status = "Customer was saved"; }
protected void submit(SubmitOperation oper) { if (oper.HasError) { GlobalStatus.Current.Status = "Ошибка при выполнении операции на сервере: " + oper.Error.Message; MessageBox.Show(oper.Error.Message, "Ошибка при выполнении операции на сервере", MessageBoxButton.OK); refresh(); Logger.info(oper.Error.ToString()); oper.MarkErrorAsHandled(); } else { GlobalStatus.Current.Status = "Готово"; } userForm.CurrentItem = null; gridUsers.SelectedItem = null; }
private void DeleteSIPAccountComplete(SubmitOperation so) { if (so.HasError) { LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error deleting the SIP account. " + so.Error.Message); so.MarkErrorAsHandled(); } else { SIPAccount sipAccount = (SIPAccount)so.UserState; //LogActivityMessage_External(MessageLevelsEnum.Info, "Delete completed successfully for " + sipAccount.SIPUsername + "@" + sipAccount.SIPDomain + "."); m_sipAccountsPanel.AssetDeleted(); } }
private void DeleteSIPProviderComplete(SubmitOperation so) { if (so.HasError) { LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error deleting the SIP provider. " + so.Error.Message); so.MarkErrorAsHandled(); } else { SIPProvider sipProvider = (SIPProvider)so.UserState; //LogActivityMessage_External(MessageLevelsEnum.Info, "Delete completed successfully for " + sipProvider.ProviderName + "."); m_sipProvidersPanel.AssetDeleted(); } }
void SubmitChangesCallback(SubmitOperation submitOperation) { if (submitOperation.HasError) { if (submitOperation.CanCancel) { submitOperation.Cancel(); } context.RejectChanges(); HandleException(submitOperation.Error); submitOperation.MarkErrorAsHandled(); } uiDispatcher.BeginInvoke(() => riaInstantSource.Refresh()); }
private void OnSubmitCompleted(SubmitOperation so) { UploadBusyIndicator.IsBusy = false; if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { MessageBox.Show("Submitted Successfully!"); GetAcct_Ac_tblJournalAttachmentsByAcct_Ac_tblJournalQueryDataSource.Load(); } }
public void OnCarSaved(SubmitOperation op) { if (op.HasError) { string errorMessage = GenerateSubmitOperationErrorMessage(op); this.SaveUnsuccessfull(errorMessage); op.MarkErrorAsHandled(); return; } string successMessage = "Записът е успешен!"; this.SaveSuccessfull(successMessage); }
/// <summary> /// Used by Silverlight client applications to verify that an update operation /// completed successfully. /// </summary> /// <param name="operation">The query operation context.</param> public static void Check(SubmitOperation operation) { if (operation.IsCanceled) { throw new CancelException(); } if (!operation.HasError) { return; } operation.MarkErrorAsHandled(); Check(operation.Error, GetFaultDetails(operation.EntitiesInError)); }
protected void submit(SubmitOperation oper) { if (oper.HasError) { GlobalStatus.Current.Status = "Ошибка при выполнении операции на сервере: " + oper.Error.Message; MessageBox.Show(oper.Error.Message, "Ошибка при выполнении операции на сервере", MessageBoxButton.OK); RefreshOrders(true); Logger.info(oper.Error.ToString()); oper.MarkErrorAsHandled(); } else { GlobalStatus.Current.Status = "Готово"; } }
/// <summary> /// Handles <see cref="SubmitOperation.Completed"/> for a userRegistrationContext /// operation. If there was an error, an <see cref="ErrorWindow"/> is /// displayed to the user. Otherwise, this triggers a <see cref="LoginOperation"/> /// that will automatically log in the just registered user /// </summary> private void RegistrationOperation_Completed(SubmitOperation asyncResult) { if (asyncResult.HasError) { ErrorWindow.CreateNew(asyncResult.Error); asyncResult.MarkErrorAsHandled(); this.registerForm.BeginEdit(); } else { LoginOperation loginOperation = WebContext.Current.Authentication.Login(this.registrationData.ToLoginParameters(), this.LoginOperation_Completed, null); this.BindUIToOperation(loginOperation); this.parentWindow.AddPendingOperation(loginOperation); } }
private void SubOperation_Completed(object sender, EventArgs e) { SubmitOperation submitOperation = sender as SubmitOperation; if (submitOperation.HasError) { submitOperation.MarkErrorAsHandled(); NotifyWindow notifyWindow = new NotifyWindow("错误", "上传失败 " + submitOperation.Error); notifyWindow.Show(); } else { NotifyWindow notifyWindow = new NotifyWindow("上传成功", "上传成功!"); notifyWindow.Show(); } }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { MessageBox.Show("Đã thêm tuyến :" + txttuyen.Text.Trim().ToUpper()); this.txtten.Text = ""; this.txttuyen.Text = ""; this.txtghichu.Text = ""; this.txttuyen.Focus(); } }
private void OnSubmitChangesCompleted(SubmitOperation op) { if (op.HasError) { MessageBox.Show("Operation failed."); op.MarkErrorAsHandled(); } else if (op.IsComplete) { MessageBox.Show("Operation completed."); } else if (op.IsCanceled) { MessageBox.Show("Operation cancelled."); } }
private void UpdateSIPAccountComplete(SubmitOperation so) { if (so.HasError) { LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error updating the SIP account. " + so.Error.Message); so.MarkErrorAsHandled(); } else { if (m_editControl != null) { SIPAccount sipAccount = (SIPAccount)so.UserState; m_editControl.WriteStatusMessage(MessageLevelsEnum.Info, "Update completed successfully for " + sipAccount.SIPUsername + "@" + sipAccount.SIPDomain + "."); } } }
private void UpdateSIPProviderComplete(SubmitOperation so) { if (so.HasError) { LogActivityMessage_External(MessageLevelsEnum.Error, "There was an error updating the SIP provider. " + so.Error.Message); so.MarkErrorAsHandled(); m_riaContext.RejectChanges(); } else { if (m_editControl != null) { SIPProvider sipProvider = (SIPProvider)so.UserState; m_editControl.WriteStatusMessage(MessageLevelsEnum.Info, "Update completed successfully for SIP provider " + sipProvider.ProviderName + "."); } } }
void submitOperation_Completed(object sender, EventArgs e) { SubmitOperation submitOperation = sender as SubmitOperation; if (submitOperation.HasError) { submitOperation.MarkErrorAsHandled(); NotifyWindow notifyWindow = new NotifyWindow("错误", "保存失败"); notifyWindow.Show(); } else { NotifyWindow notifyWindow = new NotifyWindow("保存成功", "保存成功!"); notifyWindow.Show(); } BusyIndicator.IsBusy = false; }
void submitOperation_Completed(object sender, EventArgs e) { SubmitOperation submitOperation = sender as SubmitOperation; if (submitOperation.HasError) { submitOperation.MarkErrorAsHandled(); NotifyWindow notifyWindow = new NotifyWindow("错误", "删除失败"); notifyWindow.Show(); } else { NotifyWindow notifyWindow = new NotifyWindow("删除成功", "删除成功!"); notifyWindow.Show(); LoadData(); } }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { if (m_update) this.DialogResult = false; else { MessageBox.Show("Đã thêm xã :" + txtten.Text.Trim()); this.txtten.Text = ""; this.txtmaap.Text = ""; this.txtmaap.Focus(); } } }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { if (m_update) this.DialogResult = false; else { MessageBox.Show("Đã thêm chương trình :" + txtten.Text.Trim()); this.txtten.Text = ""; this.txtmakm.Text = ""; this.dbatdau.EditValue = null; this.dketthuc.EditValue = null; this.txtmakm.Focus(); } } }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { enable_control(false); this.OKButton.IsEnabled = false; this.btnNew.IsEnabled = true; if (v_update==false) Send_SMS(); MessageBox.Show("Đã lưu vào cơ sở dữ liệu"); if (nhiemthu.IsChecked == true) innhiemthu(); else inhopdong(); } }
private void CompleteOperation(SubmitOperation submitOp, Apartment cur) { //--------------------------- //如果当前正在加载,则查询结果可能不正确,需要cancel一次 MakeSureLoadCorret(); //--------------------------- if (submitOp.HasError) { cur.ValidationErrors.Add(new ValidationResult(submitOp.Error.Message, null)); submitOp.MarkErrorAsHandled(); MessageBox.Show(ApartmentServiceError.ServerOperationException + "\n\n" + submitOp.Error.Message); } else { string info = GetOperationResult(cur); MessageBox.Show(ApartmentServiceError.ServerOperationSuccessed + "\n\n" + info); if (_apartemntLocked.Contains(cur)) { _apartemntLocked.Remove(cur); } } //--------------------------- //取出busing列表 if (_apartmentBusingList.Contains(cur)) { _apartmentBusingList.Remove(cur); } cur.CurState = ApartmentRuntimeState.Deleted; _domainContext.Apartments.Detach(cur); }
public override void OnFormSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message), "Error", MessageBoxButton.OK); so.MarkErrorAsHandled(); } else { MessageBox.Show("Saved Successfully", "Success", MessageBoxButton.OK); var addressStickersWindow = new PrintAddressStickers { ReportNo = this.RGReport.ReportNo }; addressStickersWindow.Show(); } }
private void ChangesSubmitted(SubmitOperation op) { IsBusy = false; if (!op.HasError) { EntitySpeakerPresentations.Clear(); SpeakerPresentations.Clear(); SelectedPresentation = null; GetEventPresentationsForSpeaker(App.Event.Id, App.LoggedInPerson.Id); } else { var message = op.Error.Message + Environment.NewLine; foreach (var entityInError in op.EntitiesInError) { foreach (var validationError in entityInError.ValidationErrors) { message += validationError.ErrorMessage + Environment.NewLine; } } EventAggregator.Publish(new ErrorWindowEvent { Message = message, ViewModelName="SpeakerViewModel" }); var ex = new Exception(message); _loggingService.LogException(ex); op.MarkErrorAsHandled(); } }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { gridControl1.ShowLoadingPanel = false; MessageBox.Show("Đã lưu thay đổi !"); //this.Hide(); //frmdscodinh frmtuyen = new frmdscodinh(); //frmtuyen.Width = this.ActualWidth; //frmtuyen.Height = this.ActualHeight; //frmtuyen.Show(); } }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { gridControl1.ShowLoadingPanel = false; MessageBox.Show("Đã thay tiền thuê bao xong"); } }
private void OnSubmitCompleted2(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { MessageBox.Show("Da cap nhat xong !"); } }
private void OnSaveCallBack(SubmitOperation op) { string msg = string.Empty; if (op.HasError) { msg = "Неуспешно съхраняване на полицата!:" + op.Error.Message; op.MarkErrorAsHandled(); } else { msg = "Полицата е изпратена узпешно!"; } Messenger.Default.Send<SaveInsuarancePolicyMessageDialog>(new SaveInsuarancePolicyMessageDialog(msg, "Изпращане на полица")); }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { MessageBox.Show("Đã lưu vào cơ sở dữ liệu"); this.OKButton.IsEnabled = false; this.btnNew.IsEnabled = true; this.txtusr.Focus(); } }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { QLThuebaoDomainContext dstb = new QLThuebaoDomainContext(); InvokeOperation<System.Nullable<int>> p = dstb.Excute_p_doiaccmytv(txtusr.Text.Trim(), txtusrn.Text.Trim()); p.Completed += new EventHandler(Completed); } }
private void CreateCustomerComplete(SubmitOperation so) { Customer customer = (Customer)so.UserState; if (so.HasError) { m_riaContext.Customers.Remove(customer); // Remove the error information the RIA domain services framework adds in and that will just confuse things. string errorMessage = Regex.Replace(so.Error.Message, @"Submit operation failed.", ""); UIHelper.SetText(m_statusTextBlock, errorMessage); so.MarkErrorAsHandled(); } else { CustomerCreated("A comfirmation email has been sent to " + customer.EmailAddress + ". " + "Please click on the link contained in the email to activate your account. Accounts not activated within 24 hours are removed."); Reset(); } }
private static void OnSubmitChangesCompleted(SubmitOperation submitOperation) { var action = submitOperation.UserState as Action; if (action != null) { action(); } if (submitOperation.HasError) { if (submitOperation.Error is DomainOperationException) { DomainOperationException exception = (DomainOperationException)submitOperation.Error; if (exception.Status == OperationErrorStatus.Conflicts) { foreach (var item in submitOperation.EntitiesInError) { if (item.EntityConflict.IsDeleted) { foreach (var entitySet in ScheduleViewRepository.Context.EntityContainer.EntitySets) { if (entitySet.EntityType == item.GetType()) { entitySet.Detach(item); entitySet.Attach(item); entitySet.Remove(item); ScheduleViewRepository.Context.SubmitChanges(); } } } else { item.EntityConflict.Resolve(); } } } submitOperation.MarkErrorAsHandled(); } } }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } if (m_update) this.DialogResult = false; else MessageBox.Show("Đã thêm user :" + username_callback); }
private void OnSubmitCompleted(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } laythongtin(); }
private void OnSubmitCompleteds(SubmitOperation so) { if (so.HasError) { MessageBox.Show(string.Format("Submit Failed: {0}", so.Error.Message)); so.MarkErrorAsHandled(); } else { this.cmdLuu.IsEnabled = false; MessageBox.Show("Đã lưu vào cơ sở dữ liệu"); } }