protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } if (model.Type.Value != 32) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } DynamicParameters dyParams; string sql = ""; finishProcess = CommUtils.GetProjectProcess(model); SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } sql = "select RiskAssessment,FundUse,RepaymentAssure from project_xd with(nolock) where ProjectId=@ProjectId"; Dapper.DynamicParameters Parprojectxd = new Dapper.DynamicParameters(); Parprojectxd.Add("@ProjectId", projectId); projectXDInfo = PublicConn.QuerySingle <Project_xdInfo>(sql, ref Parprojectxd); if (projectXDInfo == null) { projectXDInfo = new Project_xdInfo(); } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } borrowUserInfo = userbll.GetUserBasicInfoModelById(model.UserId.Value); borrowerUserInfoExt = userbll.GetUserBasicInfoExtInfo(model.UserId.Value); //信用档案 creditInfo = CommUtils.GetBorrowerCreditData(model.UserId.Value); imageList = CommUtils.GetProjectImages(this.projectId.Value); finishProcess = CommUtils.GetProjectProcess(model); this.GetUserDetailInfo(); //风险等级 switch (model.Rating) { case 1: this.rating = "<span style=\"color:Green;\">低</span>"; break; case 2: this.rating = "<span style=\"color:Orange;\">中</span>"; break; case 3: this.rating = "<span style=\"color:Red;\">高</span>"; break; } SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value); //计算预期收益 PreInterestRate = CommUtils.CalcInvestInterest(model, 10000); EbaoMultiple = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = CommUtils.GetEbaoMultipleInterest(model, 10000); preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000); allMonthBadrate = calcrate(model.TotalSumShares ?? 0, model.badShares ?? 0); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } string sql = "select RiskAssessment,FundUse,RepaymentAssure from project_xd with(nolock) where ProjectId=@ProjectId"; Dapper.DynamicParameters Parprojectxd = new Dapper.DynamicParameters(); Parprojectxd.Add("@ProjectId", projectId); projectXDInfo = PublicConn.QuerySingle <Project_xdInfo>(sql, ref Parprojectxd); if (projectXDInfo == null) { projectXDInfo = new Project_xdInfo(); } return(true); }