Пример #1
0
        //酒店详细新闻
        public ActionResult Newsinfo(string id)
        {
            string weixinid = HotelCloud.Common.HCRequest.GetString("weixinID");

            int    error = 0;
            string nid   = HCRequest.GetString("nid");

            string userWeiXinID = HotelCloud.Common.HCRequest.GetString("key");

            if (!userWeiXinID.Equals(""))
            {
                weixinid = userWeiXinID.Split('@')[0];
                hotel3g.Models.Cookies.SetCookies("userWeixinNO", userWeiXinID.Split('@')[1], 30, userWeiXinID.Split('@')[0]);
            }
            if (string.IsNullOrEmpty(nid) || !int.TryParse(nid, out error))
            {
                return(base.RedirectToAction("NewsinfoList", "Hotel", new { id = id, key = userWeiXinID }));
            }
            int preid, nextid;

            ViewData["HotelNewsinfo"] = HotelHelper.GetNewsDetails(nid, out preid, out nextid, id);
            ViewData["HotelNewsID"]   = nid;
            ViewData["preid"]         = nextid;
            ViewData["nextid"]        = preid;
            Hotel hotel = Cache.GetHotel(Convert.ToInt32(id));

            ViewData["hotel"] = hotel;

            ViewData["userWeiXinID"] = hotel3g.Models.Cookies.GetCookies("userWeixinNO", weixinid);
            string s = hotel3g.Models.HotelHelper.getTemp(weixinid);

            return(View());
        }