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); // 用户信息,职位信息 AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"]; AuthorizationDS.PositionRow rowUserPosition = (AuthorizationDS.PositionRow)Session["Position"]; this.ViewState["StuffUserID"] = stuffUser.StuffUserId; this.ViewState["PositionID"] = rowUserPosition.PositionId; this.StuffNameCtl.Text = CommonUtility.GetStaffFullName(stuffUser); this.PositionNameCtl.Text = rowUserPosition.PositionName; this.DepartmentNameCtl.Text = new OUTreeBLL().GetOrganizationUnitById(rowUserPosition.OrganizationUnitId).OrganizationUnitName; this.ViewState["DepartmentID"] = rowUserPosition.OrganizationUnitId; this.AttendDateCtl.Text = stuffUser.AttendDate.ToShortDateString(); if (this.Request["RejectObjectID"] != null) { this.ViewState["RejectedObjectID"] = int.Parse(this.Request["RejectObjectID"].ToString()); } //如果是草稿进行赋值 int formApplyID; if (Request["ObjectId"] != null) { this.ViewState["ObjectId"] = int.Parse(Request["ObjectId"]); FormDS.FormSalePaymentRow rowFormPayment = this.FormSaleBLL.GetFormSalePaymentByID(int.Parse(this.ViewState["ObjectId"].ToString())); formApplyID = rowFormPayment.FormSaleApplyID; this.ViewState["FormSaleApplyID"] = formApplyID; if (this.Request["RejectObjectID"] == null) { this.DeleteBtn.Visible = true; } else { this.DeleteBtn.Visible = false; } //赋值备注等 this.InvoiceStatusDDL.SelectedValue = rowFormPayment.InvoiceStatusID.ToString(); if (!rowFormPayment.IsRemarkNull()) { this.RemarkCtl.Text = rowFormPayment.Remark; } if (!rowFormPayment.IsAttachedFileNameNull()) { this.UCPaymentFile.AttachmentFileName = rowFormPayment.AttachedFileName; } if (!rowFormPayment.IsRealAttachedFileNameNull()) { this.UCPaymentFile.RealAttachmentFileName = rowFormPayment.RealAttachedFileName; } if (!rowFormPayment.IsVendorIDNull()) { this.UCVendor.VendorID = rowFormPayment.VendorID.ToString(); } if (!rowFormPayment.IsVatTypeIDNull()) { this.VATTypeDDL.SelectedValue = rowFormPayment.VatTypeID.ToString(); } new FormSalePaymentDetailTableAdapter().FillCurrentDataForAdvanced(this.InnerDS.FormSalePaymentDetail, rowFormPayment.FormSalePaymentID, rowFormPayment.FormSaleApplyID); new FormInvoiceTableAdapter().FillByFormID(this.InnerDS.FormInvoice, rowFormPayment.FormSalePaymentID); } else { this.DeleteBtn.Visible = false; formApplyID = int.Parse(Request["FormSaleApplyID"]); this.ViewState["FormSaleApplyID"] = formApplyID; new FormSalePaymentDetailTableAdapter().FillByFormSaleApplyID(this.InnerDS.FormSalePaymentDetail, formApplyID); } MasterDataBLL mdBLL = new MasterDataBLL(); this.FormNoCtl.Text = this.FormSaleBLL.GetFormByID(formApplyID)[0].FormNo; FormDS.FormSaleApplyRow rowFormApply = this.FormSaleBLL.GetFormSaleApplyByID(formApplyID)[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.ViewState["CostCenterID"] = this.FormSaleBLL.GetFormByID(formApplyID)[0].CostCenterID; this.CostCenterCtl.Text = CommonUtility.GetMAACostCenterFullName(int.Parse(this.ViewState["CostCenterID"].ToString())); this.ProjectDescCtl.Text = rowFormApply.IsProjectDescNull() ? "" : rowFormApply.ProjectDesc; if (!rowFormApply.IsApplyFileNameNull()) this.UCFileUpload.AttachmentFileName = rowFormApply.ApplyFileName; if (!rowFormApply.IsApplyRealFileNameNull()) this.UCFileUpload.RealAttachmentFileName = rowFormApply.ApplyRealFileName; //促销信息 this.DisplayTypeCtl.Text = mdBLL.GetDisplayTypeById(rowFormApply.DisplayTypeID).DisplayTypeName; this.DisplayAreaCtl.Text = rowFormApply.IsDisplayAreaNull() ? "" : rowFormApply.DisplayArea.ToString(); this.IsDMCtl.Text = rowFormApply.IsDM ? "Yes" : "No"; this.DiscountTypeCtl.Text = mdBLL.GetDiscountTypeById(rowFormApply.DiscountTypeID).DiscountTypeName; 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.IsDeliveryBeginDateNull()) { this.DeliveryBeginCtl.Text = rowFormApply.DeliveryBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsDeliveryEndDateNull()) { this.DeliveryEndCtl.Text = rowFormApply.DeliveryEndDate.ToString("yyyy-MM-dd"); } //明细 this.odsSKUDetails.SelectParameters["FormSaleApplyID"].DefaultValue = this.ViewState["FormSaleApplyID"].ToString(); } }
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.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 = mdBLL.GetCustomerById(rowFormApply.CustomerID)[0]; this.txtCustomerNo.Text = customer.CustomerNo; 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 (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/ActivityApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //结案单编号 int SaleSettlementID = this.FormSaleBLL.GetValidSaleSettlementIDBySaleApplyID(formID); if (SaleSettlementID == 0) { this.hlSettlementFormNo.Text = "未结案"; } else { FormDS.FormRow settledForm = this.FormSaleBLL.GetFormByID(SaleSettlementID)[0]; this.hlSettlementFormNo.Text = settledForm.FormNo; this.hlSettlementFormNo.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/FormSale/SettlementApproval.aspx?ShowDialog=1&ObjectId=" + settledForm.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; //促销信息 this.DisplayTypeCtl.Text = mdBLL.GetDisplayTypeById(rowFormApply.DisplayTypeID).DisplayTypeName; this.DisplayAreaCtl.Text = rowFormApply.IsDisplayAreaNull() ? "" : rowFormApply.DisplayArea.ToString(); this.IsDMCtl.Text = rowFormApply.IsDM ? "Yes" : "No"; this.DiscountTypeCtl.Text = mdBLL.GetDiscountTypeById(rowFormApply.DiscountTypeID).DiscountTypeName; 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.IsDeliveryBeginDateNull()) { this.DeliveryBeginCtl.Text = rowFormApply.DeliveryBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsDeliveryEndDateNull()) { this.DeliveryEndCtl.Text = rowFormApply.DeliveryEndDate.ToString("yyyy-MM-dd"); } 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.odsSKUDetails.SelectParameters["FormSaleApplyID"].DefaultValue = rowFormApply.FormSaleApplyID.ToString(); this.odsExpenseDetails.SelectParameters["FormSaleApplyID"].DefaultValue = rowFormApply.FormSaleApplyID.ToString(); //费用统计信息 if (!rowFormApply.IsPriceDiscountAmountRMBNull()) { this.PriceDiscountAmountRMBCtl.Text = rowFormApply.PriceDiscountAmountRMB.ToString("N"); } if (!rowFormApply.IsOtherAmountRMBNull()) { this.OtherAmountRMBCtl.Text = rowFormApply.OtherAmountRMB.ToString("N"); } this.AmountRMBCtl.Text = rowFormApply.AmountRMB.ToString("N"); if (!rowFormApply.IsForecastOrderAmountNull()) { this.ForecastOrderAmountCtl.Text = rowFormApply.ForecastOrderAmount.ToString("N"); } if (!rowFormApply.IsCostBenefitRateNull()) { this.CostBenefitRateCtl.Text = rowFormApply.CostBenefitRate.ToString("N"); } this.odsExpenseSummary.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"; } } //查看预算权限 int opViewId = BusinessUtility.GetBusinessOperateId(SystemEnums.BusinessUseCase.ViewBudget, SystemEnums.OperateEnum.Manage); AuthorizationDS.PositionRow position = (AuthorizationDS.PositionRow)this.Session["Position"]; 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) { 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(); 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 = new CustomerTableAdapter().GetDataByID(rowFormApply.CustomerID)[0]; 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); 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.PaymentTypeCtl.Text = new MasterDataBLL().GetPaymentTypeById(rowFormPayment.PaymentTypeID).PaymentTypeName; this.InvoiceStatusCtl.Text = new InvoiceStatusTableAdapter().GetDataByID(rowFormPayment.InvoiceStatusID)[0].Name; if (!rowFormPayment.IsVendorIDNull()) { MasterData.VendorRow vendor = new MasterDataBLL().GetVendorByID(rowFormPayment.VendorID); this.VendorCtl.Text = vendor.VendorName + "-" + vendor.VendorCode; } this.txtVatType.Text = mdBLL.GetVatTypeById(rowFormPayment.VatTypeID)[0].VatTypeName; //历史单据 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/ActivityAdvancedPaymentApproval.aspx?ShowDialog=1&ObjectId=" + rejectedForm.FormID + "','', 'dialogWidth:1000px;dialogHeight:750px;resizable:yes;')"; } //促销信息 this.DisplayTypeCtl.Text = mdBLL.GetDisplayTypeById(rowFormApply.DisplayTypeID).DisplayTypeName; this.DisplayAreaCtl.Text = rowFormApply.IsDisplayAreaNull() ? "" : rowFormApply.DisplayArea.ToString(); this.IsDMCtl.Text = rowFormApply.IsDM ? "Yes" : "No"; this.DiscountTypeCtl.Text = mdBLL.GetDiscountTypeById(rowFormApply.DiscountTypeID).DiscountTypeName; 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.IsDeliveryBeginDateNull()) { this.DeliveryBeginCtl.Text = rowFormApply.DeliveryBeginDate.ToString("yyyy-MM-dd"); } if (!rowFormApply.IsDeliveryEndDateNull()) { this.DeliveryEndCtl.Text = rowFormApply.DeliveryEndDate.ToString("yyyy-MM-dd"); } //明细 this.odsInvoice.SelectParameters["FormID"].DefaultValue = rowFormPayment.FormSalePaymentID.ToString(); this.odsSKUDetails.SelectParameters["FormSaleApplyID"].DefaultValue = rowFormPayment.FormSaleApplyID.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"]; }