Пример #1
0
        public ActionResult Zixun()
        {
            string UserRegister = ConfigurationManager.AppSettings["UserRegister"];
            string Userpassword = ConfigurationManager.AppSettings["Userpassword"];

            ViewBag.UserRegister = UserRegister;
            ViewBag.Userpassword = Userpassword;
            #region 公司新闻
            int pageCount  = 0;
            int count      = string.IsNullOrEmpty(Request["count"]) ? 0 : Int32.Parse(Request["count"]);           //标示
            int pageIndexs = string.IsNullOrEmpty(Request["pageIndexs"]) ? 1 : Int32.Parse(Request["pageIndexs"]); //当前页
            int PageSize   = 5;                                                                                    //每页显示数量
            List <JMP.MDL.newsrelease> gslist = new List <JMP.MDL.newsrelease>();
            JMP.BLL.newsrelease        bll    = new JMP.BLL.newsrelease();
            gslist             = bll.GetListsByType(1, pageIndexs, PageSize, out pageCount);
            ViewBag.pageIndexs = pageIndexs;
            ViewBag.PageSize   = PageSize;
            ViewBag.pageCount  = pageCount;
            ViewBag.list       = gslist;
            ViewBag.count      = count;
            #endregion

            ViewBag.UploadUrl = ConfigurationManager.AppSettings["imgurl"];
            return(View());
        }
Пример #2
0
        /// <summary>
        /// 新闻中心
        /// </summary>
        /// <returns></returns>
        public ActionResult News()
        {
            string UserRegister = ConfigurationManager.AppSettings["UserRegister"];
            string Userpassword = ConfigurationManager.AppSettings["Userpassword"];

            ViewBag.UserRegister = UserRegister;
            ViewBag.Userpassword = Userpassword;

            #region 行业新闻
            int hypageCount  = 0;
            int hycount      = string.IsNullOrEmpty(Request["count"]) ? 0 : Int32.Parse(Request["count"]);           //标示
            int hypageIndexs = string.IsNullOrEmpty(Request["pageIndexs"]) ? 1 : Int32.Parse(Request["pageIndexs"]); //当前页
            int hyPageSize   = 5;                                                                                    //每页显示数量
            List <JMP.MDL.newsrelease> hylist = new List <JMP.MDL.newsrelease>();
            JMP.BLL.newsrelease        hybll  = new JMP.BLL.newsrelease();
            hylist = hybll.GetListsByType(2, hypageIndexs, hyPageSize, out hypageCount);
            ViewBag.hypageIndexs = hypageIndexs;
            ViewBag.hyPageSize   = hyPageSize;
            ViewBag.hypageCount  = hypageCount;
            ViewBag.hylist       = hylist;
            ViewBag.hycount      = hycount;
            #endregion
            ViewBag.UploadUrl = ConfigurationManager.AppSettings["imgurl"];
            return(View());
        }