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; } } }