void client_EmployeeContractAddCompleted(object sender, EmployeeContractAddCompletedEventArgs e) { RefreshUI(RefreshedTypes.HideProgressBar); if (e.Error != null && e.Error.Message != "") { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { if (!string.IsNullOrEmpty(e.strMsg)) { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.strMsg)); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr(e.strMsg), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } if (!isSubmit) { //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); isSubmit = false; ToolbarItems = Utility.CreateFormEditButton(); ToolbarItems.Add(ToolBarItems.Delete); } if (closeFormFlag) { RefreshUI(RefreshedTypes.Close); } else { FormType = FormTypes.Edit; EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>(); entBrowser.FormType = FormTypes.Edit; RefreshUI(RefreshedTypes.AuditInfo); } canSubmit = true; if (needsubmit) { try { EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>(); entBrowser.ManualSubmit(); BackToSubmit(); } catch (Exception) { RefreshUI(RefreshedTypes.HideProgressBar); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("提交失败"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } } RefreshUI(RefreshedTypes.All); } }
void client_EmployeeContractAddCompleted(object sender, EmployeeContractAddCompletedEventArgs e) { RefreshUI(RefreshedTypes.HideProgressBar); if (e.Error != null && e.Error.Message != "") { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { if (!string.IsNullOrEmpty(e.strMsg)) { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.strMsg)); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr(e.strMsg), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } if (!isSubmit) { //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); isSubmit = false; ToolbarItems = Utility.CreateFormEditButton(); ToolbarItems.Add(ToolBarItems.Delete); } if (closeFormFlag) { RefreshUI(RefreshedTypes.Close); } else { FormType = FormTypes.Edit; EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>(); entBrowser.FormType = FormTypes.Edit; RefreshUI(RefreshedTypes.AuditInfo); } canSubmit = true; if (needsubmit) { try { EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>(); entBrowser.ManualSubmit(); BackToSubmit(); } catch (Exception ) { RefreshUI(RefreshedTypes.HideProgressBar); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("提交失败"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } } RefreshUI(RefreshedTypes.All); } }