示例#1
0
        public ActionResult SectionUpdate(int id)
        {
            SectionRequirementItem item = SectionRequirementDao.FindById(id);
            ViewBag.Item = item;

            return View();
        }
示例#2
0
 public ActionResult SectionRequirementDelete(int id)
 {
     try
     {
         SectionRequirementDao.Delete(id);
         return Json(new { result = "success" }, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json(new { result = "fail", message = ex.Message }, JsonRequestBehavior.AllowGet);
     }
 }
示例#3
0
        //
        // GET: /Result/
        public ActionResult Index()
        {
            ResultService service = new ResultService();

            service.CategoryRequirements = LectureCategoryRequirementDao.FindByAccountId(accountItem.Id);
            service.LectureDetails       = LectureDetailDao.FindByAccountId(accountItem.Id);
            service.ScoreRequirement     = ScoreRequirementDao.FindByAccountIdForCheck(accountItem.Id);
            service.SectionRequirement   = SectionRequirementDao.FindByAccountIdForCheck(accountItem.Id);
            service.Sections             = SectionDao.FindAll();
            service.TypeRequirements     = LectureTypeRequirementDao.FindByAccountId(accountItem.Id);
            ViewBag.Results     = service.GetResults();
            ViewBag.IsAllPassed = IsAllPassed(ViewBag.Results);
            return(View());
        }
示例#4
0
 public ActionResult SectionUpdate(int id, int cutline)
 {
     SectionRequirementItem item = new SectionRequirementItem();
     item.LectureTypeId = 2;
     item.Cutline = cutline;
     item.AccountId = accountItem.Id;
     item.Id = id;
     try
     {
         SectionRequirementDao.Update(item);
         return Json(new { result = "success" }, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json(new { result = "fail", message = ex.Message }, JsonRequestBehavior.AllowGet);
     }
 }
示例#5
0
        public ActionResult SectionRegister(int cutline)
        {
            if (ExistSectionRequirement(accountItem.Id)) return Json(new { result = "fail", message = "이미 존재합니다." }, JsonRequestBehavior.AllowGet);
            SectionRequirementItem item = new SectionRequirementItem();
            item.Cutline = cutline;
            item.AccountId = accountItem.Id;
            item.LectureTypeId = 2;

            try
            {
                SectionRequirementDao.Insert(item);
                return Json(new { result = "success" }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                return Json(new { result = "fail", message = ex.Message }, JsonRequestBehavior.AllowGet);
            }
        }
示例#6
0
 private bool ExistSectionRequirement(int id)
 {
     SectionRequirementItem item = SectionRequirementDao.FindByAccountIdForCheck(id);
     return item != null;
 }
示例#7
0
 public ActionResult Section()
 {
     IList<SectionRequirementItem> list = SectionRequirementDao.FindByAccountId(accountItem.Id);
     ViewBag.list = list;
     return View();
 }