示例#1
0
        public ActionResult Index()
        {
            var actFanXian = ef.hx_ActivityTable.Where(c => c.ActName == "12月投资立得返现奖励").OrderByDescending(c => c.ActEndtime).FirstOrDefault();

            ViewBag.FanXianSTime = actFanXian.ActStarttime;
            ViewBag.FanXianETime = actFanXian.ActEndtime;

            bool   isPingguo    = DateTime.Now.Millisecond % 2 == 1;
            string close_tanchu = checkStart() ? (isPingguo ? "style='top: 17%;background:url(/images/tan1260_3_close.png) no-repeat;'" : "style='top: 17%;background:url(/images/tan1260_4_close.png) no-repeat;'") : "";
            string tanchu       = checkStart() ? (isPingguo ? "/Images/tan1260_3.png" : "/Images/tan1260_4.png") : "/Images/tan1260_1.png";

            ViewBag.Tanchu       = tanchu;
            ViewBag.Close_tanchu = close_tanchu;
            string firstTimePerDay = Utils.GetCookie("FirstTimePerDay");

            ViewBag.FirstTimePerDay = string.IsNullOrWhiteSpace(firstTimePerDay) ? "block" : "none";
            if (string.IsNullOrWhiteSpace(firstTimePerDay))
            {
                var cookie = new HttpCookie("FirstTimePerDay", "That's ok");//加密身份信息,保存至Cookie
                cookie.Expires = DateTime.Now.Date.AddDays(1);
                Response.Cookies.Add(cookie);
            }
            int             uid  = Utils.checkloginsessiontop();
            hx_member_table HUsr = new hx_member_table();

            if (uid > 0)
            {
                HUsr = ef.hx_member_table.Where(p => p.registerid == uid).FirstOrDefault();
            }

            ViewBag.uid = uid;
            if (HUsr != null)
            {
                //  ViewBag.amt = HUsr.available_balance== null ? 0.00M : HUsr.available_balance;
                ViewBag.amt = HUsr.available_balance;
            }
            else
            {
                ViewBag.amt = 0.00;
            }
            hx_borrowing_target hbt = ef.hx_borrowing_target.Where(p => p.project_type_id == 6 && p.tender_state >= 2 && p.tender_state <= 5).OrderByDescending(p => p.targetid).Take(1).FirstOrDefault();
            List <V_borrowing_target_addlist> porlist = ef.V_borrowing_target_addlist.Where(p => p.tender_state >= 2 && p.tender_state <= 5 && p.project_type_id != 6
                                                                                            //&& p.recommend==1
                                                                                            ).OrderBy(p => p.tender_state).ThenByDescending(p => p.indexorder).ThenByDescending(p => p.targetid).Take(6).ToList();

            ViewBag.hbt = hbt;

            GetCacheNesList nes = new GetCacheNesList();

            ViewBag.newslist  = nes.GetNews(17, 3, 1, 1); //媒体新闻三张列表图片
            ViewBag.news1list = nes.GetNews(21, 4, 0, 1); //公告
            ViewBag.newslist2 = nes.GetNews(23, 4, 0, 1); //行业新闻
            ViewBag.gonggao   = nes.GetNews(21, 4, 0, 1); // 公告
            return(View(porlist));
        }
示例#2
0
        public ActionResult Index()
        {
            GetCacheNesList nes = new GetCacheNesList();

            ViewBag.newslist  = nes.GetNews(17, 3, 1);      //媒体新闻三张列表图片
            ViewBag.newslists = nes.GetNews(17, 9, 0);      //媒体新闻列表图片
            ViewBag.gonggao   = nes.GetNews(21, 10, 0);     // 公告

            ViewBag.newslistimg    = nes.GetNews(23, 4, 1); //行业新闻三张列表图片
            ViewBag.hongyenewslist = nes.GetNews(23, 5, 0); // 行业新闻
            ViewBag.asks           = nes.GetNews(22, 5, 0); // 常见问题
            return(View());
        }