protected void Page_Load(object sender, EventArgs e) { userId = WebUserAuth.UserId.Value; UserBLL bll = new UserBLL(); if (!this.IsPostBack) { userModel = bll.GetUserBasicInfoModelById(userId); if (userModel != null) { BankAccountNo = userModel.BankAccountNo; } UserSettingInfo UserSetting = new UserSettingBLL().GetUserSettingInfo(userId); if (UserSetting != null) { IsTenderNeedPayPassword = UserSetting.IsTenderNeedPayPassword; } if (string.IsNullOrEmpty(BankAccountNo)) { //string sql = @"SELECT BankNo FROM UserBankInfo WITH(NOLOCK) WHERE UserId = @UserId "; //var para = new Dapper.DynamicParameters(); //para.Add("@UserId", userId); //BankAccountNo = PublicConn.QuerySingle<string>(sql, ref para); var bankInfo = GlobalUtils.GetBankInfo(userId); BankAccountNo = bankInfo.BankNo; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Guid userId = WebUserAuth.UserId.Value; UserBLL bll = new UserBLL(); UserSettingInfo UserSetting = new UserSettingBLL().GetUserSettingInfo(userId); UserBasicInfoInfo basicinfo = bll.GetUserBasicInfoModelById(userId); vailStatus = getVailStatusByUserModel(basicinfo); if (UserSetting != null) { IsTenderNeedPayPassword = UserSetting.IsTenderNeedPayPassword; } } }
protected void InitFormData() { UserBLL bll = new UserBLL(); userModel = bll.GetUserBasicInfoModelById(userId); ExtModel = bll.GetUserBasicInfoExtInfo(userId); if (!string.IsNullOrWhiteSpace(userModel.HeadImage)) { headImage = userModel.HeadImage; } accountModel = bll.GetWXFundAccountInfo(userId); //获取紧急联系人信息 UserBasicInfo_Ext _userBasicInfo_Ext = new UserBLL().GetEmergencyContact(userId); if (_userBasicInfo_Ext != null) { ExtModel.ContactName = _userBasicInfo_Ext.ContactName; ExtModel.ContactTelNo = _userBasicInfo_Ext.ContactTelNo; ExtModel.ContactRelationShip = _userBasicInfo_Ext.ContactRelationShip; } if (string.IsNullOrEmpty(ExtModel.Graduation) || string.IsNullOrEmpty(ExtModel.University) || string.IsNullOrEmpty(ExtModel.Marriage) || string.IsNullOrEmpty(ExtModel.Address) || string.IsNullOrEmpty(ExtModel.OfficeDomain) || string.IsNullOrEmpty(ExtModel.OfficeScale) || string.IsNullOrEmpty(ExtModel.Position) || string.IsNullOrEmpty(ExtModel.Salary) || !ExtModel.IsHaveHouse.HasValue || !ExtModel.IsHaveCar.HasValue || string.IsNullOrEmpty(ExtModel.ContactName) || string.IsNullOrEmpty(ExtModel.ContactTelNo) || string.IsNullOrEmpty(ExtModel.ContactRelationShip)) { IsCompleteDetailInfo = false; } UserVipModel = this.GetNewVipUserInfo(); UserSettingInfo UserSetting = new UserSettingBLL().GetUserSettingInfo(userId); if (UserSetting != null) { IsTenderNeedPayPassword = UserSetting.IsTenderNeedPayPassword; } //存管通用户 CgtUser = new QueryClient().GetUserByPlatformUserNo(userId); if (GlobalUtils.IsBankService) { var bankInfo = new BankFromJavaService().GetBankInfo(userId, TuanDai.WXSystem.Core.models.ServiceType.TuoMin); if (bankInfo != null && bankInfo.respData != null) { userModel.OpenBankName = bankInfo.respData.openBankName; } } }
protected void InitFormData() { UserBLL bll = new UserBLL(); userModel = bll.GetUserBasicInfoModelById(userId); ExtModel = bll.GetUserBasicInfoExtInfo(userId); if (!string.IsNullOrWhiteSpace(userModel.HeadImage)) { headImage = userModel.HeadImage; } accountModel = bll.GetWXFundAccountInfo(userId); //获取紧急联系人信息 UserBasicInfo_Ext _userBasicInfo_Ext = new UserBLL().GetEmergencyContact(userId); if (_userBasicInfo_Ext != null) { ExtModel.ContactName = _userBasicInfo_Ext.ContactName; ExtModel.ContactTelNo = _userBasicInfo_Ext.ContactTelNo; ExtModel.ContactRelationShip = _userBasicInfo_Ext.ContactRelationShip; } UserVipModel = this.GetNewVipUserInfo(); UserSettingInfo UserSetting = new UserSettingBLL().GetUserSettingInfo(userId); if (UserSetting != null) { IsTenderNeedPayPassword = UserSetting.IsTenderNeedPayPassword; } //存管通用户 CgtUser = new QueryClient().GetUserByPlatformUserNo(userId); if (GlobalUtils.IsBankService) { var bankInfo = new BankFromJavaService().GetBankInfo(userId, ServiceType.TuoMin); if (bankInfo != null && bankInfo.respData != null) { userModel.OpenBankName = bankInfo.respData.openBankName; } } }
protected void Page_Load(object sender, EventArgs e) { Guid userId = WebUserAuth.UserId.Value; UserBLL bll = new UserBLL(); UserSettingBLL uBll = new UserSettingBLL(); SetModel = new WebSettingBLL().GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); if (userId != null && userId != Guid.Empty) { var rInfo = new UserRiskEvaluationBLL().GetAssassTimeThisYear(userId, TdConfig.ApplicationName); if (rInfo == null) { Response.Redirect("/Member/safety/pre_invest.aspx", true); } AviMoney = bll.GetUserAviMoney(userId); userModel = bll.GetUserBasicInfoModelById(userId); userSetting = uBll.GetUserSettingInfo(userId); if (userSetting == null) { userSetting = new UserSettingInfo(); userSetting.IsTenderNeedPayPassword = false; } //假如数据还不同步过来,设置未身份证验证 if (userModel == null) { userModel = new UserBasicInfoInfo(); userModel.IsValidateIdentity = false; AviMoney = 0; } } else { Response.Redirect("/user/Login.aspx?ReturnUrl=" + Request.RawUrl, true); } Tool.CookieHelper.WriteCookie("InvestUrl", HttpContext.Current.Request.RawUrl, 30); var projectIdStr = Tool.WEBRequest.GetQueryString("projectid");// Request.QueryString["projectid"]; if (!string.IsNullOrEmpty(projectIdStr)) { projectId = Guid.Parse(projectIdStr); //model = new WeProductBLL().GetWeProductInfo(projectId); string isOpenMobileCode = "false"; var webSet = new WebSettingBLL().GetWebSettingInfo("C7FC6726-A36D-4035-A36C-957D43F5EF96"); if (webSet == null) { webSet = new WebSettingInfo(); } if (webSet.Param1Value == "1") { isOpenMobileCode = "true"; } if (IsZQZR(projectId) && !TuanDai.PortalSystem.Redis.mRedis.GetZqzrInvestCodePass(projectId, userId) && isOpenMobileCode == "true") { IsShowMobileCode = true; } } else { Response.Redirect("/pages/invest/invest_list.aspx"); } investType = Tool.WEBRequest.GetQueryString("investType"); //Request.QueryString["investType"]; var payMoneyStr = Tool.WEBRequest.GetQueryString("payMoney"); //Request.QueryString["payMoney"]; if (!string.IsNullOrEmpty(payMoneyStr) && payMoneyStr != "NaN") { PayMoney = decimal.Parse(payMoneyStr); } else { Response.Redirect("/pages/invest/invest_list.aspx"); } ProfitMoney = Tool.WEBRequest.GetQueryString("profitMoney"); //Request.QueryString["profitMoney"]; var unitStr = Tool.WEBRequest.GetQueryString("unit"); //Request.QueryString["unit"]; if (!string.IsNullOrEmpty(unitStr)) { unit = int.Parse(unitStr); } else { Response.Redirect("/pages/invest/invest_list.aspx"); } var repeatInvestTypeStr = Tool.WEBRequest.GetQueryString("repeatInvestType"); //Request.QueryString["repeatInvestType"]; if (!string.IsNullOrEmpty(repeatInvestTypeStr)) { RepeatInvestType = int.Parse(repeatInvestTypeStr); } if (Tool.WEBRequest.GetQueryString("PrizeId") != "") { PrizeId = WEBRequest.GetGuid("PrizeId"); } PrizeName = WEBRequest.GetQueryString("PrizeName"); }
private SettingManager() { _userSettingBLL = new UserSettingBLL(); }
public void ApplyFTBTransfer() { Guid userid = WebUserAuth.UserId.Value; if (userid == Guid.Empty) { PrintJson("-99", "登陆超时"); } TuanDai.PortalSystem.BLL.UserBLL userbll = new TuanDai.PortalSystem.BLL.UserBLL(); TuanDai.PortalSystem.Model.UserBasicInfoInfo model = userbll.GetUserBasicInfoModelById(userid); if (model == null) { PrintJson("-98", "用户不存在"); } if ((model.uStatus ?? 0) != 1) { PrintJson("-10", "用户已被冻结"); } Guid weOrderId = WEBRequest.GetFormGuid("WeOrderId"); if (weOrderId == Guid.Empty) { PrintJson("-9", "We订单不存在"); } decimal applyAmount = WEBRequest.GetFormString("ApplyAmount").ToDecimal(0); if (applyAmount <= 0) { PrintJson("-1", "申请的退出本金必须大于0"); } if (applyAmount % 1 != 0) { PrintJson("-1", "请输入大于0的整数金额"); } if (GlobalUtils.IsOpenCGT) { var reqMode = new CgtCallbackUrl.Model.ModelRequest.ApplyFTBTransferRequest { WeOrderId = weOrderId, TransferAmount = applyAmount }; string url = CgtCallBackConfig.GetCgtTradePwdUrl(reqMode, CgtCallBackConfig.CgtCallBackType.FTBPreExit); PrintJson("8888", url); } else { //验证交易密码 var bll = new UserSettingBLL(); var usersetting = bll.GetUserSettingInfo(userid); if (usersetting != null) { #region if (usersetting.PayPwdErrorDate.HasValue) { DateTime date1 = Convert.ToDateTime(usersetting.PayPwdErrorDate.Value.ToString("yyyy/MM/dd")); DateTime date2 = Convert.ToDateTime(DateTime.Now.ToString("yyyy/MM/dd")); if (date1 == date2 && usersetting.PayPwdErrorCount >= 5) { PrintJson("-151", "交易密码已错误5次,请24小时后再进行此操作"); } if (date1 != date2 && usersetting.PayPwdErrorCount > 1) { usersetting.PayPwdErrorCount = 0; usersetting.PayPwdErrorDate = null; } } string PayPwd = Tool.Encryption.MD5(Context.Request["TranPwd"]); if (PayPwd != model.PayPwd) { //记录登录错误次数 if (usersetting.PayPwdErrorCount == null) { usersetting.PayPwdErrorCount = 0; } usersetting.PayPwdErrorCount += 1; usersetting.PayPwdErrorDate = DateTime.Now; //db.SaveChanges(); bll.UpdateUserSettingInfo(usersetting); if (usersetting.PayPwdErrorCount == 5) { PrintJson("-151", "交易密码已错误5次,请24小时后再进行此操作"); } else { PrintJson("-15", "交易密码错误,您还剩下" + (5 - usersetting.PayPwdErrorCount).ToString() + "次机会"); } } else { //清除错误记录 usersetting.PayPwdErrorCount = 0; usersetting.PayPwdErrorDate = null; bll.UpdateUserSettingInfo(usersetting); } #endregion } int status = 0; string strError = ""; TuanDai.PortalSystem.BLL.WeFTBBLL webll = new TuanDai.PortalSystem.BLL.WeFTBBLL(); webll.ApplyFTBRansom(weOrderId, applyAmount, out status, out strError); PrintJson(status.ToString(), strError); } }
/// <summary> /// We计划分期宝申请赎回 /// </summary> public void ApplyWeFqbTransfer() { Guid userid = WebUserAuth.UserId.Value; if (userid == Guid.Empty) { PrintJson("-99", "登陆超时"); } TuanDai.PortalSystem.BLL.UserBLL userbll = new TuanDai.PortalSystem.BLL.UserBLL(); TuanDai.PortalSystem.Model.UserBasicInfoInfo model = userbll.GetUserBasicInfoModelById(userid); if (model == null) { PrintJson("-98", "用户不存在"); } if ((model.uStatus ?? 0) != 1) { PrintJson("-10", "用户已被冻结"); } Guid weOrderId = WEBRequest.GetFormGuid("WeOrderId"); if (weOrderId == Guid.Empty) { PrintJson("-9", "We订单不存在"); } if (GlobalUtils.IsOpenCGT) { var reqMode = new CgtCallbackUrl.Model.ModelRequest.ApplyWeFQBTransferRequest { WeOrderId = weOrderId }; string url = CgtCallBackConfig.GetCgtTradePwdUrl(reqMode, CgtCallBackConfig.CgtCallBackType.WeFqbPreExit); PrintJson("8888", url); } else { //验证交易密码 var bll = new UserSettingBLL(); var usersetting = bll.GetUserSettingInfo(userid); if (usersetting != null) { if (usersetting.PayPwdErrorDate.HasValue) { DateTime date1 = Convert.ToDateTime(usersetting.PayPwdErrorDate.Value.ToString("yyyy/MM/dd")); DateTime date2 = Convert.ToDateTime(DateTime.Now.ToString("yyyy/MM/dd")); if (date1 == date2 && usersetting.PayPwdErrorCount >= 5) { PrintJson("-151", "交易密码已错误5次,请24小时后再进行此操作"); } if (date1 != date2 && usersetting.PayPwdErrorCount > 1) { usersetting.PayPwdErrorCount = 0; usersetting.PayPwdErrorDate = null; } } string PayPwd = Tool.Encryption.MD5(Context.Request["TranPwd"]); if (PayPwd != model.PayPwd) { //记录登录错误次数 if (usersetting.PayPwdErrorCount == null) { usersetting.PayPwdErrorCount = 0; } usersetting.PayPwdErrorCount += 1; usersetting.PayPwdErrorDate = DateTime.Now; //db.SaveChanges(); bll.UpdateUserSettingInfo(usersetting); if (usersetting.PayPwdErrorCount == 5) { PrintJson("-151", "交易密码已错误5次,请24小时后再进行此操作"); } else { PrintJson("-15", "交易密码错误,您还剩下" + (5 - usersetting.PayPwdErrorCount).ToString() + "次机会"); } } else { //清除错误记录 usersetting.PayPwdErrorCount = 0; usersetting.PayPwdErrorDate = null; //db.SaveChanges(); bll.UpdateUserSettingInfo(usersetting); } } int status = 0; TuanDai.PortalSystem.BLL.WeOrderBLL webll = new TuanDai.PortalSystem.BLL.WeOrderBLL(); webll.ApplyWeFqbRansom(weOrderId, out status); if (status == 1) { PrintJson("1", "申请转让成功"); } else { string errMsg = ""; switch (status) { case 0: errMsg = "系统异常"; break; case 2: errMsg = "不是We计划分期宝"; break; case 3: errMsg = "回款中状态不允许赎回"; break; case 4: errMsg = "持有时间必须超过3个月"; break; case 5: errMsg = "只有投标中的We计划才能转让"; break; } PrintJson("0", errMsg); } } }