protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { VerificationUtility ver = new VerificationUtility(); ver.JudgeOperate(this.Page, 52, new List<OperateEnum>() { OperateEnum.录入 }); string redirectUrl = "PayApplyList.aspx"; this.navigation1.Routes.Add("付款申请列表", redirectUrl); this.navigation1.Routes.Add("付款申请合约列表", "PayApplyContractList.aspx"); this.navigation1.Routes.Add("付款申请新增", string.Empty); int subId = 0; if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out subId)) Response.Redirect(redirectUrl); UserModel user = UserUtility.CurrentUser; this.curUser = user; //子合约 ContractSubBLL subBll = new ContractSubBLL(); ResultModel result = subBll.Get(user, subId); if (result.ResultStatus != 0) Response.Redirect(redirectUrl); ContractSub sub = result.ReturnValue as ContractSub; if (sub == null || sub.ContractId == 0) Response.Redirect(redirectUrl); this.curSub = sub; //合约 ContractBLL bll = new ContractBLL(); result = bll.Get(user, sub.ContractId); if (result.ResultStatus != 0) Response.Redirect(redirectUrl); NFMT.Contract.Model.Contract contract = result.ReturnValue as NFMT.Contract.Model.Contract; if (contract == null || contract.ContractId == 0) Response.Redirect(redirectUrl); this.contractExpander1.CurContract = contract; this.contractExpander1.CurContractSub = sub; this.contractExpander1.RedirectUrl = redirectUrl; //局域变量赋值 this.PayMatterStyle = (int)StyleEnum.付款事项; this.PayModeStyle = (int)StyleEnum.PayMode; PayApplyBLL payApplyBLL = new PayApplyBLL(); result = payApplyBLL.GetContractBalancePayment(user, sub.SubId, 0); if (result.ResultStatus != 0) Response.Redirect(redirectUrl); BalancePaymentValue = (decimal)result.ReturnValue; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { VerificationUtility ver = new VerificationUtility(); ver.JudgeOperate(this.Page, 52, new List<OperateEnum>() { OperateEnum.录入 }); string redirectUrl = "PayApplyMulityContractList.aspx"; this.navigation1.Routes.Add("付款申请列表", "PayApplyList.aspx"); this.navigation1.Routes.Add("付款申请合约列表", redirectUrl); this.navigation1.Routes.Add("付款申请新增", string.Empty); if (string.IsNullOrEmpty(Request.QueryString["outCorpId"]) || !int.TryParse(Request.QueryString["outCorpId"], out outCorpId) || outCorpId <= 0) this.WarmAlert("参数错误", redirectUrl); subIds = Request.QueryString["subIds"]; if (string.IsNullOrEmpty(subIds)) this.WarmAlert("参数错误", redirectUrl); UserModel user = UserUtility.CurrentUser; ResultModel result = new ResultModel(); this.curUser = user; applyCorpId = user.CorpId; foreach (string subId in subIds.Split(',')) { PayApplyBLL payApplyBLL = new PayApplyBLL(); result = payApplyBLL.GetContractBalancePayment(user, Convert.ToInt32(subId), 0); if (result.ResultStatus != 0) this.WarmAlert(result.Message, redirectUrl); BalancePaymentValue += (decimal)result.ReturnValue; } } }