Ejemplo n.º 1
0
        // GET: Files
        public ActionResult Index(int DeptClassId)
        {
            if (DeptClassId == null)
            {
                return(Redirect("/Admin/Index"));
            }
            FilesRepo      filesRepo      = new FilesRepo(context);
            FilesViewModel filesviewmodel = new FilesViewModel()
            {
                files = filesRepo.GetClassFiles(DeptClassId)
            };

            ViewBag.DeptClassId = DeptClassId;

            return(View(filesviewmodel));
        }
Ejemplo n.º 2
0
        // GET: Files
        public ActionResult Index(int?DeptClassId)
        {
            if (DeptClassId.Equals(null))
            {
                return(Redirect("/Admin/Index"));
            }
            FilesRepo           filesRepo      = new FilesRepo(context);
            IEnumerable <Files> enumerable     = filesRepo.GetClassFiles(DeptClassId);
            FilesViewModel      filesviewmodel = new FilesViewModel()
            {
                files = enumerable
            };

            ViewBag.DeptClassId = DeptClassId;

            return(View(filesviewmodel));
        }