protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { PageUtility.SetContentTitle(this.Page, "出差审批"); this.Page.Title = "出差审批"; int formID = int.Parse(Request["ObjectID"]); this.ViewState["ObjectId"] = formID; QueryDS.FormViewRow rowForm = new FormQueryBLL().GetFormViewByID(formID); FormDS.FormTravelApplyRow applyRow = this.PersonalReimburseBLL.GetFormTravelApplyByID(formID); if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } ViewState["OrganizationUnitID"] = rowForm.OrganizationUnitID; txtFormNo.Text = rowForm.FormNo; AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID); this.StuffNameCtl.Text = applicant.StuffName; this.PositionNameCtl.Text = new OUTreeBLL().GetPositionById(rowForm.PositionID).PositionName; if (new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID) != null) { this.DepartmentNameCtl.Text = new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID).OrganizationUnitName; } this.AttendDateCtl.Text = applicant.AttendDate.ToShortDateString(); if (!applyRow.IsTransportFeeNull()) { this.txtTransportFee.Text = applyRow.TransportFee.ToString("N"); } if (!applyRow.IsHotelFeeNull()) { this.txtHotelFee.Text = applyRow.HotelFee.ToString("N"); } if (!applyRow.IsMealFeeNull()) { this.txtMealFee.Text = applyRow.MealFee.ToString("N"); } if (!applyRow.IsOtherFeeNull()) { this.txtOtherFee.Text = applyRow.OtherFee.ToString("N"); } if (!applyRow.IsTotalFeeNull()) { this.txtTotal.Text = applyRow.TotalFee.ToString("N"); } this.RemarkCtl.Text = applyRow.Remark; if (!applyRow.IsAttachedFileNameNull() && !applyRow.IsRealAttachedFileNameNull()) { this.UCFileUpload.AttachmentFileName = applyRow.RealAttachedFileName; this.UCFileUpload.RealAttachmentFileName = applyRow.RealAttachedFileName; } // 打开明细表 FormTravelApplyDetailTableAdapter taDetail = new FormTravelApplyDetailTableAdapter(); taDetail.FillByApplyID(this.InnerDS.FormTravelApplyDetail, formID); //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = this.PersonalReimburseBLL.GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/OtherForm/TravelApproval.aspx?ShowDialog=1&ObjectID=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //审批页面处理&按钮处理 AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; this.ViewState["StuffUserID"] = stuffUser.StuffUserId; if (Session["ProxyStuffUserId"] == null && rowForm.InTurnUserIds.Contains("P" + stuffUser.StuffUserId + "P")) { this.SubmitBtn.Visible = true; this.cwfAppCheck.IsView = false; this.ViewState["IsView"] = false; } else { this.SubmitBtn.Visible = false; this.cwfAppCheck.IsView = true; this.ViewState["IsView"] = true; } if (rowForm.StatusID == (int)SystemEnums.FormStatus.Rejected && (stuffUser.StuffUserId == rowForm.UserID)) { this.EditBtn.Visible = true; this.ScrapBtn.Visible = true; } else { this.EditBtn.Visible = false; this.ScrapBtn.Visible = false; } //如果是弹出,取消按钮不可见 if (this.Request["ShowDialog"] != null) { if (this.Request["ShowDialog"].ToString() == "1") { this.upButton.Visible = false; this.Master.FindControl("divMenu").Visible = false; this.Master.FindControl("tbCurrentPage").Visible = false; } } } this.cwfAppCheck.FormID = (int)this.ViewState["ObjectId"]; this.cwfAppCheck.ProcID = this.ViewState["ProcID"].ToString(); this.cwfAppCheck.IsView = (bool)this.ViewState["IsView"]; }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { String title = GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this.Page, title); this.Page.Title = title; int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; QueryDS.FormViewRow rowForm = new FormQueryBLL().GetFormViewByID(formID); FormDS.FormInvitationApplyRow applyRow = this.FormTEBLL.GetByID(formID); if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } txtFormNo.Text = rowForm.FormNo; AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID); this.StuffNameCtl.Text = applicant.StuffName; this.PositionNameCtl.Text = new OUTreeBLL().GetPositionById(rowForm.PositionID).PositionName; if (new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID) != null) { this.DepartmentNameCtl.Text = new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID).OrganizationUnitName; } if (!applicant.IsStuffNoNull()) { this.txtStuffID.Text = applicant.StuffNo; } this.AttendDateCtl.Text = applicant.AttendDate.ToShortDateString(); this.txtPeriod.Text = applyRow.Period.ToString("yyyy-MM"); this.txtCustomerName.Text = applyRow.CustomerName; this.RemarkCtl.Text = applyRow.Remark; this.txtAttenderNames.Text = applyRow.AttenderNames; this.txtBusinessRelation.Text = applyRow.BusinessRelation; this.txtBusinessPurpose.Text = applyRow.Purpose; this.txtInvitationType.Text = applyRow.InvitationType; this.txtExchageRate.Text = applyRow.ExchangeRate.ToString(); this.txtCurrency.Text = new MasterDataBLL().GetCurrencyByID(applyRow.CurrencyID).CurrencyFullName; this.txtAmount.Text = applyRow.Amount.ToString(); this.txtExchageRate.Text = applyRow.ExchangeRate.ToString(); this.txtAmountRMB.Text = applyRow.AmountRMB.ToString("N"); this.txtPlace.Text = applyRow.Place; this.txtOccuredDate.Text = applyRow.OccuredDate.ToShortDateString(); this.txtAttenderCount.Text = applyRow.AttenderCount.ToString(); //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = this.FormTEBLL.GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/FormTE/FormInvitationApproval.aspx?ShowDialog=1&ObjectID=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //审批页面处理&按钮处理 AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; this.ViewState["StuffUserID"] = stuffUser.StuffUserId; if (rowForm.InTurnUserIds.Contains("P" + stuffUser.StuffUserId + "P")) { this.SubmitBtn.Visible = true; this.cwfAppCheck.IsView = false; this.ViewState["IsView"] = false; } else { this.SubmitBtn.Visible = false; this.cwfAppCheck.IsView = true; this.ViewState["IsView"] = true; } if (rowForm.StatusID == (int)SystemEnums.FormStatus.Rejected && (stuffUser.StuffUserId == rowForm.UserID)) { this.EditBtn.Visible = true; this.ScrapBtn.Visible = true; } else { this.EditBtn.Visible = false; this.ScrapBtn.Visible = false; } //如果是弹出,取消按钮不可见 if (this.Request["ShowDialog"] != null) { if (this.Request["ShowDialog"].ToString() == "1") { this.upButton.Visible = false; this.Master.FindControl("divMenu").Visible = false; this.Master.FindControl("tbCurrentPage").Visible = false; } } } this.cwfAppCheck.FormID = (int)this.ViewState["ObjectId"]; this.cwfAppCheck.ProcID = this.ViewState["ProcID"].ToString(); this.cwfAppCheck.IsView = (bool)this.ViewState["IsView"]; }