void TrC_GetTravelReimbursementByIdCompleted(object sender, GetTravelReimbursementByIdCompletedEventArgs e) { try { if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message)) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } else { if (e.Result == null) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } travelReimbursement = e.Result; if (!string.IsNullOrEmpty(travelReimbursement.TRAVELREIMBURSEMENTID)) { BusinessApplicationsForm AddWin = new BusinessApplicationsForm(FormTypes.Edit, businesstrID); EntityBrowser browser = new EntityBrowser(AddWin); browser.RemoveSMTLoading(); browser.FormType = FormTypes.Edit; browser.MinWidth = 980; browser.MinHeight = 445; browser.TitleContent = "出差申请"; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }); } LoadData(); //重新加载数据(主要用于刷新"是否报销"按钮的状态) ReimbursementSwitch = false; //关闭开关 } } 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); } }
void TrC_GetTravelReimbursementByIdCompleted(object sender, GetTravelReimbursementByIdCompletedEventArgs e) { try { if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message)) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } else { if (e.Result == null) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } travelReimbursement = e.Result; if (!string.IsNullOrEmpty(travelReimbursement.TRAVELREIMBURSEMENTID)) { BusinessApplicationsForm AddWin = new BusinessApplicationsForm(FormTypes.Edit, businesstrID); EntityBrowser browser = new EntityBrowser(AddWin); browser.RemoveSMTLoading(); browser.FormType = FormTypes.Edit; browser.MinWidth = 980; browser.MinHeight = 445; browser.TitleContent = "出差申请"; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }); } LoadData();//重新加载数据(主要用于刷新"是否报销"按钮的状态) ReimbursementSwitch = false;//关闭开关 } } 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); } }
void TrC_GetTravelReimbursementByIdCompleted(object sender, GetTravelReimbursementByIdCompletedEventArgs e) { try { if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message)) { RefreshUI(RefreshedTypes.HideProgressBar); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } else { if (e.Result == null) { RefreshUI(RefreshedTypes.HideProgressBar); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); return; } isPageloadCompleted = true; TravelReimbursement_Golbal = e.Result; TravelDetailList_Golbal = TravelReimbursement_Golbal.T_OA_REIMBURSEMENTDETAIL; this.businesstrID = TravelReimbursement_Golbal.T_OA_BUSINESSTRIP.BUSINESSTRIPID; //ljx 2011-8-29 if (formType == FormTypes.Edit) { if (TravelReimbursement_Golbal.CHECKSTATE == (Convert.ToInt32(CheckStates.Approving)).ToString() || TravelReimbursement_Golbal.CHECKSTATE == (Convert.ToInt32(CheckStates.Approved)).ToString() || TravelReimbursement_Golbal.CHECKSTATE == (Convert.ToInt32(CheckStates.UnApproved)).ToString()) { formType = FormTypes.Audit; DaGrEditScrollView.Visibility = Visibility.Collapsed; DaGrReadOnlyScrollView.Visibility = Visibility.Visible; Utility.InitFileLoad("TravelRequest", TravelReimbursement_Golbal.TRAVELREIMBURSEMENTID, formType, uploadFile); } } if (formType == FormTypes.Resubmit)//重新提交 { TravelReimbursement_Golbal.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString(); } txtPeopleTravel.Text = TravelReimbursement_Golbal.CLAIMSWERENAME;//报销人 if (!string.IsNullOrEmpty(TravelReimbursement_Golbal.TEL)) { txtTELL.Text = TravelReimbursement_Golbal.TEL;//联系电话 } ReimbursementTime.Text = TravelReimbursement_Golbal.CREATEDATE.Value.ToShortDateString();//报销时间 txtChargeApplyTotal.Text = TravelReimbursement_Golbal.REIMBURSEMENTOFCOSTS.ToString();//本次差旅总费用 txtSubTotal.Text = TravelReimbursement_Golbal.THETOTALCOST.ToString();//差旅合计 if (!string.IsNullOrEmpty(TravelReimbursement_Golbal.NOBUDGETCLAIMS))//报销单号 { txtNoClaims.Text = string.Empty; txtNoClaims.Text = TravelReimbursement_Golbal.NOBUDGETCLAIMS; } if (!string.IsNullOrEmpty(TravelReimbursement_Golbal.REMARKS)) { txtRemark.Text = TravelReimbursement_Golbal.REMARKS;//备注 } if (InitFB == false) { InitFBControl(TravelReimbursement_Golbal); } //HrPersonnelclient.GetEmployeePostBriefByEmployeeIDAsync(TravelReimbursement.OWNERID); postName = TravelReimbursement_Golbal.OWNERPOSTNAME; depName = TravelReimbursement_Golbal.OWNERDEPARTMENTNAME; companyName = TravelReimbursement_Golbal.OWNERCOMPANYNAME; string StrName = TravelReimbursement_Golbal.OWNERNAME + "-" + postName + "-" + depName + "-" + companyName; txtPeopleTravel.Text = StrName; ToolTipService.SetToolTip(txtPeopleTravel, StrName); EmployeeName = TravelReimbursement_Golbal.OWNERNAME;//出差人 EmployeePostLevel = TravelReimbursement_Golbal.POSTLEVEL; if (formType != FormTypes.New || formType != FormTypes.Edit) { if (TravelReimbursement_Golbal.CHECKSTATE != ((int)CheckStates.UnSubmit).ToString()) { BrowseShieldedControl(); } } else if (formType != FormTypes.Resubmit) { if (TravelReimbursement_Golbal.CHECKSTATE == ((int)CheckStates.Approving).ToString() || TravelReimbursement_Golbal.CHECKSTATE == ((int)CheckStates.Approved).ToString() || TravelReimbursement_Golbal.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString()) { BrowseShieldedControl(); } } //我的单据中用到(判断出差报告如果在未提交状态,FormType状态改为可编辑) if (TravelReimbursement_Golbal.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString()) { //将Form状态改为编辑 //formType = FormTypes.Edit; EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>(); entBrowser.FormType = FormTypes.Edit; //重新启用Form中的控件 txtTELL.IsReadOnly = false; fbCtr.IsEnabled = true; txtRemark.IsReadOnly = false; textStandards.IsReadOnly = false; } RefreshUI(RefreshedTypes.ShowProgressBar); OaPersonOfficeClient.GetTravelSolutionByCompanyIDAsync(TravelReimbursement_Golbal.OWNERCOMPANYID, null, null); } } catch (Exception ex) { RefreshUI(RefreshedTypes.HideProgressBar); Logger.Current.Log(ex.Message, Category.Debug, Priority.Low); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }