protected void InitFormData() { Guid userId = WebUserAuth.UserId.Value; vipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); if (vipInfo == null) { vipInfo = new MUserVipInfo(); vipInfo.Level = 1; } NextReturnDay = GetNextReturnMoneyDay(userId); fundModel = new FundAccountBLL().GetFundAccountInfoById(userId); //待收本息加上复投宝的 Tuple <decimal, decimal> ftbDueIn = GetFTBDueInAmountInterest(userId); fundModel.DueInPAndI = (fundModel.DueInPAndI ?? 0) + ftbDueIn.Item1 + ftbDueIn.Item2; fundModel.DueOutPAndI = (fundModel.DueOutPAndI ?? 0) + fundModel.CurrentPreAdvance; #region 减去智享计划部分 string sql = @"SELECT sum(sd.Amount )+ sum(sd.InterestAmout )+ sum(ISNULL(sd.TuandaiRedPacket,0) )+ sum(ISNULL(sd.PublisherRedPacket,0)) FROM dbo.SubscribeDetail sd with(nolock) inner join Project p with(nolock) on sd.ProjectId = p.Id WHERE isnull(sd.InvestType,0)!=1 and sd.SubscribeUserId=@UserId and sd.CycDate>getdate() and p.Type=37 "; var dyParams = new Dapper.DynamicParameters(); dyParams.Add("@UserId", userId); decimal p2pZxDueInAndI = TuanDaiDB.QuerySingle <decimal>(TdConfig.ApplicationName, "/BD/zxread", sql, ref dyParams); fundModel.DueInPAndI = fundModel.DueInPAndI - p2pZxDueInAndI; sql = @"SELECT sum(sd.Amount )+ sum(sd.InterestAmout )+ sum(ISNULL(sd.TuandaiRedPacket,0) )+ sum(ISNULL(sd.PublisherRedPacket,0)) FROM dbo.SubscribeDetail sd with(nolock) inner join Project p with(nolock) on sd.ProjectId = p.Id WHERE isnull(sd.InvestType,0)!=1 and sd.BorrowerUserId=@UserId and sd.CycDate>getdate() and p.Type=37 "; decimal p2pZxDueOutPAndI = TuanDaiDB.QuerySingle <decimal>(TdConfig.ApplicationName, "/BD/zxread", sql, ref dyParams); fundModel.DueOutPAndI = fundModel.DueOutPAndI - p2pZxDueOutPAndI; #endregion decimal weWaitInvestAmount = GetWePlanWaitInvestment(userId); fundModel.FreezeAcount = fundModel.FreezeAcount + weWaitInvestAmount; //冻结资金加上We待投 pageModel = new PageMoneyModel(); if (fundModel != null) { pageModel.P2PSumAmount = (fundModel.AviMoney ?? 0) + (fundModel.DueInPAndI ?? 0) + (fundModel.BorrowerOut ?? 0) + (fundModel.DueConfirmWithdrawDeposit ?? 0) + (fundModel.RewardMoney ?? 0) + (fundModel.FreezeAcount ?? 0); } pageModel.P2PAviAmount = fundModel.AviMoney ?? 0; pageModel.P2PDueIn = fundModel.DueInPAndI ?? 0; }
protected void Page_Load(object sender, EventArgs e) { string url = "//mvip.tdw.cn" + Request.RawUrl; Context.Response.Redirect(url); return; GetBannerList(); this.UserVipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); }
public MUserVipInfo vipInfo = null;//会员信息 protected void Page_Load(object sender, EventArgs e) { string url = "//mvip.tdw.cn" + Request.RawUrl; Context.Response.Redirect(url); return; if (!IsPostBack && WebUserAuth.UserId.Value != null && WebUserAuth.UserId.Value != Guid.Empty) { vipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); } }
protected void Page_Load(object sender, EventArgs e) { string url = "//mvip.tdw.cn" + Request.RawUrl; Context.Response.Redirect(url); return; Context.Response.Redirect("//mvip.tdw.cn/Member/Mall/lottery.aspx"); return; userVipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); userPrizeHistorys = MVipPrizeHistoryBLL.GetPrizeHistoryTopN(20); userPrizeSettings = MVipPrizeSettingBLL.GetPrizeSettingTopN(12); }
protected void Page_Load(object sender, EventArgs e) { Response.Redirect("//m.tuandai.com/pages/downOpenApp.aspx", true); return; if (!IsPostBack) { this.IsShowRightBar = GlobalUtils.IsWeiXinBrowser ? false : true; GetProjectList(); vipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); if (vipInfo == null) { vipInfo = new MUserVipInfo(); vipInfo.Level = 1; } } }
public decimal tuanbiRatio = 1; //团币系数 protected void Page_Load(object sender, EventArgs e) { string url = "//mvip.tdw.cn" + Request.RawUrl; Context.Response.Redirect(url); return; if (!IsPostBack && WebUserAuth.UserId.Value != null && WebUserAuth.UserId.Value != Guid.Empty) { vipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); if (vipInfo.Level == 1) { tuanbiRatio = 1; } else if (vipInfo.Level == 2) { tuanbiRatio = (decimal)1.05; } else if (vipInfo.Level == 3) { tuanbiRatio = (decimal)1.10; } else if (vipInfo.Level == 4) { tuanbiRatio = (decimal)1.15; } else if (vipInfo.Level == 5) { tuanbiRatio = (decimal)1.20; } else if (vipInfo.Level == 6) { tuanbiRatio = (decimal)1.25; } else if (vipInfo.Level == 7) { tuanbiRatio = (decimal)1.30; } else { tuanbiRatio = (decimal)1.35; } } }
public string privilegeDesc; //特权描述 protected void Page_Load(object sender, EventArgs e) { string url = "//mvip.tdw.cn" + Request.RawUrl; Context.Response.Redirect(url); return; if (!IsPostBack && WebUserAuth.UserId.Value != null && WebUserAuth.UserId.Value != Guid.Empty) { vipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); if (vipInfo.Level == 1) { privilegeDesc = "未获得特权"; } else if (vipInfo.Level == 2) { privilegeDesc = "每月可获提现券<span class='c-212121 f17px ml5'>3元</span>"; } else if (vipInfo.Level == 3) { privilegeDesc = "每月可获提现券<span class='c-212121 f17px ml5'>5元</span>"; } else if (vipInfo.Level == 4) { privilegeDesc = "每月可获提现券<span class='c-212121 f17px ml5'>8元</span>"; } else if (vipInfo.Level == 5) { privilegeDesc = "每月可获提现券<span class='c-212121 f17px ml5'>13元</span>"; } else if (vipInfo.Level == 6) { privilegeDesc = "每月可获提现券<span class='c-212121 f17px ml5'>20元</span>"; } else if (vipInfo.Level == 7) { privilegeDesc = "每月可获提现券<span class='c-212121 f17px ml5'>30元</span>"; } else { privilegeDesc = "每月可获提现券<span class='c-212121 f17px ml5'>60元</span>"; } } }
protected void Page_Load(object sender, EventArgs e) { string url = "//mvip.tdw.cn" + Request.RawUrl; Context.Response.Redirect(url); return; type = Tool.WEBRequest.GetQueryString("producttype"); inter = Tool.WEBRequest.GetQueryString("inter"); if (WebUserAuth.UserId.Value != null && WebUserAuth.UserId.Value != Guid.Empty) { isLogin = true; MUserVipInfo vipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); if (vipInfo != null) { validTuanBi = vipInfo.ValidTuanBi; } } }
protected void Page_Load(object sender, EventArgs e) { string url1 = "//mvip.tdw.cn" + Request.RawUrl; Context.Response.Redirect(url1); return; string url = "https://mvip.tdw.cn/Member/Mall/tuanbiDetail.aspx"; Context.Response.Redirect(url); return; if (WebUserAuth.UserId.HasValue && WebUserAuth.UserId.Value != Guid.Empty) { this.UserVipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); } else { Context.Response.Redirect("https://m.tuandai.com/user/Login.aspx?ReturnUrl=" + HttpContext.Current.Request.RawUrl); } }
protected void Page_Load(object sender, EventArgs e) { string url = "//mvip.tdw.cn" + Request.RawUrl; Context.Response.Redirect(url); return; if (!IsPostBack && WebUserAuth.UserId.Value != null && WebUserAuth.UserId.Value != Guid.Empty) { vipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); var basicUserInfo = MUserVipInfoBLL.GetUserBasicInfoByUserId(WebUserAuth.UserId.Value); if (basicUserInfo.Level != null && basicUserInfo.Level == 2) { IsSuper = true; LevelEndDate = (basicUserInfo.LevelEndDate ?? DateTime.Now).ToString("yyyy-MM-dd"); } vipInfo.HeadImage = basicUserInfo.HeadImage; vipInfo.CurrYYMM = DateTime.Now.Month.ToString(); var dayNetAssets = MVipNetAssetsBLL.GetDayOfNetAssets(WebUserAuth.UserId.Value); var CurrDailyAssets = dayNetAssets.Where(o => o.ReportDate >= new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1)) .ToList(); if (CurrDailyAssets.Count > 0) { currAvgDaily = CurrDailyAssets.Sum(o => o.NetAssets) / CurrDailyAssets.Count; } var PreDailyAssets = dayNetAssets.Where(o => o.ReportDate < new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1)).ToList(); if (PreDailyAssets.Count > 0) { preAvgDaily = PreDailyAssets.Sum(o => o.NetAssets) / PreDailyAssets.Count; } if (currAvgDaily >= 0 && currAvgDaily <= 10000) { nextLevel = 1; } else if (currAvgDaily >= 10000 && currAvgDaily < 50000) { nextLevel = 2; } else if (currAvgDaily >= 50000 && currAvgDaily < 100000) { nextLevel = 3; } else if (currAvgDaily >= 100000 && currAvgDaily < 200000) { nextLevel = 4; } else if (currAvgDaily >= 200000 && currAvgDaily < 500000) { nextLevel = 5; } else if (currAvgDaily >= 500000 && currAvgDaily < 1000000) { nextLevel = 6; } else if (currAvgDaily >= 1000000 && currAvgDaily < 3000000) { nextLevel = 7; } else { nextLevel = 8; } vipLevelPower = new VipLevelPower(); if (vipInfo.Level == 1) { vipLevelPower.TuanBiRatio = (decimal)1.0; vipLevelPower.IsCash = false; vipLevelPower.CashMoney = 0; vipLevelPower.IsLoanDiscount = false; vipLevelPower.Discount = 0; vipLevelPower.IsBirthdayRedPacket = false; vipLevelPower.RedPacketMoney = 0; vipLevelPower.IsGift = false; vipLevelPower.IsServiceTel = false; vipLevelPower.IsAdvanceService = false; } else if (vipInfo.Level == 2) { vipLevelPower.TuanBiRatio = (decimal)1.05; vipLevelPower.IsCash = true; vipLevelPower.CashMoney = 5; vipLevelPower.IsLoanDiscount = false; vipLevelPower.Discount = 0; vipLevelPower.IsBirthdayRedPacket = false; vipLevelPower.RedPacketMoney = 0; vipLevelPower.IsGift = false; vipLevelPower.IsServiceTel = false; vipLevelPower.IsAdvanceService = false; } else if (vipInfo.Level == 3) { vipLevelPower.TuanBiRatio = (decimal)1.1; vipLevelPower.IsCash = true; vipLevelPower.CashMoney = 10; vipLevelPower.IsLoanDiscount = false; vipLevelPower.Discount = 0; vipLevelPower.IsBirthdayRedPacket = true; vipLevelPower.RedPacketMoney = 18; vipLevelPower.IsGift = false; vipLevelPower.IsServiceTel = false; vipLevelPower.IsAdvanceService = false; } else if (vipInfo.Level == 4) { vipLevelPower.TuanBiRatio = (decimal)1.15; vipLevelPower.IsCash = true; vipLevelPower.CashMoney = 15; vipLevelPower.IsLoanDiscount = true; vipLevelPower.Discount = 7; vipLevelPower.IsBirthdayRedPacket = true; vipLevelPower.RedPacketMoney = 28; vipLevelPower.IsGift = true; vipLevelPower.IsServiceTel = false; vipLevelPower.IsAdvanceService = false; } else if (vipInfo.Level == 5) { vipLevelPower.TuanBiRatio = (decimal)1.2; vipLevelPower.IsCash = true; vipLevelPower.CashMoney = 25; vipLevelPower.IsLoanDiscount = true; vipLevelPower.Discount = (decimal)6.5; vipLevelPower.IsBirthdayRedPacket = true; vipLevelPower.RedPacketMoney = 48; vipLevelPower.IsGift = true; vipLevelPower.IsServiceTel = true; vipLevelPower.IsAdvanceService = false; } else if (vipInfo.Level == 6) { vipLevelPower.TuanBiRatio = (decimal)1.25; vipLevelPower.IsCash = true; vipLevelPower.CashMoney = 40; vipLevelPower.IsLoanDiscount = true; vipLevelPower.Discount = (decimal)5.5; vipLevelPower.IsBirthdayRedPacket = true; vipLevelPower.RedPacketMoney = 68; vipLevelPower.IsGift = true; vipLevelPower.IsServiceTel = true; vipLevelPower.IsAdvanceService = false; } else if (vipInfo.Level == 7) { vipLevelPower.TuanBiRatio = (decimal)1.3; vipLevelPower.IsCash = true; vipLevelPower.CashMoney = 60; vipLevelPower.IsLoanDiscount = true; vipLevelPower.Discount = (decimal)4.5; vipLevelPower.IsBirthdayRedPacket = true; vipLevelPower.RedPacketMoney = 98; vipLevelPower.IsGift = true; vipLevelPower.IsServiceTel = true; vipLevelPower.IsAdvanceService = true; } else { vipLevelPower.TuanBiRatio = (decimal)1.35; vipLevelPower.IsCash = true; vipLevelPower.CashMoney = 100; vipLevelPower.IsLoanDiscount = true; vipLevelPower.Discount = (decimal)3.5; vipLevelPower.IsBirthdayRedPacket = true; vipLevelPower.RedPacketMoney = 128; vipLevelPower.IsGift = true; vipLevelPower.IsServiceTel = true; vipLevelPower.IsAdvanceService = true; } if (nextLevel == 1) { nextLevelAsset = 10000; } else if (nextLevel == 2) { nextLevelAsset = 50000; } else if (nextLevel == 3) { nextLevelAsset = 100000; } else if (nextLevel == 4) { nextLevelAsset = 200000; } else if (nextLevel == 5) { nextLevelAsset = 500000; } else if (nextLevel == 6) { nextLevelAsset = 1000000; } else if (nextLevel == 7) { nextLevelAsset = 3000000; } else { nextLevelAsset = 3000000; } } else if (!WebUserAuth.IsAuthenticated) { Response.Redirect("/user/Login.aspx?ReturnUrl=/Member/MemberCenter/memberCenter.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { string url = "//mvip.tdw.cn" + Request.RawUrl; Context.Response.Redirect(url); return; if (!IsPostBack && WebUserAuth.UserId.Value != null && WebUserAuth.UserId.Value != Guid.Empty) { tab = Tool.WEBRequest.GetString("tab"); UserVipInfo = MUserVipInfoBLL.GetUserVipInfoById(WebUserAuth.UserId.Value); CurrYYMM = DateTime.Now.Month; List <MDayNetAssets> dayNetAssets = MVipNetAssetsBLL.GetDayOfNetAssets(WebUserAuth.UserId.Value); PreDailyAssets = dayNetAssets.Where(o => o.ReportDate < new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1)).OrderByDescending(o => o.ReportDate).ToList(); if (PreDailyAssets.Count > 0) { PreAvgDailyAsset = PreDailyAssets.Sum(o => o.NetAssets) / PreDailyAssets.Count; } CurrDailyAssets = dayNetAssets.Where(o => o.ReportDate >= new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1)).OrderByDescending(o => o.ReportDate).ToList(); if (CurrDailyAssets.Count > 0) { CurrAvgDailyAsset = CurrDailyAssets.Sum(o => o.NetAssets) / CurrDailyAssets.Count; } if (CurrAvgDailyAsset < 10000) { nextMonthLevel = 1; } else if (CurrAvgDailyAsset >= 10000 && CurrAvgDailyAsset < 50000) { nextMonthLevel = 2; } else if (CurrAvgDailyAsset >= 50000 && CurrAvgDailyAsset < 100000) { nextMonthLevel = 3; } else if (CurrAvgDailyAsset >= 100000 && CurrAvgDailyAsset < 200000) { nextMonthLevel = 4; } else if (CurrAvgDailyAsset >= 200000 && CurrAvgDailyAsset < 500000) { nextMonthLevel = 5; } else if (CurrAvgDailyAsset >= 500000 && CurrAvgDailyAsset < 1000000) { nextMonthLevel = 6; } else if (CurrAvgDailyAsset >= 1000000 && CurrAvgDailyAsset < 3000000) { nextMonthLevel = 7; } else if (CurrAvgDailyAsset > 3000000) { nextMonthLevel = 8; } if (nextMonthLevel == 1) { nextLevelAsset = 10000; } else if (nextMonthLevel == 2) { nextLevelAsset = 50000; } else if (nextMonthLevel == 3) { nextLevelAsset = 100000; } else if (nextMonthLevel == 4) { nextLevelAsset = 200000; } else if (nextMonthLevel == 5) { nextLevelAsset = 500000; } else if (nextMonthLevel == 6) { nextLevelAsset = 1000000; } else if (nextMonthLevel == 7) { nextLevelAsset = 3000000; } else { nextLevelAsset = 3000000; } } }