void Travelmanagement_GetAccordingToBusinesstripIdCheckCompleted(object sender, GetAccordingToBusinesstripIdCheckCompletedEventArgs e) { try { if (e.Result != null) { TraveView = e.Result; //missionReportsID = TraveView.ReportId; travelReimbursementID = TraveView.TrId; traverlCheck = TraveView.TraveAppCheckState; //reportCheckState = TraveView.ReportCheckState; trCheckState = TraveView.TrCheckState; SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage("打开出差form获取到的出差报销id:" + TraveView.TrId); } else { SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage("GetAccordingToBusinesstripId返回结果为空"); } //判断出差报销是否存在 bool BoolReimID = !string.IsNullOrEmpty(travelReimbursementID) && travelReimbursementID != "空"; if (false == BoolReimID) { traveformFather.Visibility = Visibility.Collapsed; //出差报销Tab } if (traverlCheck != Convert.ToInt32(CheckStates.Approved).ToString()) { traveformFather.Visibility = Visibility.Collapsed;//出差报销Tab } else { if ((trCheckState == "0" || trCheckState == "1" || trCheckState == "3") && !isAlterTrave) { TabTravel.SelectedIndex = 2; if (actions != FormTypes.Browse && actions != FormTypes.Edit) { tbbTravelapplication.Visibility = Visibility.Collapsed;//隐藏出差申请Tab //TabReport.Visibility = Visibility.Collapsed;//隐藏出差报告Tab } } } if (actions == FormTypes.New)//新增 { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.New, ""); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; TravelapplicationForm.ParentEntityBrowser = this.ParentEntityBrowser; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.New; TravelBrowser.MinWidth = 980; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); } else if (actions == FormTypes.Edit) { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 //TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Edit, businesstrID); //2012-9-21 ljx TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Edit, TraveView.Travelmanagement.BUSINESSTRIPID); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; TravelapplicationForm.ParentEntityBrowser = this.ParentEntityBrowser; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.Edit; //TravelBrowser.MinWidth = 980; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); if (BoolReimID && traverlCheck == Convert.ToInt32(CheckStates.Approved).ToString()) { //出差报销 TravelReimbursementControl TravelReimbursementForm = new TravelReimbursementControl(FrameworkUI.FormTypes.Edit, travelReimbursementID, businesstrID); //TravelReimbursementForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; TravelReimbursementForm.ParentEntityBrowser = this.ParentEntityBrowser; TravelReimbursementForm.OpenFrom = OpenFrom; EntityBrowser TravelReimbursementBrowser = new EntityBrowser(TravelReimbursementForm); TravelReimbursementBrowser.FormType = FormTypes.Edit; //Canvas can = new Canvas(); //TravelReimbursementBrowser.MinWidth = 980; TravelReimbursementBrowser.MinHeight = 445; TravelReimbursementGd.Children.Add(TravelReimbursementBrowser); } } else if (actions == FormTypes.Browse) { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Browse, businesstrID); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.Browse; TravelBrowser.MinWidth = 728; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); if (BoolReimID && traverlCheck == Convert.ToInt32(CheckStates.Approved).ToString()) { //出差报销 TravelReimbursementControl TravelReimbursementForm = new TravelReimbursementControl(FrameworkUI.FormTypes.Browse, travelReimbursementID, businesstrID); //TravelReimbursementForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelReimbursementBrowser = new EntityBrowser(TravelReimbursementForm); TravelReimbursementBrowser.FormType = FormTypes.Browse; //Canvas can = new Canvas(); TravelReimbursementBrowser.MinWidth = 728; TravelReimbursementBrowser.MinHeight = 445; TravelReimbursementGd.Children.Add(TravelReimbursementBrowser); } } else if (actions == FormTypes.Audit) { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Audit, businesstrID); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.Audit; TravelBrowser.MinWidth = 728; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); if (BoolReimID && traverlCheck == Convert.ToInt32(CheckStates.Approved).ToString()) { //出差报销 TravelReimbursementControl TravelReimbursementForm = new TravelReimbursementControl(FrameworkUI.FormTypes.Audit, travelReimbursementID, businesstrID); //TravelReimbursementForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelReimbursementBrowser = new EntityBrowser(TravelReimbursementForm); TravelReimbursementBrowser.FormType = FormTypes.Audit; //Canvas can = new Canvas(); TravelReimbursementBrowser.MinWidth = 728; TravelReimbursementBrowser.MinHeight = 445; TravelReimbursementGd.Children.Add(TravelReimbursementBrowser); } } else { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 if (traverlCheck != "3" && !isAlterTrave) { tbbTravelapplication.Visibility = Visibility.Collapsed;//出差申请Tab } else { //重新提交(或修改行程) TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Resubmit, businesstrID); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.Resubmit; TravelBrowser.MinWidth = 980; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); if (isAlterTrave) { //traveformFather.Visibility = Visibility.Collapsed; //TravelapplicationGd.Visibility = Visibility.Visible; //tbbTravelapplication.Visibility = Visibility.Visible; //TabTravel.SelectedIndex = 1; TravelapplicationForm.isAlterTrave = true; } } if (trCheckState != "3") { traveformFather.Visibility = Visibility.Collapsed;//出差报销Tab } else { if (BoolReimID && traverlCheck == Convert.ToInt32(CheckStates.Approved).ToString()) { //出差报销 TravelReimbursementControl TravelReimbursementForm = new TravelReimbursementControl(FrameworkUI.FormTypes.Resubmit, travelReimbursementID, businesstrID); //TravelReimbursementForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelReimbursementBrowser = new EntityBrowser(TravelReimbursementForm); TravelReimbursementBrowser.FormType = FormTypes.Resubmit; TravelReimbursementBrowser.MinWidth = 980; TravelReimbursementBrowser.MinHeight = 445; TravelReimbursementGd.Children.Add(TravelReimbursementBrowser); } } } } catch (Exception ex) { RefreshUI(RefreshedTypes.HideProgressBar); SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage("打开出差form,获取出差异常:" + ex.ToString()); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), "打开出差form,获取出差异常:" + ex.ToString(), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
void Travelmanagement_GetAccordingToBusinesstripIdCheckCompleted(object sender, GetAccordingToBusinesstripIdCheckCompletedEventArgs e) { try { if (e.Result != null) { TraveView = e.Result; //missionReportsID = TraveView.ReportId; travelReimbursementID = TraveView.TrId; traverlCheck = TraveView.TraveAppCheckState; //reportCheckState = TraveView.ReportCheckState; trCheckState = TraveView.TrCheckState; SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage("打开出差form获取到的出差报销id:" + TraveView.TrId); } else { SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage("GetAccordingToBusinesstripId返回结果为空"); } //判断出差报销是否存在 bool BoolReimID = !string.IsNullOrEmpty(travelReimbursementID) && travelReimbursementID != "空"; if (false == BoolReimID) traveformFather.Visibility = Visibility.Collapsed;//出差报销Tab if (traverlCheck != Convert.ToInt32(CheckStates.Approved).ToString()) { traveformFather.Visibility = Visibility.Collapsed;//出差报销Tab } else { if ((trCheckState == "0" || trCheckState == "1" || trCheckState == "3") && !isAlterTrave) { TabTravel.SelectedIndex = 2; if (actions != FormTypes.Browse && actions != FormTypes.Edit) { tbbTravelapplication.Visibility = Visibility.Collapsed;//隐藏出差申请Tab //TabReport.Visibility = Visibility.Collapsed;//隐藏出差报告Tab } } } if (actions == FormTypes.New)//新增 { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.New, ""); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; TravelapplicationForm.ParentEntityBrowser = this.ParentEntityBrowser; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.New; TravelBrowser.MinWidth = 980; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); } else if (actions == FormTypes.Edit) { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 //TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Edit, businesstrID); //2012-9-21 ljx TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Edit, TraveView.Travelmanagement.BUSINESSTRIPID); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; TravelapplicationForm.ParentEntityBrowser = this.ParentEntityBrowser; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.Edit; //TravelBrowser.MinWidth = 980; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); if (BoolReimID && traverlCheck == Convert.ToInt32(CheckStates.Approved).ToString()) { //出差报销 TravelReimbursementControl TravelReimbursementForm = new TravelReimbursementControl(FrameworkUI.FormTypes.Edit, travelReimbursementID, businesstrID); //TravelReimbursementForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; TravelReimbursementForm.ParentEntityBrowser = this.ParentEntityBrowser; TravelReimbursementForm.OpenFrom = OpenFrom; EntityBrowser TravelReimbursementBrowser = new EntityBrowser(TravelReimbursementForm); TravelReimbursementBrowser.FormType = FormTypes.Edit; //Canvas can = new Canvas(); //TravelReimbursementBrowser.MinWidth = 980; TravelReimbursementBrowser.MinHeight = 445; TravelReimbursementGd.Children.Add(TravelReimbursementBrowser); } } else if (actions == FormTypes.Browse) { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Browse, businesstrID); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.Browse; TravelBrowser.MinWidth = 728; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); if (BoolReimID && traverlCheck == Convert.ToInt32(CheckStates.Approved).ToString()) { //出差报销 TravelReimbursementControl TravelReimbursementForm = new TravelReimbursementControl(FrameworkUI.FormTypes.Browse, travelReimbursementID, businesstrID); //TravelReimbursementForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelReimbursementBrowser = new EntityBrowser(TravelReimbursementForm); TravelReimbursementBrowser.FormType = FormTypes.Browse; //Canvas can = new Canvas(); TravelReimbursementBrowser.MinWidth = 728; TravelReimbursementBrowser.MinHeight = 445; TravelReimbursementGd.Children.Add(TravelReimbursementBrowser); } } else if (actions == FormTypes.Audit) { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Audit, businesstrID); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.Audit; TravelBrowser.MinWidth = 728; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); if (BoolReimID && traverlCheck == Convert.ToInt32(CheckStates.Approved).ToString()) { //出差报销 TravelReimbursementControl TravelReimbursementForm = new TravelReimbursementControl(FrameworkUI.FormTypes.Audit, travelReimbursementID, businesstrID); //TravelReimbursementForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelReimbursementBrowser = new EntityBrowser(TravelReimbursementForm); TravelReimbursementBrowser.FormType = FormTypes.Audit; //Canvas can = new Canvas(); TravelReimbursementBrowser.MinWidth = 728; TravelReimbursementBrowser.MinHeight = 445; TravelReimbursementGd.Children.Add(TravelReimbursementBrowser); } } else { //RefreshUI(RefreshedTypes.HideProgressBar);//停止进度圈 if (traverlCheck != "3"&& !isAlterTrave) { tbbTravelapplication.Visibility = Visibility.Collapsed;//出差申请Tab } else { //重新提交(或修改行程) TravelRequestForm TravelapplicationForm = new TravelRequestForm(FormTypes.Resubmit, businesstrID); //TravelapplicationForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelBrowser = new EntityBrowser(TravelapplicationForm); TravelBrowser.FormType = FormTypes.Resubmit; TravelBrowser.MinWidth = 980; TravelBrowser.MinHeight = 445; TravelapplicationGd.Children.Add(TravelBrowser); if (isAlterTrave) { //traveformFather.Visibility = Visibility.Collapsed; //TravelapplicationGd.Visibility = Visibility.Visible; //tbbTravelapplication.Visibility = Visibility.Visible; //TabTravel.SelectedIndex = 1; TravelapplicationForm.isAlterTrave = true; } } if (trCheckState != "3") { traveformFather.Visibility = Visibility.Collapsed;//出差报销Tab } else { if (BoolReimID && traverlCheck == Convert.ToInt32(CheckStates.Approved).ToString()) { //出差报销 TravelReimbursementControl TravelReimbursementForm = new TravelReimbursementControl(FrameworkUI.FormTypes.Resubmit, travelReimbursementID, businesstrID); //TravelReimbursementForm.OnUIRefreshed += TravelapplicationForm_OnUIRefreshed; EntityBrowser TravelReimbursementBrowser = new EntityBrowser(TravelReimbursementForm); TravelReimbursementBrowser.FormType = FormTypes.Resubmit; TravelReimbursementBrowser.MinWidth = 980; TravelReimbursementBrowser.MinHeight = 445; TravelReimbursementGd.Children.Add(TravelReimbursementBrowser); } } } } catch (Exception ex) { RefreshUI(RefreshedTypes.HideProgressBar); SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage("打开出差form,获取出差异常:" + ex.ToString()); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), "打开出差form,获取出差异常:" + ex.ToString(), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }