Ejemplo n.º 1
0
        // GET: Categories/Details/5
        //[Authorize(Roles = "admin")]
        //[Authorize(Roles = "manager")]
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CATEGORY cATEGORY = db.CATEGORYs.Find(id);

            if (cATEGORY == null)
            {
                return(HttpNotFound());
            }
            CategoryViewModel vm = new CategoryViewModel();

            vm.Cat    = cATEGORY;
            vm.CatsTr = db.SPP_CategoryTrans().Where(ct => ct.idCategory == id).ToList();

            return(View(vm));
        }
Ejemplo n.º 2
0
 public IList <SPP_CategoryTrans_Result> GetAllCategoryTrans()
 {
     return(db.SPP_CategoryTrans().ToList());
 }