protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!IsPostBack) { PageUtility.SetContentTitle(this, "流程管理"); this.Page.Title = "流程管理"; int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FlowParticipant, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); if (!positionRightBLL.CheckPositionRight(position.PositionId, opManageId)) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } DropDownList ddlDefName = (DropDownList)this.fvFlowConfigure.FindControl("ddlDefName"); DataTable dt = new APHelper().GetDefNames(); ddlDefName.DataSource = dt; ddlDefName.DataValueField = "DefName"; ddlDefName.DataTextField = "DefName"; ddlDefName.DataBind(); ViewState["ddlDefNameTable"] = dt; } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { PageUtility.SetContentTitle(this, "职务权限设置"); this.Page.Title = "职务权限设置"; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.UseCase.PositionAuthorization, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.UseCase.PositionAuthorization, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); bool hasViewRight = positionRightBLL.CheckPositionRight(position.PositionId, opViewId); bool hasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); if (!hasViewRight && !hasManageRight) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } if (!hasManageRight) { this.SetPositionRightBtn.Visible = false; } OUTreeUtility.InitOUTree(this.OrganizationTreeView, true, false, false, false, true, false); } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!IsPostBack) { PageUtility.SetContentTitle(this, "预算调拨申请单查询"); this.Page.Title = "预算调拨申请单查询"; if (Request["Search"] == null) { int stuffuserID = ((AuthorizationDS.StuffUserRow)Session["StuffUser"]).StuffUserId; this.odsBugetAllocationList.SelectParameters["queryExpression"].DefaultValue = "1!=1"; this.odsBugetAllocationList.SelectParameters["UserID"].DefaultValue = stuffuserID.ToString(); this.odsBugetAllocationList.SelectParameters["PositionID"].DefaultValue = ((AuthorizationDS.PositionRow)Session["Position"]).PositionId.ToString(); } int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FormBugetAllocation, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); bool HasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); if (!HasManageRight) { this.btnExport.Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!IsPostBack) { PageUtility.SetContentTitle(this, "方案申请单查询"); this.Page.Title = "方案申请单查询"; int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FormApply, SystemEnums.OperateEnum.Manage); int opScrapId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FormApply, SystemEnums.OperateEnum.Scrap); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); HasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); HasScrapRight = positionRightBLL.CheckPositionRight(position.PositionId, opScrapId); if (!HasManageRight) { this.hlExport_Good.Visible = false; this.hlExport_Total.Visible = false; } if (Request["Search"] == null) { int stuffuserID = ((AuthorizationDS.StuffUserRow)Session["StuffUser"]).StuffUserId; this.odsApplyList.SelectParameters["queryExpression"].DefaultValue = "1!=1"; this.odsApplyList.SelectParameters["UserID"].DefaultValue = stuffuserID.ToString(); this.odsApplyList.SelectParameters["PositionID"].DefaultValue = ((AuthorizationDS.PositionRow)Session["Position"]).PositionId.ToString(); } hlExport_Good.NavigateUrl = System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/ReportManage/SalesApplyExportReport.aspx?ShowDialog=1&ExportType=Good"; hlExport_Total.NavigateUrl = System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/ReportManage/SalesApplyExportReport.aspx?ShowDialog=1&ExportType=Total"; } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { PageUtility.SetContentTitle(this, "管理费用类别管理"); this.Page.Title = "管理费用类别管理"; int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.ExpenseManageType, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; if (!new PositionRightBLL().CheckPositionRight(position.PositionId, opManageId)) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } } }
protected void Page_Load(object sender, System.EventArgs e) { PageUtility.SetContentTitle(this, "销售部核销率(财务专用)"); this.Page.Title = "销售部核销率(财务专用)"; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.SalesReimburseRateForFinanceReport, SystemEnums.OperateEnum.View); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); bool HasViewRight = positionRightBLL.CheckPositionRight(position.PositionId, opViewId); if (!HasViewRight) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { //判断权限 PageUtility.SetContentTitle(this, "系统公告"); this.Page.Title = "系统公告"; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.Bulletin, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.Bulletin, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); this.HasViewRight = positionRightBLL.CheckPositionRight(position.PositionId, opViewId); this.HasManageRight = (positionRightBLL.CheckPositionRight(position.PositionId, opManageId) && Session["ProxyStuffUserId"] == null); this.Opdiv.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { PageUtility.SetContentTitle(this, "门店信息导入"); this.Page.Title = "门店信息导入"; int opImportId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.ShopManage, SystemEnums.OperateEnum.Import); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); this.HasImportRight = positionRightBLL.CheckPositionRight(position.PositionId, opImportId); if (!this.HasImportRight) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { String title = "个人费用报销代理设置"; PageUtility.SetContentTitle(this, title); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.ProxyBusiness, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; if (!new PositionRightBLL().CheckPositionRight(position.PositionId, opManageId)) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } int stuffuserID = ((AuthorizationDS.StuffUserRow)Session["StuffUser"]).StuffUserId; this.odsProxyBusiness.SelectParameters["UserID"].DefaultValue = stuffuserID.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { PageUtility.SetContentTitle(this, "¾Ü¾øÔÒò"); this.Page.Title = "¾Ü¾øÔÒò"; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.RejectReason, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.RejectReason, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); this.HasViewRight = positionRightBLL.CheckPositionRight(position.PositionId, opViewId); this.HasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); if (!this.HasViewRight && !HasManageRight) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { PageUtility.SetContentTitle(this, "管理费用预算"); this.Page.Title = "管理费用预算"; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.BudgetManageFee, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.BudgetManageFee, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); this.HasViewRight = positionRightBLL.CheckPositionRight(position.PositionId, opViewId); this.HasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); if (!this.HasViewRight && !HasManageRight) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } this.GVBudget.Columns[8].Visible = (bool)this.ViewState["HasManageRight"]; } }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { PageUtility.SetContentTitle(this, "组织机构管理"); this.Page.Title = "组织机构管理"; //初始化不显示作废组织结构 this.ViewState["ShowActiveOU"] = true; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.UseCase.OrganizationManage, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.UseCase.OrganizationManage, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); bool hasViewRight = positionRightBLL.CheckPositionRight(position.PositionId, opViewId); bool hasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); if (!hasViewRight && !hasManageRight) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } if (!hasManageRight) { this.AddRootOrganizationUnitBtn.Visible = false; //this.ChangeParentUnitBtn.Visible=false; this.UpdataOrganizationUnitBtn.Visible = false; this.DeleteOrganizationUnitBtn.Visible = false; this.AddOrganizationUnitBtn.Visible = false; this.AddPositionBtn.Visible = false; //this.ChangeOrganizationUnitBtn.Visible = false; this.UpdatePositionBtn.Visible = false; this.DeletePositionBtn.Visible = false; } this.InitTreeView(); } PageUtility.CloseModelDlg(this); }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { PageUtility.SetContentTitle(this, "销售费用预算"); this.Page.Title = "销售费用预算"; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.BudgetSalesFee, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.BudgetSalesFee, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); this.HasViewRight = positionRightBLL.CheckPositionRight(position.PositionId, opViewId); this.HasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); if (!this.HasViewRight && !HasManageRight) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } this.GVBudget.Columns[8].Visible = (bool)this.ViewState["HasManageRight"]; } DropDownList newExpenseItemDDL = (DropDownList)this.BudgetAddFormView.FindControl("newExpenseItemDDL"); newExpenseItemDDL.Attributes.Add("onmouseover", "FixWidth(this)"); }
public Customer GetCustomerByUserAcct(string acct) { BusinessUtility utl = new BusinessUtility(); return(utl.GetCustomerByLoginUserAcct(acct)); }
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; FormDS.FormRow rowForm = this.ContractApplyBLL.GetFormByID(formID)[0]; FormDS.FormContractRow rowFormContract = this.ContractApplyBLL.GetFormContractByID(formID)[0]; if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } ViewState["OrganizationUnitID"] = rowForm.OrganizationUnitID; //对控件赋值 this.txtFormNo.Text = rowForm.FormNo; this.ApplyDateCtl.Text = rowForm.SubmitDate.ToShortDateString(); 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(); this.txtContractName.Text = rowFormContract.ContractName; this.txtFirstCompany.Text = rowFormContract.FirstCompany; if (!rowFormContract.IsSecondCompanyNull()) { this.txtSecondCompany.Text = rowFormContract.SecondCompany; } if (!rowFormContract.IsThirdCompanyNull()) { this.txtThirdCompany.Text = rowFormContract.ThirdCompany; } this.txtContractNo.Text = rowFormContract.ContractNo; this.txtContractAmount.Text = rowFormContract.ContractAmount.ToString(); this.txtPageNumber.Text = rowFormContract.PageNumber.ToString(); this.txtContractType.Text = new MasterDataBLL().GetContractTypeById(rowFormContract.ContractTypeID).ContractTypeName; if (!rowFormContract.IsPaymentTypeNull()) { this.txtPaymentType.Text = rowFormContract.PaymentType; } if (!rowFormContract.IsBeginDateNull()) { this.txtBeginDate.Text = rowFormContract.BeginDate.ToShortDateString(); } if (!rowFormContract.IsEndDateNull()) { this.txtEndDate.Text = rowFormContract.EndDate.ToShortDateString(); } if (!rowFormContract.IsMainContentNull()) { this.txtMainContent.Text = rowFormContract.MainContent; } if (!rowFormContract.IsChangePartNull()) { this.txtChangePart.Text = rowFormContract.ChangePart; } if (!rowFormContract.IsAttachedFileNameNull()) { this.UCFileUpload.AttachmentFileName = rowFormContract.AttachedFileName; } if (!rowFormContract.IsRealAttachedFileNameNull()) { this.UCFileUpload.RealAttachmentFileName = rowFormContract.RealAttachedFileName; } //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; trHistory.Visible = false; } else { FormDS.FormRow rejectedForm = new ContractApplyBLL().GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/OtherForm/ContractApproval.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 && ((AuthorizationDS.StuffUserRow)Session["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.IsStampCtl.Checked = rowFormContract.IsisStampedNull() ? false : rowFormContract.isStamped; this.IsRecoveryCtl.Checked = rowFormContract.IsisRecoveryNull() ? false : rowFormContract.isRecovery; int opContractInfoId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FormContract, SystemEnums.OperateEnum.Other); AuthorizationDS.PositionRow ViewerPosition = (AuthorizationDS.PositionRow) this.Session["Position"]; if (new PositionRightBLL().CheckPositionRight(ViewerPosition.PositionId, opContractInfoId) && rowForm.StatusID == 2) { if (!rowFormContract.IsisStampedNull() && rowFormContract.isStamped) { this.StampBtn.Visible = false; } else { this.StampBtn.Visible = true; } if (!rowFormContract.IsisRecoveryNull() && rowFormContract.isRecovery) { this.RecoveryBtn.Visible = false; } else { this.RecoveryBtn.Visible = true; } } else { this.StampBtn.Visible = false; this.RecoveryBtn.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) { PageUtility.SetContentTitle(this.Page, "出差费用报销审批"); this.Page.Title = "出差费用报销审批"; int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; FormDS.FormRow rowForm = this.PersonalReimburseBLL.GetFormByID(formID)[0]; FormDS.FormPersonalReimburseRow rowPersonalReimburse = this.PersonalReimburseBLL.GetFormPersonalReimburseByID(formID)[0]; if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } ViewState["OrganizationUnitID"] = rowForm.OrganizationUnitID; //对控件进行赋值 this.txtFormNo.Text = rowForm.FormNo; this.ApplyDateCtl.Text = rowForm.SubmitDate.ToShortDateString(); 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(); this.txtPeriod.Text = rowPersonalReimburse.Period.ToString("yyyyMM"); if (!rowPersonalReimburse.IsRemarkNull()) { this.RemarkCtl.Text = rowPersonalReimburse.Remark; } //出差申请信息 FormDS.FormTravelApplyRow rowTravelApply = this.PersonalReimburseBLL.GetFormTravelApplyByID(rowPersonalReimburse.FormTravelApplyID); if (!rowTravelApply.IsTransportFeeNull()) { this.txtTransportFee.Text = rowTravelApply.TransportFee.ToString("N"); } if (!rowTravelApply.IsHotelFeeNull()) { this.txtHotelFee.Text = rowTravelApply.HotelFee.ToString("N"); } if (!rowTravelApply.IsMealFeeNull()) { this.txtMealFee.Text = rowTravelApply.MealFee.ToString("N"); } if (!rowTravelApply.IsOtherFeeNull()) { this.txtOtherFee.Text = rowTravelApply.OtherFee.ToString("N"); } if (!rowTravelApply.IsTotalFeeNull()) { this.txtTotal.Text = rowTravelApply.TotalFee.ToString("N"); } //赋值 if (!rowTravelApply.IsRemarkNull()) { this.RemarkCtl.Text = rowTravelApply.Remark; } FormDS.FormRow rowApplyForm = PersonalReimburseBLL.GetFormByID(rowTravelApply.FormTravelApplyID)[0]; hlTravelApply.Text = rowApplyForm.FormNo; this.hlTravelApply.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/OtherForm/TravelApproval.aspx?ShowDialog=1&ObjectId=" + rowApplyForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = new ContractApplyBLL().GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/OtherForm/PersonalReimburseApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //审批页面处理&按钮处理&预算信息 this.txtTotalBudget.Text = rowPersonalReimburse.TotalBudget.ToString("N"); this.txtApprovingAmount.Text = rowPersonalReimburse.ApprovingAmount.ToString("N"); this.txtApprovedAmount.Text = rowPersonalReimburse.ApprovedAmount.ToString("N"); this.txtRemainAmount.Text = rowPersonalReimburse.RemainAmount.ToString("N"); 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 (rowForm.UserID == stuffUser.StuffUserId) { this.BudgetTitleDIV.Visible = false; this.BudgetInfoDIV.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; } } //保存实报金额按钮 int opSaveId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FormPersonalReimburse, SystemEnums.OperateEnum.Other); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; if (new PositionRightBLL().CheckPositionRight(position.PositionId, opSaveId) && (rowForm.StatusID == 1 || rowForm.StatusID == 2)) { HasSaveRight = true; } else { HasSaveRight = false; } if (HasSaveRight) { this.SaveBtn.Visible = true; } else { this.SaveBtn.Visible = false; } //超预算提示 if (rowPersonalReimburse.Amount > rowTravelApply.TotalFee) { this.imgOverBudget.Visible = true; } // 打开明细表 new FormPersonalReimburseDetailTableAdapter().FillByFormID(InnerDS.FormPersonalReimburseDetail, rowForm.FormID); this.gvTravelReimburseDetails.DataSource = new FormPersonalReimburseDetailTableAdapter().GetDataByFormID(rowForm.FormID); this.gvTravelReimburseDetails.DataBind(); this.gvFormTravelApplyDetails.DataSource = new FormTravelApplyDetailTableAdapter().GetDataByApplyID(rowTravelApply.FormTravelApplyID); this.gvFormTravelApplyDetails.DataBind(); } 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) { PageUtility.SetContentTitle(this.Page, "方案报销审批"); this.Page.Title = "方案报销审批"; int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; FormDS.FormRow rowForm = this.SalesReimburseBLL.GetFormByID(formID)[0]; FormDS.FormReimburseRow rowFormReimburse = this.SalesReimburseBLL.GetFormReimburseByID(formID)[0]; //如果单据没有审批完成的话,是不能录入或者查看发货信息的 if (rowForm.StatusID != (int)SystemEnums.FormStatus.ApproveCompleted) { this.gvSKUDetails.Columns[6].Visible = false; this.gvSKUDetails.Columns[5].HeaderStyle.Width = 400; this.DeliveryDIV.Visible = false; this.upDelivery.Visible = false; } if (this.gvSKUDetails.SelectedIndex < 0) { this.fvDelievery.Visible = false; } //如果没有修改权限的话那么不能新增和删除 int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.DeliveryInfo, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); this.HasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); //流程ID if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } ViewState["OrganizationUnitID"] = rowForm.OrganizationUnitID; this.FormNoCtl.Text = rowForm.FormNo; this.ApplyDateCtl.Text = rowForm.SubmitDate.ToShortDateString(); 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(); MasterDataBLL masterBll = new MasterDataBLL(); ERS.CustomerRow customer = masterBll.GetCustomerById(rowFormReimburse.CustomerID); this.CustomerNameCtl.Text = customer.CustomerName; this.CustomerTypeCtl.Text = masterBll.GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName; this.PaymentTypeCtl.Text = masterBll.GetPaymentTypeById(rowFormReimburse.PaymentTypeID).PaymentTypeName; if (!rowFormReimburse.IsRemarkNull()) { this.RemarkCtl.Text = rowFormReimburse.Remark; } if (!rowFormReimburse.IsAttachedFileNameNull()) { this.UCFileUpload.AttachmentFileName = rowFormReimburse.AttachedFileName; } if (!rowFormReimburse.IsRealAttachedFileNameNull()) { this.UCFileUpload.RealAttachmentFileName = rowFormReimburse.RealAttachedFileName; } this.odsSKUDetails.SelectParameters["FormReimburseID"].DefaultValue = rowFormReimburse.FormReimburseID.ToString(); this.odsReimburseDetails.SelectParameters["FormReimburseID"].DefaultValue = rowFormReimburse.FormReimburseID.ToString(); //审批页面处理&按钮处理 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 (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = this.SalesReimburseBLL.GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/OtherForm/ReimburseGoodsApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //如果是弹出,按钮不可见 if (this.Request["ShowDialog"] != null) { if (this.Request["ShowDialog"].ToString() == "1") { this.upButton.Visible = false; this.gvSKUDetails.Columns[6].Visible = false; this.gvSKUDetails.Columns[5].HeaderStyle.Width = 400; this.Master.FindControl("divMenu").Visible = false; this.Master.FindControl("tbCurrentPage").Visible = false; } } //发货完成按钮权限 opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.DeliveryComplete, SystemEnums.OperateEnum.Other); position = (AuthorizationDS.PositionRow) this.Session["Position"]; if (positionRightBLL.CheckPositionRight(position.PositionId, opManageId) && (rowFormReimburse.IsIsDeliveryCompleteNull() || rowFormReimburse.IsDeliveryComplete == false)) { this.btnDeliveryComplete.Visible = true; } else { this.btnDeliveryComplete.Visible = false; //this.gvDelivery.Visible = false; //this.gvSKUDetails.Columns[6].Visible=false; //this.gvSKUDetails.Columns[5].ItemStyle.Width = 400; } } this.cwfAppCheck.FormID = (int)this.ViewState["ObjectId"]; this.cwfAppCheck.ProcID = this.ViewState["ProcID"].ToString(); this.cwfAppCheck.IsView = (bool)this.ViewState["IsView"]; }