void Travelmanagement_UpdateTravelmanagementCompleted(object sender, UpdateTravelmanagementCompletedEventArgs e) { try { if (e.Error != null && e.Error.Message != "") { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } else { if (e.Result != "") { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr(e.Result), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); return; } if (e.UserState != null && e.UserState.ToString() == "Edit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", "EVECTIONFORM")); if (e.UserState != null && e.UserState.ToString() != "Submit") { if (GlobalFunction.IsSaveAndClose(refreshType)) { EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>(); RefreshUI(refreshType); ParentEntityBrowser.ParentWindow.Close(); } } } if (e.UserState != null && e.UserState.ToString() == "Audit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT")); } if (e.UserState != null && e.UserState.ToString() == "Submit" && !isSubmit) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSSUBMITAUDIT")); isSubmit = false; } if (e.UserState == null) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), "修改成功"); } RefreshUI(RefreshedTypes.AuditInfo); if (needsubmit == true) { EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>(); entBrowser.ManualSubmit(); BackToSubmit(); } RefreshUI(RefreshedTypes.All); } } catch (Exception ex) { Logger.Current.Log(ex.Message, Category.Debug, Priority.Low); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } finally { RefreshUI(RefreshedTypes.HideProgressBar); } }
void Travelmanagement_UpdateTravelmanagementCompleted(object sender, UpdateTravelmanagementCompletedEventArgs e) { try { if (e.Error != null && e.Error.Message != "") { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } else { if (e.Result != "") { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr(e.Result), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); return; } if (e.UserState != null && e.UserState.ToString() == "Edit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", "EVECTIONFORM")); if (e.UserState != null && e.UserState.ToString() != "Submit") { if (GlobalFunction.IsSaveAndClose(refreshType)) { EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>(); RefreshUI(refreshType); ParentEntityBrowser.ParentWindow.Close(); } } } if (e.UserState != null && e.UserState.ToString() == "Audit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT")); } if (e.UserState != null && e.UserState.ToString() == "Submit" && !isSubmit) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSSUBMITAUDIT")); isSubmit = false; } if (e.UserState == null) { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), "修改成功"); } RefreshUI(RefreshedTypes.AuditInfo); if (needsubmit == true) { EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>(); entBrowser.ManualSubmit(); BackToSubmit(); } RefreshUI(RefreshedTypes.All); } } catch (Exception ex) { Logger.Current.Log(ex.Message, Category.Debug, Priority.Low); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } finally { RefreshUI(RefreshedTypes.HideProgressBar); } }