Пример #1
0
 public ActionResult CategoryUpdate(int id)
 {
     LectureCategoryRequirementItem item = LectureCategoryRequirementDao.FindById(id);
     IList<LectureCategoryItem> categoryList = LectureCategoryDao.FindAll();
     ViewBag.Item = item;
     ViewBag.categoryList = categoryList;
     return View();
 }
Пример #2
0
        public ActionResult Update(int id)
        {
            LectureDetailItem           item         = LectureDetailDao.FindById(id);
            IList <LectureCategoryItem> categoryList = LectureCategoryDao.FindAll();
            IList <LectureTypeItem>     typeList     = LectureTypeDao.FindByCategoryId(item.LectureCategoryId);
            IList <SectionItem>         sectionList  = SectionDao.FindByTypeId(item.LectureTypeId);

            ViewBag.categoryList = categoryList;
            ViewBag.Item         = item;
            ViewBag.typeList     = typeList;
            ViewBag.sectionList  = sectionList;
            return(View());
        }
Пример #3
0
        public ActionResult Register()
        {
            // IList<LectureDetailItem> list = LectureDetailDao.FindAll();
            // ViewBag.Detail = list;

            IList <LectureCategoryItem> categoryList = LectureCategoryDao.FindAll();

            ViewBag.Category = categoryList;

            IList <LectureTypeItem> typeList = LectureTypeDao.FindByCategoryId(categoryList[0].Id);

            ViewBag.Type = typeList;

            IList <SectionItem> sectionList = SectionDao.FindByTypeId(typeList[0].Id);

            ViewBag.Section = sectionList;
            return(View());
        }
Пример #4
0
 public ActionResult CategoryRegister()
 {
     IList<LectureCategoryItem> list = LectureCategoryDao.FindAll();
     ViewBag.Category = list;
     return View();
 }