protected void gvFlowConfigure_RowDataBound(object sender, GridViewRowEventArgs e) { BusinessUseCaseTableAdapter BusinessUseCaseTA = new BusinessUseCaseTableAdapter(); if (e.Row.RowType == DataControlRowType.DataRow) { Label FlowID = (Label)e.Row.FindControl("lblFlowParticipant"); Label lblBusinessUseCaseName = (Label)e.Row.FindControl("lblBusinessUseCaseName"); lblBusinessUseCaseName.Text = BusinessUseCaseTA.GetBusinessUseCaseName(int.Parse(lblBusinessUseCaseName.Text)).ToString(); if (!string.IsNullOrEmpty(FlowID.Text.Trim())) { AuthorizationDS.FlowParticipantConfigureDetailDataTable dt = AuthorizationBLL.GetFlowParticipantConfigureDetailByID(FlowID.Text); if (dt.Rows.Count > 0) { string User = string.Empty; foreach (AuthorizationDS.FlowParticipantConfigureDetailRow dr in dt) { User += dr.UserName + ","; } FlowID.Text = User.TrimEnd(','); } else { FlowID.Text = "所有人"; } } } }
protected void LogInBtn_Click(object sender, EventArgs e) { if (this.IsValid) { BusinessObjects.AuthorizationDS.StuffUserDataTable table = this.BLL.GetStuffUserByUserId(this.UserIdCtl.Text.Trim()); Session.Clear(); Session["StuffUser"] = table[0]; if (new AuthorizationBLL().GetProxyBusinessByProxyUserIDAndCurrentDate(table[0].StuffUserId, DateTime.Now).Count > 0) { this.Response.Redirect("~/BusinessProxySelect.aspx"); } else { AuthorizationDS.PositionDataTable positions = new AuthorizationBLL().GetPositionByStuffUser(table[0].StuffUserId); if (positions.Count > 1) { this.Response.Redirect("~/PositionSelect.aspx"); } else { this.Response.Redirect("~/Home.aspx"); } } } }
protected void Page_Load(object sender, EventArgs e) { //Response.Cache.SetCacheability(HttpCacheability.NoCache); //lwy added base.Page_Load(sender, e); if (!this.IsPostBack) { if (Request["refer"] == "sp") { AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; if (new AuthorizationBLL().GetProxyBusinessByProxyUserIDAndCurrentDate(stuffUser.StuffUserId, DateTime.Now).Count > 0) { this.Response.Redirect("~/BusinessProxySelect.aspx"); } else { AuthorizationDS.PositionDataTable positions = new AuthorizationBLL().GetPositionByStuffUser(stuffUser.StuffUserId); if (positions.Count > 1) { this.Response.Redirect("~/PositionSelect.aspx"); } else { this.Response.Redirect("~/Home.aspx"); } } } else { PageUtility.SetContentTitle(this, "首页"); this.Page.Title = "首页"; if (Session["ProxyStuffUserId"] != null) { int stuffuserID = ((AuthorizationDS.StuffUserRow)Session["StuffUser"]).StuffUserId; int proxyStuffuserID = int.Parse(Session["ProxyStuffUserId"].ToString()); this.odsMyDraft.SelectParameters["queryExpression"].DefaultValue = "StatusId=" + ((int)SystemEnums.FormStatus.Draft).ToString() + " AND Form.UserID=" + stuffuserID.ToString() + " AND ProxyUserID = " + proxyStuffuserID.ToString(); this.odsMySubmitted.SelectParameters["queryExpression"].DefaultValue = "StatusId>=" + ((int)SystemEnums.FormStatus.Awaiting).ToString() + " AND Form.UserID=" + stuffuserID.ToString() + " AND ProxyUserID = " + proxyStuffuserID.ToString(); } else { int stuffuserID = ((AuthorizationDS.StuffUserRow)Session["StuffUser"]).StuffUserId; this.odsMyDraft.SelectParameters["queryExpression"].DefaultValue = "StatusId=" + ((int)SystemEnums.FormStatus.Draft).ToString() + " AND Form.UserID=" + stuffuserID.ToString(); this.odsMySubmitted.SelectParameters["queryExpression"].DefaultValue = "StatusId>=" + ((int)SystemEnums.FormStatus.Awaiting).ToString() + " AND Form.UserId=" + stuffuserID.ToString(); this.odsMyAwaiting.SelectParameters["queryExpression"].DefaultValue = "charindex('P" + stuffuserID.ToString() + "P',InTurnUserIds)>0"; } } } }
protected void SelfOperateBtn_Click(object sender, EventArgs e) { AuthorizationDS.StuffUserRow staff = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; AuthorizationDS.PositionDataTable positions = new AuthorizationBLL().GetPositionByStuffUser(staff.StuffUserId); if (positions.Count > 1) { this.Response.Redirect("~/PositionSelect.aspx"); } else { this.Response.Redirect("~/Home.aspx"); } }
private void generaAddPendingRowToDt(ref DataTable dt, lib.APWorkFlow.NodeStatusRow drwfh, string regionCaption) { AuthorizationBLL auBLL = new AuthorizationBLL(); string approvalNames = auBLL.GetApprovalNamesByUserIds(DBNullConverter.ToStr(drwfh.PARTICIPANT)); DataRow dr = dt.NewRow(); dr["RegionCaption"] = regionCaption; dr["Approver"] = approvalNames; dr["FlowStatus"] = waitingStatus; dr["AuditDate"] = string.Empty; dr["Comment"] = null; dr["IsView"] = 0; dr["IsPending"] = 1; dt.Rows.Add(dr); }
private string GetApproveName(int stuffuserID, int positionID, bool isApprove) { AuthorizationBLL authorizationBLL = new AuthorizationBLL(); AuthorizationDS.StuffUserRow stuffuserDr = authorizationBLL.GetStuffUserById(stuffuserID); string stuffUserName = stuffuserDr.StuffName; AuthorizationDS.PositionRow PositionRow = new OUTreeBLL().GetPositionById(positionID); string positionName = PositionRow.PositionName; if (isApprove) { return(positionName + "[" + stuffUserName + "]"); } else { return(stuffUserName); } }
protected void Page_Load(object sender, EventArgs e) { //base.Page_Load(sender, e); if (!this.IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["extra"])) { string username = Request.QueryString["extra"]; if (username.IndexOf("\\") > -1) { username = username.Split('\\')[1].ToString(); } BusinessObjects.AuthorizationDS.StuffUserDataTable table = this.BLL.GetStuffUserByUserId(username); if (table.Count < 1) { this.odsMyAwaiting.SelectParameters["queryExpression"].DefaultValue = "1=2"; } else { AuthorizationDS.PositionDataTable positions = new AuthorizationBLL().GetPositionByStuffUser(table[0].StuffUserId); AuthorizationDS.StuffUserRow user = table[0]; Session.Clear(); Session["StuffUser"] = table[0]; if (positions != null && positions.Count >= 1) { this.Session["SelectedPosition"] = positions[0]; Session["Position"] = positions[0]; } int stuffuserID = table[0].StuffUserId; this.odsMyAwaiting.SelectParameters["queryExpression"].DefaultValue = "charindex('P" + stuffuserID.ToString() + "P',InTurnUserIds)>0"; } } else { this.odsMyAwaiting.SelectParameters["queryExpression"].DefaultValue = "1=2"; } } }
/// <summary> /// /// </summary> /// <returns></returns> /// <remarks></remarks> protected DataSet GetCheckWorkFlowData() { DataSet ds = new DataSet(); DataTable dt; //创建数据表 dt = new DataTable(); dt.Columns.Add(new DataColumn("RegionCaption", typeof(string))); dt.Columns.Add(new DataColumn("Approver", typeof(string))); dt.Columns.Add(new DataColumn("FlowStatus", typeof(string))); dt.Columns.Add(new DataColumn("AuditDate", typeof(string))); dt.Columns.Add(new DataColumn("Comment", typeof(string))); dt.Columns.Add(new DataColumn("IsView", typeof(int))); dt.Columns.Add(new DataColumn("IsPending", typeof(int))); dt.Columns.Add(new DataColumn("OnError", typeof(int))); dt.Columns.Add(new DataColumn("RejectReason", typeof(string))); dt.Columns.Add(new DataColumn("IsOutTime", typeof(int)));//是否超时 //HU APHelper AP = CommonUtility.GetAPHelper(Session); lib.APWorkFlow.NodeStatusDataTable APTable = AP.getApprovalStatus(this.ProcID); if (APTable == null) { return(ds); } AuthorizationBLL authorizationBLL = new AuthorizationBLL(); QueryDS.FormViewRow formRow = new FormQueryBLL().GetFormViewByID(this.FormID); AuthorizationDS.StuffUserRow stuffuserDr = authorizationBLL.GetStuffUserById(formRow.UserID); //创建节点,先创建申请节点 DataRow dr; dr = dt.NewRow(); dr["RegionCaption"] = strDraft; dr["Approver"] = stuffuserDr.StuffName; dr["AuditDate"] = formRow.SubmitDate.ToString("yyyy-MM-dd HH:mm"); dr["FlowStatus"] = submittedStatus; dr["Comment"] = string.Empty; dr["IsView"] = 0; dr["IsPending"] = 0; dr["OnError"] = 0; dr["IsOutTime"] = 0; dt.Rows.Add(dr); //再创建审批节点 foreach (lib.APWorkFlow.NodeStatusRow drwfh in APTable.Rows) { switch (DBNullConverter.ToStr(drwfh.STATUS)) { //case (int)SystemEnums.FlowNodeStatus.Wait: // generaAddPendingRowToDt(ref dt, drwfh, strApproving); // break; case APHelper.FlowNodeStatus.ONERROR: if (this.IsView) { generaAddErrorPendingRowToDt(ref dt, drwfh, strError); } else { generaAddErrorInTurnRowToDt(ref dt, drwfh, strError, errorStatus); } break; case APHelper.FlowNodeStatus.ASSIGNED: if (this.IsView) { generaAddPendingRowToDt(ref dt, drwfh, strApproving); } else { generaAddInTurnRowToDt(ref dt, drwfh, strApproving, approvedStatus); } //if (this.ViewState["CurrentApproveIndex"] == null) { // CurrentApproveIndex = int.Parse(drwfh["ApprovalIndex"].ToString()); // this.ViewState["CurrentApproveIndex"] = CurrentApproveIndex; //} else { // CurrentApproveIndex = int.Parse(this.ViewState["CurrentApproveIndex"].ToString()); //} break; case APHelper.FlowNodeStatus.APPROVED: generaAddRowToDt(ref dt, drwfh, strApproved, approvedStatus); break; case APHelper.FlowNodeStatus.CANCELLED: generaAddRowToDt(ref dt, drwfh, strReturnModify, rejectedStatus); break; default: break; } } for (int n = 0; n < dt.Rows.Count; n++) { DataRow dr1 = dt.Rows[n]; DataRow dr2 = dt.Rows[n + 1];//后一个节点 if (string.IsNullOrEmpty(dr2["AuditDate"].ToString())) { dr2["AuditDate"] = DateTime.Now.ToString(); } TimeSpan ts = Convert.ToDateTime(dr2["AuditDate"]) - Convert.ToDateTime(dr1["AuditDate"]); if (ts.Days >= 2) { dr2["IsOutTime"] = 1; } else { dr2["IsOutTime"] = 0; } if (n + 1 == dt.Rows.Count - 1) { break; } } ds.Tables.Add(dt); return(ds); }
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.MaterialApplyBLL.GetFormByID(formID)[0]; FormDS.FormMaterialRow rowFormMaterial = this.MaterialApplyBLL.GetFormMaterialByID(formID)[0]; 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(); ERS.ShopRow shop = new MasterDataBLL().GetShopByID(rowFormMaterial.ShopID); this.CustomerNameCtl.Text = new MasterDataBLL().GetCustomerById(shop.CustomerID).CustomerName; this.ShopNameCtl.Text = shop.ShopName; this.FirstVolumeCtl.Text = rowFormMaterial.FirstVolume.ToString("N"); this.SecondVolumeCtl.Text = rowFormMaterial.SecondVolume.ToString("N"); this.ThirdVolumeCtl.Text = rowFormMaterial.ThirdVolume.ToString("N"); this.AverageVolumeCtl.Text = rowFormMaterial.AverageVolume.ToString("N"); this.RemarkCtl.Text = rowFormMaterial.Remark; this.odsMaterialDetails.SelectParameters["FormMaterialID"].DefaultValue = rowFormMaterial.FormMaterialID.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 && ((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.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; 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) { PageUtility.SetContentTitle(this.Page, "预算调拨审批"); this.Page.Title = "预算调拨审批"; int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; FormDS.FormRow rowForm = this.BudgetAllocationApplyBLL.GetFormByID(formID)[0]; FormDS.FormBudgetAllocationRow rowBudgetAllocation = this.BudgetAllocationApplyBLL.GetFormBudgetAllocationByID(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.RemarkCtl.Text = rowBudgetAllocation.Remark; this.odsBudgetAllocationInDetails.SelectParameters["FormBudgetAllocationID"].DefaultValue = rowBudgetAllocation.FormBudgetAllocationID.ToString(); this.odsBudgetAllocationOutDetails.SelectParameters["FormBudgetAllocationID"].DefaultValue = rowBudgetAllocation.FormBudgetAllocationID.ToString(); //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = new BudgetAllocationApplyBLL().GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/OtherForm/BudgetAllocationApproval.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.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.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.SalesApplyBLL.GetFormByID(formID)[0]; FormDS.FormApplyRow rowFormApply = this.SalesApplyBLL.GetFormApplyByID(formID)[0]; 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(); this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToString("yyyy-MM"); this.EndPeriodCtl.Text = rowFormApply.EndPeriod.ToString("yyyy-MM"); MasterDataBLL masterBll = new MasterDataBLL(); this.ExpenseSubCategoryCtl.Text = masterBll.GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID); ERS.CustomerRow customer = masterBll.GetCustomerById(rowFormApply.CustomerID); this.CustomerNameCtl.Text = customer.CustomerName; //this.CustomerTypeCtl.Text = masterBll.GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName; this.ShopNameCtl.Text = masterBll.GetShopByID(rowFormApply.ShopID).ShopName; this.PaymentTypeCtl.Text = masterBll.GetPaymentTypeById(rowFormApply.PaymentTypeID).PaymentTypeName; if (!rowFormApply.IsContractNoNull()) { this.ContractNoCtl.Text = rowFormApply.ContractNo; } this.AmountCtl.Text = rowFormApply.Amount.ToString("N"); if (!rowFormApply.IsRemarkNull()) { this.RemarkCtl.Text = rowFormApply.Remark; } if (!rowFormApply.IsAttachedFileNameNull()) { this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName; } if (!rowFormApply.IsRealAttachedFileNameNull()) { this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName; } if (!rowFormApply.IsPromotionBeginDateNull()) { this.PromotionBeginCtl.Text = rowFormApply.PromotionBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsPromotionEndDateNull()) { this.PromotionEndCtl.Text = rowFormApply.PromotionEndDate.ToString("yyyy-MM-dd"); } this.PromotionScopeCtl.Text = masterBll.GetPromotionScopeById(rowFormApply.PromotionScopeID).PromotionScopeName; this.PromotionTypeCtl.Text = masterBll.GetPromotionTypeById(rowFormApply.PromotionTypeID).PromotionTypeName; if (!rowFormApply.IsPromotionDescNull()) { this.PromotionDescCtl.Text = rowFormApply.PromotionDesc; } this.ShelfTypeCtl.Text = masterBll.GetShelfTypeById(rowFormApply.ShelfTypeID).ShelfTypeName; if (!rowFormApply.IsFirstVolumeNull()) { this.FirstVolumeCtl.Text = rowFormApply.FirstVolume.ToString(); } if (!rowFormApply.IsSecondVolumeNull()) { this.SecondVolumeCtl.Text = rowFormApply.SecondVolume.ToString(); } if (!rowFormApply.IsThirdVolumeNull()) { this.ThirdVolumeCtl.Text = rowFormApply.ThirdVolume.ToString(); } if (!rowFormApply.IsAverageVolumeNull()) { this.AverageVolumeCtl.Text = rowFormApply.AverageVolume.ToString(); } if (!rowFormApply.IsEstimatedSaleVolumeNull()) { this.txtEstimatedSaleVolume.Text = rowFormApply.EstimatedSaleVolume.ToString(); } if (!rowFormApply.IsPackageUnitPriceNull()) { this.txtPackageUnitPrice.Text = rowFormApply.PackageUnitPrice.ToString("N"); } if (!rowFormApply.IsFormApplyNameNull()) { this.txtFormApplyName.Text = rowFormApply.FormApplyName; } //查看预算信息按钮 this.btnViewBudget.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/ReportManage/SalesBudgetByPosition.aspx?ShowDialog=1','', 'dialogWidth:1035px;dialogHeight:660px;resizable:yes;')"; //预算信息 this.CustomerBudgetCtl.Text = rowFormApply.CustomerBudget.ToString("N"); this.CustomerBudgetRemainCtl.Text = rowFormApply.CustomerBudgetRemain.ToString("N"); this.OUBudgetCtl.Text = rowFormApply.OUBudget.ToString("N"); this.OUApprovedAmountCtl.Text = rowFormApply.OUAppovedAmount.ToString("N"); this.OUApprovingAmountCtl.Text = rowFormApply.OUApprovingAmount.ToString("N"); this.OUCompletedAmountCtl.Text = rowFormApply.OUCompletedAmount.ToString("N"); this.OUReimbursedAmountCtl.Text = rowFormApply.OUReimbursedAmount.ToString("N"); this.OUBudgetRemainCtl.Text = rowFormApply.OUBudgetRemain.ToString("N"); this.OUBudgetRateCtl.Text = ((decimal)(rowFormApply.OUBudgetRate * 100)).ToString("N") + "%"; AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; this.ViewState["StuffUserID"] = stuffUser.StuffUserId; //是否显示关闭按钮,如果没有执行完成的话那么不能关闭 this.CloseBtn.Visible = false; if ((!rowFormApply.IsClose) && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) { if (stuffUser.StuffUserId == rowForm.UserID || new MasterDataBLL().GetProxyReimburseByParameter(rowForm.UserID, stuffUser.StuffUserId, rowForm.SubmitDate).Count > 0) { if (!rowFormApply.IsIsCompleteNull()) { if (rowFormApply.IsComplete) { this.CloseBtn.Visible = true; } } } } //是否显示复制按钮 if (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted && stuffUser.StuffUserId == rowForm.UserID) { this.UCBeginPeriod.Visible = true; this.UCEndPeriod.Visible = true; this.lblSignal.Visible = true; this.CopyBtn.Visible = true; } else { this.UCBeginPeriod.Visible = false; this.UCEndPeriod.Visible = false; this.lblSignal.Visible = false; this.CopyBtn.Visible = false; } //是否显示打印信息 if (((stuffUser.StuffUserId == rowForm.UserID || base.IsBusinessProxy(rowForm.UserID, rowForm.SubmitDate) && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) || (rowForm.StatusID == (int)SystemEnums.FormStatus.Scrap && rowFormApply.IsAutoSplit))) { this.PrintBtn.Visible = true; } else { this.PrintBtn.Visible = false; } if (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted || (rowForm.StatusID == (int)SystemEnums.FormStatus.Scrap && rowFormApply.IsAutoSplit)) { this.PrintInfor.Visible = true; int printCount = rowFormApply.IsPrintCountNull() ? 0 : rowFormApply.PrintCount; this.PrintInfor.Text = "该方案已经被打印" + printCount + "次"; } else { this.PrintInfor.Visible = false; } //如果是弹出,取消按钮不可见 if (this.Request["ShowDialog"] != null) { if (this.Request["ShowDialog"].ToString() == "1") { this.upButton.Visible = false; this.PrintInfor.Visible = false; this.PrintBtn.Visible = false; this.Master.FindControl("divMenu").Visible = false; this.Master.FindControl("tbCurrentPage").Visible = false; } } //如果是申请人则隐藏预算信息 if (stuffUser.StuffUserId == rowForm.UserID) { this.OUBudgetCtl.Text = ""; this.OUApprovedAmountCtl.Text = ""; this.OUApprovingAmountCtl.Text = ""; this.OUCompletedAmountCtl.Text = ""; this.OUReimbursedAmountCtl.Text = ""; this.OUBudgetRemainCtl.Text = ""; this.OUBudgetRateCtl.Text = ""; this.btnViewBudget.Visible = false; } //处理执行确认内容 if (!rowFormApply.IsConfirmCompleteDateNull()) { ConfirmCompleteDateCtl.Text = rowFormApply.ConfirmCompleteDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsAccruedPeriodNull()) { AccruedPeriodCtl.Text = rowFormApply.AccruedPeriod.ToString("yyyy-MM"); } //如果是申请人并且没有执行确认,实际费用才可以编辑 this.ViewState["ExecuteReadOnly"] = true; if (!rowFormApply.IsIsCompleteNull()) { if (!rowFormApply.IsComplete && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) { if (rowForm.UserID == stuffUser.StuffUserId || new MasterDataBLL().GetProxyReimburseByParameter(rowForm.UserID, stuffUser.StuffUserId, rowForm.SubmitDate).Count > 0) { this.ViewState["ExecuteReadOnly"] = false; this.AccrudePeriodSignal.Visible = true; this.PeriodDDL.Visible = true; this.ExecuteConfirmBtn.Visible = true; this.ExecuteCancelBtn.Visible = true; } } } //分摊比例 new FormApplySplitRateTableAdapter().FillByApplyID(InnerDS.FormApplySplitRate, formID); if (InnerDS.FormApplySplitRate != null && InnerDS.FormApplySplitRate.Count > 0) { this.divSplitRate.Visible = true; this.gvSplitRate.Visible = true; this.gvSplitRate.DataSource = InnerDS.FormApplySplitRate; this.gvSplitRate.DataBind(); } } //明细信息 FormApplyDetailViewTableAdapter taDetail = new FormApplyDetailViewTableAdapter(); taDetail.FillByFormID(this.InnerDS.FormApplyDetailView, (int)this.ViewState["ObjectId"]); FormApplyExpenseDetailTableAdapter taExpense = new FormApplyExpenseDetailTableAdapter(); taExpense.FillByFormApplyID(this.InnerDS.FormApplyExpenseDetail, (int)this.ViewState["ObjectId"]); this.cwfAppCheck.FormID = (int)this.ViewState["ObjectId"]; this.cwfAppCheck.ProcID = this.ViewState["ProcID"].ToString(); }
//传递数据 protected void FlowParticipantDetail_ObjectCreated(object sender, ObjectDataSourceEventArgs e) { AuthorizationBLL bll = (AuthorizationBLL)e.ObjectInstance; bll.ApproverCookieDS = this.InnerDS; }
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.SalesApplyBLL.GetFormByID(formID)[0]; FormDS.FormApplyRow rowFormApply = this.SalesApplyBLL.GetFormApplyByID(formID)[0]; 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(); this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToShortDateString(); this.EndPeriodCtl.Text = rowFormApply.EndPeriod.ToShortDateString(); MasterDataBLL masterBll = new MasterDataBLL(); this.ExpenseSubCategoryCtl.Text = masterBll.GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID); ERS.CustomerRow customer = masterBll.GetCustomerById(rowFormApply.CustomerID); this.CustomerNameCtl.Text = customer.CustomerName; this.CustomerTypeCtl.Text = masterBll.GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName; this.ShopNameCtl.Text = masterBll.GetShopByID(rowFormApply.ShopID).ShopName; this.PaymentTypeCtl.Text = masterBll.GetPaymentTypeById(rowFormApply.PaymentTypeID).PaymentTypeName; if (!rowFormApply.IsContractNoNull()) { this.ContractNoCtl.Text = rowFormApply.ContractNo; } this.AmountCtl.Text = rowFormApply.Amount.ToString("N"); if (!rowFormApply.IsRemarkNull()) { this.RemarkCtl.Text = rowFormApply.Remark; } if (!rowFormApply.IsAttachedFileNameNull()) { this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName; } if (!rowFormApply.IsRealAttachedFileNameNull()) { this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName; } //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = new SalesApplyBLL().GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/SalesForm/SalesRebateApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //查看预算信息按钮 this.btnViewBudget.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/ReportManage/SalesFeeByPosition.aspx?ShowDialog=1','', 'dialogWidth:918px;dialogHeight:660px;resizable:yes;')"; //预算信息 this.CustomerBudgetCtl.Text = rowFormApply.CustomerBudget.ToString("N"); this.CustomerBudgetRemainCtl.Text = rowFormApply.CustomerBudgetRemain.ToString("N"); this.OUBudgetCtl.Text = rowFormApply.OUBudget.ToString("N"); this.OUApprovedAmountCtl.Text = rowFormApply.OUAppovedAmount.ToString("N"); this.OUApprovingAmountCtl.Text = rowFormApply.OUApprovingAmount.ToString("N"); this.OUCompletedAmountCtl.Text = rowFormApply.OUCompletedAmount.ToString("N"); this.OUReimbursedAmountCtl.Text = rowFormApply.OUReimbursedAmount.ToString("N"); this.OUBudgetRemainCtl.Text = rowFormApply.OUBudgetRemain.ToString("N"); this.OUBudgetRateCtl.Text = ((decimal)(rowFormApply.OUBudgetRate * 100)).ToString("N") + "%"; this.odsApplyDetails.SelectParameters["FormID"].DefaultValue = rowFormApply.FormApplyID.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 ((!rowFormApply.IsClose) && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) { if (stuffUser.StuffUserId == rowForm.UserID || new MasterDataBLL().GetProxyReimburseByParameter(rowForm.UserID, stuffUser.StuffUserId, rowForm.SubmitDate).Count > 0) { this.CloseBtn.Visible = true; } else { this.CloseBtn.Visible = false; } } else { this.CloseBtn.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; } } //如果是申请人则隐藏预算信息 if (stuffUser.StuffUserId == rowForm.UserID) { this.OUBudgetCtl.Text = ""; this.OUApprovedAmountCtl.Text = ""; this.OUApprovingAmountCtl.Text = ""; this.OUCompletedAmountCtl.Text = ""; this.OUReimbursedAmountCtl.Text = ""; this.OUBudgetRemainCtl.Text = ""; this.OUBudgetRateCtl.Text = ""; this.btnViewBudget.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.SalesApplyBLL.GetFormByID(formID)[0]; FormDS.FormApplyRow rowFormApply = this.SalesApplyBLL.GetFormApplyByID(formID)[0]; 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(); this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToString("yyyy-MM"); this.EndPeriodCtl.Text = rowFormApply.EndPeriod.ToString("yyyy-MM"); MasterDataBLL masterBll = new MasterDataBLL(); this.ExpenseSubCategoryCtl.Text = masterBll.GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID); ERS.CustomerRow customer = masterBll.GetCustomerById(rowFormApply.CustomerID); this.CustomerNameCtl.Text = customer.CustomerName; //this.CustomerTypeCtl.Text = masterBll.GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName; this.ShopNameCtl.Text = masterBll.GetShopByID(rowFormApply.ShopID).ShopName; this.PaymentTypeCtl.Text = masterBll.GetPaymentTypeById(rowFormApply.PaymentTypeID).PaymentTypeName; if (!rowFormApply.IsContractNoNull()) { this.ContractNoCtl.Text = rowFormApply.ContractNo; } this.AmountCtl.Text = rowFormApply.Amount.ToString("N"); if (!rowFormApply.IsRemarkNull()) { this.RemarkCtl.Text = rowFormApply.Remark; } if (!rowFormApply.IsAttachedFileNameNull()) { this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName; } if (!rowFormApply.IsRealAttachedFileNameNull()) { this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName; } if (!rowFormApply.IsPromotionBeginDateNull()) { this.PromotionBeginCtl.Text = rowFormApply.PromotionBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsPromotionEndDateNull()) { this.PromotionEndCtl.Text = rowFormApply.PromotionEndDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsDeliveryBeginDateNull()) { this.DeliveryBeginCtl.Text = rowFormApply.DeliveryBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsDeliveryEndDateNull()) { this.DeliveryEndCtl.Text = rowFormApply.DeliveryEndDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsFormApplyNameNull()) { this.txtFormApplyName.Text = rowFormApply.FormApplyName; } this.PromotionScopeCtl.Text = masterBll.GetPromotionScopeById(rowFormApply.PromotionScopeID).PromotionScopeName; this.PromotionTypeCtl.Text = masterBll.GetPromotionTypeById(rowFormApply.PromotionTypeID).PromotionTypeName; if (!rowFormApply.IsPromotionDescNull()) { this.PromotionDescCtl.Text = rowFormApply.PromotionDesc; } this.ShelfTypeCtl.Text = masterBll.GetShelfTypeById(rowFormApply.ShelfTypeID).ShelfTypeName; if (!rowFormApply.IsFirstVolumeNull()) { this.FirstVolumeCtl.Text = rowFormApply.FirstVolume.ToString(); } if (!rowFormApply.IsSecondVolumeNull()) { this.SecondVolumeCtl.Text = rowFormApply.SecondVolume.ToString(); } if (!rowFormApply.IsThirdVolumeNull()) { this.ThirdVolumeCtl.Text = rowFormApply.ThirdVolume.ToString(); } if (!rowFormApply.IsAverageVolumeNull()) { this.AverageVolumeCtl.Text = rowFormApply.AverageVolume.ToString(); } if (!rowFormApply.IsReimburseRequirementsNull()) { int ReimburseRequirement = rowFormApply.ReimburseRequirements; if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Picture) == (int)SystemEnums.ReimburseRequirements.Picture) { chkListReimburseRequirements.Items[0].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Agreement) == (int)SystemEnums.ReimburseRequirements.Agreement) { chkListReimburseRequirements.Items[1].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DeliveryOrder) == (int)SystemEnums.ReimburseRequirements.DeliveryOrder) { chkListReimburseRequirements.Items[2].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Contract) == (int)SystemEnums.ReimburseRequirements.Contract) { chkListReimburseRequirements.Items[3].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DM) == (int)SystemEnums.ReimburseRequirements.DM) { chkListReimburseRequirements.Items[4].Selected = true; } if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Other) == (int)SystemEnums.ReimburseRequirements.Other) { chkListReimburseRequirements.Items[5].Selected = true; } } //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = new SalesApplyBLL().GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/SalesForm/SalesGeneralApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //查看预算信息按钮 this.btnViewBudget.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/ReportManage/SalesBudgetByPosition.aspx?ShowDialog=1','', 'dialogWidth:918px;dialogHeight:660px;resizable:yes;')"; //预算信息 this.CustomerBudgetCtl.Text = rowFormApply.CustomerBudget.ToString("N"); this.CustomerBudgetRemainCtl.Text = rowFormApply.CustomerBudgetRemain.ToString("N"); this.OUBudgetCtl.Text = rowFormApply.OUBudget.ToString("N"); this.OUApprovedAmountCtl.Text = rowFormApply.OUAppovedAmount.ToString("N"); this.OUApprovingAmountCtl.Text = rowFormApply.OUApprovingAmount.ToString("N"); this.OUCompletedAmountCtl.Text = rowFormApply.OUCompletedAmount.ToString("N"); this.OUReimbursedAmountCtl.Text = rowFormApply.OUReimbursedAmount.ToString("N"); this.OUBudgetRemainCtl.Text = rowFormApply.OUBudgetRemain.ToString("N"); this.OUBudgetRateCtl.Text = ((decimal)(rowFormApply.OUBudgetRate * 100)).ToString("N") + "%"; this.odsSKU.SelectParameters["FormApplyID"].DefaultValue = rowFormApply.FormApplyID.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.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted && stuffUser.StuffUserId == rowForm.UserID) { this.UCBeginPeriod.Visible = true; this.UCEndPeriod.Visible = true; this.lblSignal.Visible = true; this.CopyBtn.Visible = true; } else { this.UCBeginPeriod.Visible = false; this.UCEndPeriod.Visible = false; this.lblSignal.Visible = false; this.CopyBtn.Visible = false; } //是否显示打印信息 if (((stuffUser.StuffUserId == rowForm.UserID || base.IsBusinessProxy(rowForm.UserID, rowForm.SubmitDate) && (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) || rowForm.StatusID == (int)SystemEnums.FormStatus.Scrap && rowFormApply.IsAutoSplit))) { this.PrintBtn.Visible = true; } else { this.PrintBtn.Visible = false; } if (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted || (rowForm.StatusID == (int)SystemEnums.FormStatus.Scrap && rowFormApply.IsAutoSplit)) { this.PrintInfor.Visible = true; int printCount = rowFormApply.IsPrintCountNull() ? 0 : rowFormApply.PrintCount; this.PrintInfor.Text = "该方案已经被打印" + printCount + "次"; } else { this.PrintInfor.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.PrintInfor.Visible = false; this.PrintBtn.Visible = false; } } //如果是申请人则隐藏预算信息 if (stuffUser.StuffUserId == rowForm.UserID) { this.OUBudgetCtl.Text = ""; this.OUApprovedAmountCtl.Text = ""; this.OUApprovingAmountCtl.Text = ""; this.OUCompletedAmountCtl.Text = ""; this.OUReimbursedAmountCtl.Text = ""; this.OUBudgetRemainCtl.Text = ""; this.OUBudgetRateCtl.Text = ""; this.btnViewBudget.Visible = false; } //分摊比例 new FormApplySplitRateTableAdapter().FillByApplyID(InnerDS.FormApplySplitRate, formID); if (InnerDS.FormApplySplitRate != null && InnerDS.FormApplySplitRate.Count > 0) { this.divSplitRate.Visible = true; this.gvSplitRate.Visible = true; this.gvSplitRate.DataSource = InnerDS.FormApplySplitRate; this.gvSplitRate.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) { Response.Cache.SetCacheability(HttpCacheability.NoCache); //lwy, migrate from mainpage if (Session["StuffUser"] == null) { this.NavigateMenu.Visible = false; return; } if (!IsPostBack) { AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; if (Session["ProxyStuffUserId"] != null) { this.Session["Position"] = new OUTreeBLL().GetPositionById((int)Session["PositionId"]); this.Session["StuffUser"] = new StuffUserBLL().GetStuffUserById((int)Session["StuffUserId"])[0]; List <string> useRootItems = new List <string>(); useRootItems.Add(" 申请与报销"); //useRootItems.Add("个人费用报销申请"); //useRootItems.Add("出差申请"); //useRootItems.Add("出差报销申请"); this.CustomizeNavigateMenu(); List <MenuItem> noUseRootItems = new List <MenuItem>(); foreach (MenuItem rootItem in this.NavigateMenu.Items) { if (!useRootItems.Contains(rootItem.Text)) { noUseRootItems.Add(rootItem); } } foreach (MenuItem noUseRootItem in noUseRootItems) { this.NavigateMenu.Items.Remove(noUseRootItem); } this.CustomizeNavigateMenu(); } else { AuthorizationBLL bll = new AuthorizationBLL(); AuthorizationDS.PositionDataTable positions = bll.GetPositionByStuffUser(stuffUser.StuffUserId); if (positions.Count == 0) { PageUtility.ShowModelDlg(this.Page, "没有设置职务,请联系系统管理员"); this.Response.Redirect("~/ErrorPage/NoPositionErrorPage.aspx"); return; } this.PositionSelectCtl.Items.Clear(); foreach (AuthorizationDS.PositionRow position in positions) { this.PositionSelectCtl.Items.Add(new ListItem(position.PositionName, position.PositionId.ToString())); } if (positions.Count > 0) { this.PositionSelectCtl.Visible = true; this.PositionSelectLabel.Visible = true; } if (this.Session["SelectedPosition"] == null) { int currentPositionId = int.Parse(this.PositionSelectCtl.SelectedValue); Session["Position"] = new OUTreeBLL().GetPositionById(currentPositionId); } else { Session["Position"] = Session["SelectedPosition"]; this.PositionSelectCtl.SelectedValue = ((AuthorizationDS.PositionRow)Session["Position"]).PositionId.ToString(); } if (Session["Position"] == null) { int currentPositionId = int.Parse(this.PositionSelectCtl.SelectedValue); Session["Position"] = new OUTreeBLL().GetPositionById(currentPositionId); } else { this.PositionSelectCtl.SelectedValue = ((AuthorizationDS.PositionRow)Session["Position"]).PositionId.ToString(); } } AuthorizationDS.StuffUserRow user = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; this.StuffNameCtl.Text = user.StuffName; this.LastLogInTimeCtl.Text = user.IsLaterLogInTimeNull() ? "" : user.LaterLogInTime.ToShortDateString(); } this.CustomizeNavigateMenu(); }
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.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.odsInvoice.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 (!rowFormReimburse.IsPaymentDateNull()) { this.txtPaymentDate.Text = rowFormReimburse.PaymentDate.ToString("yyyy-MM-dd"); this.ucPaymentDate.SelectedDate = rowFormReimburse.PaymentDate.ToString("yyyy-MM-dd"); } AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow) this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); if (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted && positionRightBLL.CheckPositionRight(position.PositionId, (int)SystemEnums.OperateEnum.Other + (int)SystemEnums.BusinessUseCase.FormReimburse)) { this.txtPaymentDate.Visible = false; this.ucPaymentDate.Visible = true; this.btnSavePaymentInfo.Visible = true; } //历史单据 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"] + "/SalesForm/ReimburseMoneyApproval.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.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) { 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"]; }