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 (!this.IsPostBack) { PageUtility.SetContentTitle(this, "渠道类型管理"); this.Page.Title = "渠道类型管理"; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.ChannelType, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.ChannelType, 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) { String title = this.GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this, title); this.Page.Title = title; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.MarketingProject, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.MarketingProject, 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, System.EventArgs e) { PageUtility.SetContentTitle(this, "���۲�������"); this.Page.Title = "���۲�������"; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.SalesReimburseRateReport, 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 opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.ReimbursePeriod, 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; } } }
protected void Page_Load(object sender, System.EventArgs e) { String title = this.GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this, title); this.Page.Title = title; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.ReportHQ_ByRegionbyCity, 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 = "��֯��������"; //��ʼ������ʾ������֯�ṹ 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 (!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 (!this.IsPostBack) { String title = this.GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this, title); this.Page.Title = title; int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.UseCase.OperateScope, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.UseCase.OperateScope, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow)this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); bool hasViewRight = positionRightBLL.CheckPositionRight(position.PositionId, opViewId); HasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); if (!hasViewRight && !HasManageRight) { Response.Redirect("~/ErrorPage/NoRightErrorPage.aspx"); return; } if (!HasManageRight) { this.SetScopeBtn.Visible = false; } OUTreeUtility.InitOUTree(this.PositionTreeView,true,false, false,false,true,false); OUTreeUtility.InitOUTree(this.ScopeTreeView,false, true, true, true, true,false); } }
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) { String title = GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this.Page, title); this.Page.Title = title; int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; FormDS.FormRow rowForm = this.FormTEBLL.GetFormByID(formID)[0]; FormDS.FormPersonalReimburseRow rowPersonalReimburse = this.FormTEBLL.GetFormPersonalReimburseByID(formID)[0]; if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } //对控件进行赋值 this.txtFormNo.Text = rowForm.FormNo; this.ApplyDateCtl.Text = rowForm.SubmitDate.ToShortDateString(); AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID); this.StuffNameCtl.Text = CommonUtility.GetStaffFullName(applicant); this.ViewState["StaffLevelID"] = applicant.StaffLevelID; 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.StuffNoCtl.Text = applicant.IsStuffNoNull() ? "" : applicant.StuffNo; this.txtPeriod.Text = rowPersonalReimburse.Period.ToString("yyyyMM"); this.RemarkCtl.Text = rowPersonalReimburse.IsRemarkNull() ? "" : rowPersonalReimburse.Remark; this.txtTotalBudget.Text = rowPersonalReimburse.TotalBudget.ToString(); this.txtApprovedAmount.Text = rowPersonalReimburse.ApprovedAmount.ToString(); this.txtApprovingAmount.Text = rowPersonalReimburse.ApprovingAmount.ToString(); this.txtRemainAmount.Text = rowPersonalReimburse.RemainAmount.ToString(); if (!rowPersonalReimburse.IsAttachedFileNameNull()) this.UCFileUpload.AttachmentFileName = rowPersonalReimburse.AttachedFileName; if (!rowPersonalReimburse.IsRealAttachedFileNameNull()) this.UCFileUpload.RealAttachmentFileName = rowPersonalReimburse.RealAttachedFileName; AuthorizationDS.StuffUserRow thisStaff = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; if (thisStaff.StuffUserId == rowForm.UserID) { this.budgetTitleDIV.Visible = false; this.budgetDIV.Visible = false; } this.odsPersonalReimburseDetails.SelectParameters["FormPersonalReimburseID"].DefaultValue = rowPersonalReimburse.FormPersonalReimburseID.ToString(); //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = this.FormTEBLL.GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/FormTE/FormPersonalReimburseApproval.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.Master.FindControl("divMenu").Visible = false; this.Master.FindControl("tbCurrentPage").Visible = false; } } //判断财务摘要的显示问题 if (!rowForm.IsFinanceRemarkNull()) { this.FinanceRemarkCtl.Text = rowForm.FinanceRemark; } int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FinanceRemark, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FinanceRemark, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow ViewerPosition = (AuthorizationDS.PositionRow)this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); bool HasViewRight = positionRightBLL.CheckPositionRight(ViewerPosition.PositionId, opViewId); bool HasManageRight = positionRightBLL.CheckPositionRight(ViewerPosition.PositionId, opManageId); //如果没有权限则隐藏 if (!HasViewRight && !HasManageRight) { this.FinanceRemarkTitleDIV.Visible = false; this.FinanceRemarkDIV.Visible = false; this.SaveBtn.Visible = false; } //如果没有填写的权限或者已经导出锁定了,则隐藏保存按钮 if (HasViewRight && (!HasManageRight || (!rowForm.IsIsExportLockNull() && rowForm.IsExportLock))) { this.FinanceRemarkCtl.ReadOnly = true; this.SaveBtn.Visible = false; } //如果不是审批中或者审批完成不能修改 if(rowForm.StatusID != 1 && rowForm.StatusID != 2){ this.FinanceRemarkCtl.ReadOnly = true; this.SaveBtn.Visible = false; } //修改费用期间 int opModifyPeriodId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.PeriodModify, SystemEnums.OperateEnum.Manage); bool HasModifyPeriodRight = positionRightBLL.CheckPositionRight(ViewerPosition.PositionId, opModifyPeriodId); if ((rowForm.StatusID == 1 || rowForm.StatusID == 2) && HasModifyPeriodRight) { this.UCNewPeriod.Visible = true; this.ModifyPeriodBtn.Visible = true; } else { this.UCNewPeriod.Visible = false; this.ModifyPeriodBtn.Visible = false; } //单据打印 this.ucPrint.FormID = rowForm.FormID; } 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) { AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow)this.Session["Position"]; base.Page_Load(sender, e); if (!this.IsPostBack) { String title = this.GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this.Page, title); MasterDataBLL mdBLL = new MasterDataBLL(); int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; FormDS.FormRow rowForm = this.FormSaleBLL.GetFormByID(formID)[0]; FormDS.FormSaleApplyRow rowFormApply = this.FormSaleBLL.GetFormSaleApplyByID(formID)[0]; if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } this.FormNoCtl.Text = rowForm.FormNo; AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID); this.StuffNameCtl.Text = CommonUtility.GetStaffFullName(applicant); 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.StuffNoCtl.Text = applicant.IsStuffNoNull() ? "" : applicant.StuffNo; this.AttendDateCtl.Text = applicant.AttendDate.ToShortDateString(); this.PeriodCtl.Text = rowFormApply.FPeriod.ToString("yyyy-MM"); MasterData.CustomerRow customer = new CustomerTableAdapter().GetDataByID(rowFormApply.CustomerID)[0]; this.txtCustomerCode.Text = customer.CustomerNo; this.CustomerNameCtl.Text = customer.CustomerName; this.CustomerChannelCtl.Text = new CustomerChannelTableAdapter().GetDataByID(customer.CustomerChannelID)[0].CustomerChannelName; this.KATypeCtl.Text = customer.IsKaTypeNull() ? "" : customer.KaType; this.CustomerRegionCtl.Text = new CustomerRegionTableAdapter().GetDataByID(customer.CustomerRegionID)[0].CustomerRegionName; this.CityCtl.Text = customer.City; this.BrandCtl.Text = new BrandTableAdapter().GetDataByID(rowFormApply.BrandID)[0].BrandName; MasterData.ExpenseSubCategoryRow rowExpenseSubCategory = mdBLL.GetExpenseSubCategoryById(rowFormApply.ExpenseSubCategoryID); this.ExpenseCategoryCtl.Text = mdBLL.GetExpenseCategoryById(rowExpenseSubCategory.ExpenseCategoryID).ExpenseCategoryName; this.ExpenseSubCategoryCtl.Text = rowExpenseSubCategory.ExpenseSubCategoryName; this.CurrencyCtl.Text = new CurrencyTableAdapter().GetDataByID(rowFormApply.CurrencyID)[0].CurrencyShortName; this.ExchangeRateCtl.Text = rowFormApply.ExchangeRate.ToString(); this.ShopNameCtl.Text = rowFormApply.IsShopNameNull() ? "" : rowFormApply.ShopName; this.ShopCountCtl.Text = rowFormApply.IsShopCountNull() ? "" : rowFormApply.ShopCount.ToString(); this.ProjectNameCtl.Text = rowFormApply.IsProjectNameNull() ? "" : rowFormApply.ProjectName; this.CostCenterCtl.Text = CommonUtility.GetMAACostCenterFullName(rowForm.CostCenterID); //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = this.FormSaleBLL.GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/SampleRequest/SaleSampleRequestApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } this.ProjectDescCtl.Text = rowFormApply.IsProjectDescNull() ? "" : rowFormApply.ProjectDesc; if (!rowFormApply.IsApplyFileNameNull()) this.UCFileUpload.AttachmentFileName = rowFormApply.ApplyFileName; if (!rowFormApply.IsApplyRealFileNameNull()) this.UCFileUpload.RealAttachmentFileName = rowFormApply.ApplyRealFileName; if (!rowFormApply.IsActivityBeginDateNull()) { this.ActivityBeginCtl.Text = rowFormApply.ActivityBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsActivityEndDateNull()) { this.ActivityEndCtl.Text = rowFormApply.ActivityEndDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsExpectDeliveryDateNull()) { this.txtExpectDeliveryDate.Text = rowFormApply.ExpectDeliveryDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsDeliveryAddressNull()) { this.txtDeliveryAddress.Text = rowFormApply.DeliveryAddress; } this.TotalBudgetCtl.Text = rowFormApply.TotalBudget.ToString("N"); this.ApprovedAmountCtl.Text = rowFormApply.ApprovedAmount.ToString("N"); this.ApprovingAmountCtl.Text = rowFormApply.ApprovingAmount.ToString("N"); this.CompletedAmountCtl.Text = rowFormApply.CompletedAmount.ToString("N"); this.ReimbursedAmountCtl.Text = rowFormApply.ReimbursedAmount.ToString("N"); this.RemainBudgetCtl.Text = rowFormApply.RemainBudget.ToString("N"); //明细 this.odsDetails.SelectParameters["FormSaleApplyID"].DefaultValue = rowFormApply.FormSaleApplyID.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 (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 (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) { this.IsVisible = ""; } else { this.IsVisible = "none"; } FormDS.FormDeliveryGoodsDataTable tbDelivery = new FormSaleBLL().GetFormDeliveryGoodByFormID(formID); if (tbDelivery.Count > 0) { this.gvDeliveryInfo.DataSource = tbDelivery; this.gvDeliveryInfo.DataBind(); } else { this.divDeliveryInfo.Visible = false; this.gvDeliveryInfo.Visible = false; } //是否显示报销完成按钮 this.CloseBtn.Visible = false; if ((!rowFormApply.IsClose) && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) { if (stuffUser.StuffUserId == rowForm.UserID || new AuthorizationBLL().GetProxyReimburseByParameter(rowForm.UserID, stuffUser.StuffUserId, rowForm.SubmitDate).Count > 0) { this.CloseBtn.Visible = true; } } //发货完成按钮权限 int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.DeliveryComplete, SystemEnums.OperateEnum.Other); PositionRightBLL positionRightBLL = new PositionRightBLL(); bool hasManageRight = positionRightBLL.CheckPositionRight(position.PositionId, opManageId); if (hasManageRight && (rowFormApply.IsIsDeliveryCompleteNull() || rowFormApply.IsDeliveryComplete == false)) { this.DeliveryCompleteBtn.Visible = true; } else { this.DeliveryCompleteBtn.Visible = false; } } //查看预算权限 int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.ViewBudget, SystemEnums.OperateEnum.Manage); bool HasManageRight = new PositionRightBLL().CheckPositionRight(position.PositionId, opViewId); this.divBudgetInfo.Visible = HasManageRight; this.divBudgetInfoTitle.Visible = HasManageRight; //流程控件赋值 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]; //�������û��������ɵĻ����Dz���¼����߲鿴������Ϣ�� 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"]; }
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(!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) { String title = this.GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this.Page, title); MasterDataBLL mdBLL = new MasterDataBLL(); int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; FormDS.FormSalePaymentRow rowFormPayment = this.FormSaleBLL.GetFormSalePaymentByID(int.Parse(this.ViewState["ObjectId"].ToString())); FormDS.FormRow rowForm = this.FormSaleBLL.GetFormByID(formID)[0]; if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } this.FormNoCtl.Text = rowForm.FormNo; AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID); this.StuffNameCtl.Text = CommonUtility.GetStaffFullName(applicant); 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.StuffNoCtl.Text = applicant.IsStuffNoNull() ? "" : applicant.StuffNo; this.AttendDateCtl.Text = applicant.AttendDate.ToShortDateString(); this.ApplyFormNoCtl.Text = this.FormSaleBLL.GetFormByID(rowFormPayment.FormSaleApplyID)[0].FormNo; FormDS.FormSaleApplyRow rowFormApply = this.FormSaleBLL.GetFormSaleApplyByID(rowFormPayment.FormSaleApplyID)[0]; this.PeriodCtl.Text = rowFormApply.FPeriod.ToString("yyyy-MM"); MasterData.CustomerRow customer = mdBLL.GetCustomerById(rowFormApply.CustomerID)[0]; this.CustomerNameCtl.Text = customer.CustomerName; this.CustomerChannelCtl.Text = mdBLL.GetCustomerChannelById(customer.CustomerChannelID)[0].CustomerChannelName; this.KATypeCtl.Text = customer.IsKaTypeNull() ? "" : customer.KaType; this.CustomerRegionCtl.Text = mdBLL.GetCustomerRegionById(customer.CustomerRegionID).CustomerRegionName; this.CityCtl.Text = customer.City; this.BrandCtl.Text = mdBLL.GetBrandById(rowFormApply.BrandID)[0].BrandName; MasterData.ExpenseSubCategoryRow rowExpenseSubCategory = mdBLL.GetExpenseSubCategoryById(rowFormApply.ExpenseSubCategoryID); this.ExpenseCategoryCtl.Text = mdBLL.GetExpenseCategoryById(rowExpenseSubCategory.ExpenseCategoryID).ExpenseCategoryName; this.ExpenseSubCategoryCtl.Text = rowExpenseSubCategory.ExpenseSubCategoryName; this.CurrencyCtl.Text = mdBLL.GetCurrencyByID(rowFormApply.CurrencyID).CurrencyShortName; this.ExchangeRateCtl.Text = rowFormApply.ExchangeRate.ToString(); this.ShopNameCtl.Text = rowFormApply.IsShopNameNull() ? "" : rowFormApply.ShopName; this.ShopCountCtl.Text = rowFormApply.IsShopCountNull() ? "" : rowFormApply.ShopCount.ToString(); this.ProjectNameCtl.Text = rowFormApply.IsProjectNameNull() ? "" : rowFormApply.ProjectName; this.CostCenterCtl.Text = CommonUtility.GetMAACostCenterFullName(rowForm.CostCenterID); if (!rowFormApply.IsActivityBeginDateNull()) { this.ActivityBeginCtl.Text = rowFormApply.ActivityBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsActivityEndDateNull()) { this.ActivityEndCtl.Text = rowFormApply.ActivityEndDate.ToString("yyyy-MM-dd"); } this.ProjectDescCtl.Text = rowFormApply.IsProjectDescNull() ? "" : rowFormApply.ProjectDesc; if (!rowFormApply.IsApplyFileNameNull()) this.UCFileUpload.AttachmentFileName = rowFormApply.ApplyFileName; if (!rowFormApply.IsApplyRealFileNameNull()) this.UCFileUpload.RealAttachmentFileName = rowFormApply.ApplyRealFileName; if (!rowFormPayment.IsRemarkNull()) { this.RemarkCtl.Text = rowFormPayment.Remark; } if (!rowFormPayment.IsAttachedFileNameNull()) { this.UCPaymentFile.AttachmentFileName = rowFormPayment.AttachedFileName; } if (!rowFormPayment.IsRealAttachedFileNameNull()) { this.UCPaymentFile.RealAttachmentFileName = rowFormPayment.RealAttachedFileName; } this.InvoiceStatusCtl.Text = new InvoiceStatusTableAdapter().GetDataByID(rowFormPayment.InvoiceStatusID)[0].Name; if (!rowFormPayment.IsVendorIDNull()) { MasterData.VendorRow vendor = mdBLL.GetVendorByID(rowFormPayment.VendorID); this.VendorCtl.Text = vendor.VendorName + "-" + vendor.VendorCode; } this.txtVatType.Text = mdBLL.GetVatTypeById(rowFormPayment.VatTypeID)[0].VatTypeName; //PO if (!rowFormPayment.IsFormPOIDNull()) { FormDS.FormRow rowFormPO = this.FormSaleBLL.GetFormByID(rowFormPayment.FormPOID)[0]; this.hlPO.Text = rowFormPO.FormNo; this.hlPO.NavigateUrl = CommonUtility.GetPOPostBackUrl(rowFormPO.FormID); } else { this.hlPO.Text = "无"; } //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = this.FormSaleBLL.GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/FormSale/NoActivityAdvancedPaymentApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //明细 this.odsInvoice.SelectParameters["FormID"].DefaultValue = rowFormPayment.FormSalePaymentID.ToString(); this.odsPaymentDetails.SelectParameters["FormSalePaymentID"].DefaultValue = rowFormPayment.FormSalePaymentID.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 (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 (!rowForm.IsFinanceRemarkNull()) { this.FinanceRemarkCtl.Text = rowForm.FinanceRemark; } int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FinanceRemark, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FinanceRemark, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow ViewerPosition = (AuthorizationDS.PositionRow)this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); bool HasViewRight = positionRightBLL.CheckPositionRight(ViewerPosition.PositionId, opViewId); bool HasManageRight = positionRightBLL.CheckPositionRight(ViewerPosition.PositionId, opManageId); //如果没有权限则隐藏 if (!HasViewRight && !HasManageRight) { this.FinanceRemarkTitleDIV.Visible = false; this.FinanceRemarkDIV.Visible = false; this.SaveBtn.Visible = false; } //如果没有填写的权限或者已经填写了,则隐藏保存按钮 if (HasViewRight && (!HasManageRight || !rowForm.IsFinanceRemarkNull())) { this.FinanceRemarkCtl.ReadOnly = true; this.SaveBtn.Visible = false; } //如果不是审批中或者审批完成不能修改 if (rowForm.StatusID != 1 && rowForm.StatusID != 2) { this.FinanceRemarkCtl.ReadOnly = true; this.SaveBtn.Visible = false; } } this.cwfAppCheck.FormID = (int)this.ViewState["ObjectId"]; this.cwfAppCheck.ProcID = this.ViewState["ProcID"].ToString(); this.cwfAppCheck.IsView = (bool)this.ViewState["IsView"]; }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { String title = this.GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this.Page, title); MasterDataBLL mdBLL = new MasterDataBLL(); int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; PurchaseDS.FormRow rowForm = this.FormPurchaseBLL.GetFormByID(formID)[0]; PurchaseDS.FormPVRow rowFormPV = this.FormPurchaseBLL.GetFormPVByID(formID); if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } this.FormNoCtl.Text = rowForm.FormNo; AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID); this.StuffNameCtl.Text = CommonUtility.GetStaffFullName(applicant); 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.StuffNoCtl.Text = applicant.IsStuffNoNull() ? "" : applicant.StuffNo; this.AttendDateCtl.Text = applicant.AttendDate.ToShortDateString(); MasterData.VendorRow vendor = new VendorTableAdapter().GetDataByID(rowFormPV.VendorID)[0]; this.VendorCodeCtl.Text = vendor.VendorCode; this.VendorNameCtl.Text = vendor.VendorName; this.VendorAddressCtl.Text = vendor.VendorAddress; this.ItemCategoryCtl.Text = new ItemCategoryTableAdapter().GetDataByID(rowFormPV.ItemCategoryID)[0].ItemCategoryName; this.CurrencyCtl.Text = new CurrencyTableAdapter().GetDataByID(rowFormPV.CurrencyID)[0].CurrencyShortName; this.ExchangeRateCtl.Text = rowFormPV.ExchangeRate.ToString(); this.PeriodCtl.Text = rowFormPV.FPeriod.ToString("yyyy-MM"); this.PurchaseBudgetTypeCtl.Text = new PurchaseBudgetTypeTableAdapter().GetDataByID(rowFormPV.PurchaseBudgetTypeID)[0].PurchaseBudgetTypeName; this.PurchaseTypeCtl.Text = new PurchaseTypeTableAdapter().GetDataByID(rowFormPV.PurchaseTypeID)[0].PurchaseTypeName; MasterData.MethodPaymentRow MethodPayment = new MasterDataBLL().GetMethodPaymentById(rowFormPV.MethodPaymentID)[0]; this.MethodPaymentCtl.Text = MethodPayment.MethodPaymentName + "-" + MethodPayment.Description; this.ExpectPaymentDateCtl.Text = rowFormPV.ExpectPaymentDate.ToString("yyyy-MM-dd"); this.IsUrgentCtl.Text = rowFormPV.IsUrgent ? "Yes" : "No"; this.IsPublicCtl.Text = rowFormPV.IsPublic ? "Yes" : "No"; this.InvoiceStatusCtl.Text = new InvoiceStatusTableAdapter().GetDataByID(rowFormPV.InvoiceStatusID)[0].Name; this.VATRateCtl.Text = new MasterDataBLL().GetVatTypeById(rowFormPV.VatRateID)[0].VatTypeName; this.AMTTaxCtl.Text = rowFormPV.AMTTax.ToString("N"); //payment term label名称 if (!rowFormPV.IsIsPTChangedNull() && rowFormPV.IsPTChanged) { this.Form_PaymentTerms.Text = Resources.Common.Form_PaymentTerms + "(Changed)"; this.Form_PaymentTerms.ForeColor = System.Drawing.Color.Red; } else { this.Form_PaymentTerms.Text = Resources.Common.Form_PaymentTerms; } this.PaymentTermCtl.Text = rowFormPV.PaymentTerms; this.PaymentAmountCtl.Text = rowForm.IsPaymentAmountNull() ? "" : rowForm.PaymentAmount.ToString("N"); this.PaymentDateCtl.Text = rowForm.IsPaymentDateNull() ? "" : rowForm.PaymentDate.ToShortDateString(); //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { PurchaseDS.FormRow rejectedForm = this.FormPurchaseBLL.GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/FormPurchase/PVSpecialApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } this.RemarkCtl.Text = rowFormPV.IsRemarkNull() ? "" : rowFormPV.Remark; if (!rowFormPV.IsAttachedFileNameNull()) this.UCFileUpload.AttachmentFileName = rowFormPV.AttachedFileName; if (!rowFormPV.IsRealAttachedFileNameNull()) this.UCFileUpload.RealAttachmentFileName = rowFormPV.RealAttachedFileName; //发票明细 this.odsInvoice.SelectParameters["FormID"].DefaultValue = rowFormPV.FormPVID.ToString(); this.odsDetails.SelectParameters["FormPVID"].DefaultValue = rowFormPV.FormPVID.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 (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 (rowFormPV.InvoiceStatusID != (int)SystemEnums.InvoiceStatus.Yes && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) { this.odsInvoiceReverse.SelectParameters["FormID"].DefaultValue = rowForm.FormID.ToString(); if (((AuthorizationDS.StuffUserRow)Session["StuffUser"]).StuffUserId != rowForm.UserID) { this.fvInvoiceReverse.Visible = false; } } else { this.reverseDIV.Visible = false; this.upReverse.Visible = false; } this.ViewState["ApplicantID"] = rowForm.UserID; int opInvoiceReverseManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.InvoiceReverse, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow ViewerPosition = (AuthorizationDS.PositionRow)this.Session["Position"]; this.HasApproveRight = new PositionRightBLL().CheckPositionRight(ViewerPosition.PositionId, opInvoiceReverseManageId); //判断财务摘要的显示问题 if (!rowForm.IsFinanceRemarkNull()) { this.FinanceRemarkCtl.Text = rowForm.FinanceRemark; } this.UCItemCategory.ItemCategoryID = rowFormPV.FinalItemCategoryID.ToString(); int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FinanceRemark, SystemEnums.OperateEnum.View); int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.FinanceRemark, SystemEnums.OperateEnum.Manage); PositionRightBLL positionRightBLL = new PositionRightBLL(); bool HasViewRight = positionRightBLL.CheckPositionRight(ViewerPosition.PositionId, opViewId); bool HasManageRight = positionRightBLL.CheckPositionRight(ViewerPosition.PositionId, opManageId); //如果没有权限则隐藏 if (!HasViewRight && !HasManageRight) { this.FinanceRemarkTitleDIV.Visible = false; this.FinanceRemarkDIV.Visible = false; this.SaveBtn.Visible = false; this.UCItemCategory.IsVisible = "display:none"; } //如果没有填写的权限或者已经导出锁定了,则隐藏保存按钮 if (HasViewRight && (!HasManageRight || (!rowForm.IsIsExportLockNull() && rowForm.IsExportLock))) { this.FinanceRemarkCtl.ReadOnly = true; this.SaveBtn.Visible = false; this.UCItemCategory.IsVisible = "display:none"; } //如果不是审批中或者审批完成不能修改 if (rowForm.StatusID != 1 && rowForm.StatusID != 2) { this.FinanceRemarkCtl.ReadOnly = true; this.SaveBtn.Visible = false; this.UCItemCategory.IsVisible = "display:none"; } //单据打印 this.ucPrint.FormID = rowForm.FormID; } 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, "�ŵ���Ϣ����"); 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) { 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)"); }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { String title = this.GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this.Page, title); MasterDataBLL mdBLL = new MasterDataBLL(); int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; FormDS.FormSalePaymentRow rowFormPayment = this.FormSaleBLL.GetFormSalePaymentByID(int.Parse(this.ViewState["ObjectId"].ToString())); FormDS.FormRow rowForm = this.FormSaleBLL.GetFormByID(formID)[0]; if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } this.FormNoCtl.Text = rowForm.FormNo; AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID); this.StuffNameCtl.Text = CommonUtility.GetStaffFullName(applicant); 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(); FormDS.FormSaleSettlementRow rowFormSettlement = this.FormSaleBLL.GetFormSaleSettlementByID(rowFormPayment.FormSaleSettlementID); FormDS.FormRow settlementForm = this.FormSaleBLL.GetFormByID(rowFormPayment.FormSaleSettlementID)[0]; MasterData.CustomerRow customer = mdBLL.GetCustomerById(rowFormSettlement.CustomerID)[0]; this.CustomerNameCtl.Text = customer.CustomerName; this.CustomerChannelCtl.Text = mdBLL.GetCustomerChannelById(customer.CustomerChannelID)[0].CustomerChannelName; this.CustomerRegionCtl.Text = mdBLL.GetCustomerRegionById(customer.CustomerRegionID).CustomerRegionName; this.CityCtl.Text = customer.City; this.BrandCtl.Text = mdBLL.GetBrandById(rowFormSettlement.BrandID)[0].BrandName; MasterData.ExpenseSubCategoryRow rowExpenseSubCategory = mdBLL.GetExpenseSubCategoryById(rowFormSettlement.ExpenseSubCategoryID); this.ExpenseCategoryCtl.Text = mdBLL.GetExpenseCategoryById(rowExpenseSubCategory.ExpenseCategoryID).ExpenseCategoryName; this.ExpenseSubCategoryCtl.Text = rowExpenseSubCategory.ExpenseSubCategoryName; this.CurrencyCtl.Text = mdBLL.GetCurrencyByID(rowFormSettlement.CurrencyID).CurrencyShortName; this.CostCenterCtl.Text = CommonUtility.GetMAACostCenterFullName(rowForm.CostCenterID); this.SettlementRemarkCtl.Text = rowFormSettlement.IsRemarkNull() ? "" : rowFormSettlement.Remark; if (!rowFormSettlement.IsAttachedFileNameNull()) this.UCSettlementFile.AttachmentFileName = rowFormSettlement.AttachedFileName; if (!rowFormSettlement.IsRealAttachedFileNameNull()) this.UCSettlementFile.RealAttachmentFileName = rowFormSettlement.RealAttachedFileName; if (!rowFormPayment.IsRemarkNull()) { this.RemarkCtl.Text = rowFormPayment.Remark; } if (!rowFormPayment.IsAttachedFileNameNull()) { this.UCPaymentFile.AttachmentFileName = rowFormPayment.AttachedFileName; } if (!rowFormPayment.IsRealAttachedFileNameNull()) { this.UCPaymentFile.RealAttachmentFileName = rowFormPayment.RealAttachedFileName; } this.PaymentTypeCtl.Text = new MasterDataBLL().GetPaymentTypeById(rowFormPayment.PaymentTypeID).PaymentTypeName; if (!rowFormPayment.IsVendorIDNull()) { MasterData.VendorRow vendor = new MasterDataBLL().GetVendorByID(rowFormPayment.VendorID); this.VendorCtl.Text = vendor.VendorName + "-" + vendor.VendorCode; } this.SettlementFormNoCtl.Text = settlementForm.FormNo; this.SettlementFormNoCtl.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/FormSale/SettlementApproval.aspx?ShowDialog=1&ObjectId=" + rowFormPayment.FormSaleSettlementID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { FormDS.FormRow rejectedForm = this.FormSaleBLL.GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/FormSale/PaymentFreeGoodsApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //费用合计信息 ApplyAmountRMBCtl.Text = rowFormSettlement.IsApplyAmountRMBNull() ? "" : rowFormSettlement.ApplyAmountRMB.ToString(); ForecastOrderAmountCtl.Text = rowFormSettlement.IsForecastOrderAmountNull() ? "" : rowFormSettlement.ForecastOrderAmount.ToString(); CostBenefitRateCtl.Text = rowFormSettlement.IsCostBenefitRateNull() ? "" : rowFormSettlement.CostBenefitRate.ToString(); AmountRMBCtl.Text = rowFormSettlement.AmountRMB.ToString(); ActualOrderAmountCtl.Text = rowFormSettlement.IsActualOrderAmountNull() ? "" : rowFormSettlement.ActualOrderAmount.ToString(); ActualCostBenefitRateCtl.Text = rowFormSettlement.IsActualCostBenefitRateNull() ? "" : rowFormSettlement.ActualCostBenefitRate.ToString(); //判断是Activity还是NoActivity,如果NoActivity那么需要隐藏 if (settlementForm.PageType == (int)SystemEnums.PageType.NoActivitySettlementApply) { this.FeeSumTR.Visible = false; this.SKUDiv.Visible = false; this.gvSKUDetails.Visible = false; } //明细 this.odsFreeGoods.SelectParameters["FormSalePaymentID"].DefaultValue = rowFormPayment.FormSalePaymentID.ToString(); this.odsSKUDetails.SelectParameters["FormSaleSettlementID"].DefaultValue = rowFormPayment.FormSaleSettlementID.ToString(); this.odsPaymentDetails.SelectParameters["FormSalePaymentID"].DefaultValue = rowFormPayment.FormSalePaymentID.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 (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.ucPrint.FormID = rowForm.FormID; FormDS.FormDeliveryGoodsDataTable tbDelivery= new FormSaleBLL().GetFormDeliveryGoodByFormID(formID); if (tbDelivery.Count > 0) { this.gvDeliveryInfo.DataSource = tbDelivery; this.gvDeliveryInfo.DataBind(); } else { this.divDeliveryInfo.Visible = false; this.gvDeliveryInfo.Visible = false; } //发货完成按钮权限 int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.DeliveryComplete, SystemEnums.OperateEnum.Other); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow)this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); if (positionRightBLL.CheckPositionRight(position.PositionId, opManageId) && (rowFormPayment.IsIsDeliveryCompleteNull() || rowFormPayment.IsDeliveryComplete == false)) { this.DeliveryCompleteBtn.Visible = false; } } this.cwfAppCheck.FormID = (int)this.ViewState["ObjectId"]; this.cwfAppCheck.ProcID = this.ViewState["ProcID"].ToString(); this.cwfAppCheck.IsView = (bool)this.ViewState["IsView"]; }
protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!this.IsPostBack) { String title = this.GetLocalResourceObject("titleLabel.Text").ToString(); PageUtility.SetContentTitle(this.Page, title); int formID = int.Parse(Request["ObjectId"]); this.ViewState["ObjectId"] = formID; PurchaseDS.FormRow rowForm = this.FormVendorBLL.GetFormByID(formID)[0]; PurchaseDS.FormVendorRow rowForVendor = this.FormVendorBLL.GetFormVendorByID(formID)[0]; if (rowForm.IsProcIDNull()) { ViewState["ProcID"] = ""; } else { ViewState["ProcID"] = rowForm.ProcID; } this.FormNoCtl.Text = rowForm.FormNo; AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID); this.StuffNameCtl.Text = CommonUtility.GetStaffFullName(applicant); 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.StuffNoCtl.Text = applicant.IsStuffNoNull() ? "" : applicant.StuffNo; this.AttendDateCtl.Text = applicant.AttendDate.ToShortDateString(); //历史单据 if (rowForm.IsRejectedFormIDNull()) { lblRejectFormNo.Text = "无"; } else { PurchaseDS.FormRow rejectedForm = this.FormVendorBLL.GetFormByID(rowForm.RejectedFormID)[0]; this.lblRejectFormNo.Text = rejectedForm.FormNo; this.lblRejectFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/FormPurchase/FormVendorApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } PurchaseDS.FormVendorRow FormVendorTR = FormVendorBLL.GetFormVendorByID(formID)[0]; if (!FormVendorTR.IsVendorNameNull()) { txtVendorName.Text = FormVendorTR.VendorName; } if (!FormVendorTR.IsVendorAddressNull()) { txtVendorAddress.Text = FormVendorTR.VendorAddress; } if (!FormVendorTR.IsCityNull()) { txtCity.Text = FormVendorTR.City; } if (!FormVendorTR.IsPostalNull()) { txtPostal.Text = FormVendorTR.Postal; } if (!FormVendorTR.IsContactNameNull()) { txtContactName.Text = FormVendorTR.ContactName; } MasterDataBLL masterDataBLL = new MasterDataBLL(); if (!FormVendorTR.IsVendorTypeIDNull()) { this.VendorTypeControl.VendorTypeID = FormVendorTR.VendorTypeID.ToString(); MasterData.VendorTypeRow VendorTypeRow = masterDataBLL.GetVendorTypeById(FormVendorTR.VendorTypeID); txtCurrency.Text = masterDataBLL.GetCurrencyByID(VendorTypeRow.CurrencyID).CurrencyFullName; txtCompany.Text = masterDataBLL.GetCompanyById(VendorTypeRow.CompanyID).CompanyName; txtCompanyCode.Text = masterDataBLL.GetCompanyById(VendorTypeRow.CompanyID).CompanyCode; } if (!FormVendorTR.IsPhoneNumberNull()) { this.txtPhoneNumber.Text = FormVendorTR.PhoneNumber; } if (!FormVendorTR.IsOneTimeVendorNull()) { this.txtOneTimeVendor.Text = FormVendorTR.OneTimeVendor ? "Y" : "N"; } if (!FormVendorTR.IsHoldVendorNull()) { this.txtHoldVendor.Text = FormVendorTR.HoldVendor ? "Y" : "N"; } if (!FormVendorTR.IsPurchaseingPostalCodeNull()) { this.txtPurchaseingPostalCode.Text = FormVendorTR.PurchaseingPostalCode; } if (!FormVendorTR.IsAlphaSearchKeyNull()) { this.txtAlphaSearchKey.Text = FormVendorTR.AlphaSearchKey; } if (!FormVendorTR.IsPurchasingCityNull()) { this.txtPurchasingCity.Text = FormVendorTR.PurchasingCity; } if (!FormVendorTR.IsPurchasingContactNull()) { this.txtPurchasingContact.Text = FormVendorTR.PurchasingContact; } if (!FormVendorTR.IsPurchasingAddressNull()) { this.txtPurchasingAddress.Text = FormVendorTR.PurchasingAddress; } if (!FormVendorTR.IsPurchasePhoneNumberNull()) { this.txtPurchasePhoneNumber.Text = FormVendorTR.PurchasePhoneNumber; } if (!FormVendorTR.IsBankCodeNull()) { this.txtBankCode.Text = FormVendorTR.BankCode; } if (!FormVendorTR.IsMethodPaymentIDNull()) { this.txtMethodPayment.Text = masterDataBLL.GetMethodPaymentById(FormVendorTR.MethodPaymentID)[0].MethodPaymentName; } if (!FormVendorTR.IsPaymentTermIDNull()) { this.txtPaymentTerm.Text = masterDataBLL.GetPaymentTermById(FormVendorTR.PaymentTermID)[0].PaymentTermName; } if (!FormVendorTR.IsTransTypeIDNull()) { this.txtTransType.Text = masterDataBLL.GetTransTypeById(FormVendorTR.TransTypeID)[0].TransTypeName; } if (!FormVendorTR.IsVATTypeIDNull()) { txtVATRate.Text = masterDataBLL.GetVatTypeById(FormVendorTR.VATTypeID)[0].VatTypeName; } if (!FormVendorTR.IsBankNameNull()) { txtBankName.Text = FormVendorTR.BankName.ToString(); } if (!FormVendorTR.IsAccountNoNull()) { txtAccountNo.Text = FormVendorTR.AccountNo; } if (!FormVendorTR.IsBankNoNull()) { this.txtBankNo.Text = FormVendorTR.BankNo; } if (!FormVendorTR.IsACTypeIDNull()) { this.txtACType.Text = masterDataBLL.GetACTypeById(FormVendorTR.ACTypeID)[0].ACTypeName; } if (!FormVendorTR.IsAttachmentFileNameNull()) { this.UCFileUpload.AttachmentFileName = FormVendorTR.AttachmentFileName; this.UCFileUpload.RealAttachmentFileName = FormVendorTR.RealAttachmentFileName; } if (!FormVendorTR.IsModifyReasonNull()) { this.txtModifyReason.Text = FormVendorTR.ModifyReason; } if (!FormVendorTR.IsRemarkNull()) { this.txtRemark.Text = FormVendorTR.Remark; } //通过判断FormVendor有没有VendorID,判断是新增还是修改Vendor if (!FormVendorTR.IsVendorIDNull()) { this.ViewState["VendorID"] = FormVendorTR.VendorID; } if (FormVendorTR.ActionType != (int)SystemEnums.VendorActionType.Add) { this.trModifyReason.Visible = true; } //是新增还是修改 this.ViewState["ActionType"] = FormVendorTR.ActionType; this.txtActionType.Text = CommonUtility.GetVendorActionTypeName(FormVendorTR.ActionType); //Vendor if (!FormVendorTR.IsVendorIDNull()) { hlVendor.Text = new MasterDataBLL().GetVendorByID(FormVendorTR.VendorID).VendorCode; hlVendor.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/Dialog/VendorDetail.aspx?ShowDialog=1&VendorID=" + FormVendorTR.VendorID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } else { hlVendor.Text = "无"; } //审批页面处理&按钮处理 AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; this.ViewState["StuffUserID"] = stuffUser.StuffUserId; if (rowForm.InTurnUserIds.Contains("P" + stuffUser.StuffUserId + "P")) { this.SubmitBtn.Visible = true; this.cwfAppCheck.IsView = false; this.ViewState["IsView"] = false; } else { this.SubmitBtn.Visible = false; this.cwfAppCheck.IsView = true; this.ViewState["IsView"] = true; } if (rowForm.StatusID == (int)SystemEnums.FormStatus.Rejected && stuffUser.StuffUserId == rowForm.UserID) { this.EditBtn.Visible = true; this.ScrapBtn.Visible = true; } else { this.EditBtn.Visible = false; this.ScrapBtn.Visible = false; } //如果是弹出,取消按钮不可见 if (this.Request["ShowDialog"] != null) { if (this.Request["ShowDialog"].ToString() == "1") { this.upButton.Visible = false; this.Master.FindControl("divMenu").Visible = false; this.Master.FindControl("tbCurrentPage").Visible = false; } } //是否有修改VendorType的权限 int opManageId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.VendorTypeModify, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow)this.Session["Position"]; PositionRightBLL positionRightBLL = new PositionRightBLL(); if (rowForm.StatusID == (int)SystemEnums.FormStatus.Awaiting && positionRightBLL.CheckPositionRight(position.PositionId, opManageId)) { this.VendorTypeControl.IsVisible = "inline"; this.btnSave.Visible = true; } else { this.VendorTypeControl.IsVisible = "none"; this.btnSave.Visible = false; } } this.cwfAppCheck.FormID = (int)this.ViewState["ObjectId"]; this.cwfAppCheck.ProcID = this.ViewState["ProcID"].ToString(); this.cwfAppCheck.IsView = (bool)this.ViewState["IsView"]; }