public ActionResult Detail(long id)
        {
            var dao   = new ContentDao();
            var model = dao.FindByID(id);

            return(View(model));
        }
        public ActionResult Edit(long ID)
        {
            var dao     = new ContentDao();
            var content = dao.FindByID(ID);

            SetViewBag(content.ID);
            return(View(content));
        }
Exemplo n.º 3
0
        // GET: Mesage/Details/5
        public ActionResult DetailMesage(long id)
        {
            ContentDao bdDao = new ContentDao();
            Content    ms    = bdDao.FindByID(id);
            var        list  = new ContentDao().ListHot();

            list.Remove(ms);
            ViewBag.listHot = list;
            return(View(ms));
        }
Exemplo n.º 4
0
        public JsonResult UpdateUserRead(long msID)
        {
            UserLogin us = (UserLogin)Session[CommonConstant.USER_SESSION];

            var     dao     = new ContentDao();
            long    data    = 0;
            Content objMS   = dao.FindByID(msID);
            string  usID    = us.UserID.ToString();
            string  sUserID = objMS.UsersRead;

            string[] listUerID;
            bool     kt = false;

            if (sUserID == null)
            {
                sUserID = usID;
                kt      = true;
            }
            else
            {
                listUerID = objMS.UsersRead.Split('.');
                if (!listUerID.Contains(usID))
                {
                    sUserID += "." + usID;
                    kt       = true;
                }
            }
            if (kt == true)
            {
                objMS.UsersRead = sUserID;
                data            = dao.Update(objMS);
            }

            JsonResult result = new JsonResult();

            result.Data = data;
            result.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            return(result);
        }
Exemplo n.º 5
0
        // GET: Mesage/Details/5
        public ActionResult Details(long id)
        {
            ContentDao bdDao = new ContentDao();

            return(View(bdDao.FindByID(id)));
        }