Exemplo n.º 1
0
        public ActionResult Edit(long id)
        {
            NewsDao dbDAO  = new NewsDao();
            News    objNew = null;

            objNew = dbDAO.FindByID(id);
            List <string> cateID = HepperString.GetListByKey(objNew.CategoryID, ",");

            PopulateParentIDDropDownList(HepperString.TolistLong(cateID.ToArray()));

            return(View(objNew));
        }
Exemplo n.º 2
0
        public ActionResult Publicer(long id)
        {
            NewsDao dbDAO  = new NewsDao();
            News    objNew = null;

            //SetParentIDViewBag();
            try
            {
                objNew = dbDAO.FindByID(id);
                List <string> cateID = HepperString.GetListByKey(objNew.CategoryID, ",");
                PopulateParentIDDropDownList(HepperString.TolistLong(cateID.ToArray()));
            }
            catch
            {
                ModelState.AddModelError("", Resources.ResourceAdmin.ErrorGetRecordMessage);
            }
            return(View(objNew));
        }