예제 #1
0
        public ActionResult AddNew()
        {
            AccountBusinessLayer accountBL = new AccountBusinessLayer();

            ViewData["lstUsers"] = accountBL.GetAllAccounts();
            return View("AddDefect");
        }
예제 #2
0
        //
        // GET: /DefectDetails/
        public ActionResult Index(int id = 0)
        {
            if (id > 0)
            {
                DefectBusinessLayer defectBL = new DefectBusinessLayer();
                AccountBusinessLayer accountBL = new AccountBusinessLayer();

                Defect defect = defectBL.GetDefect(id);
                List<Comment> defectComments = defectBL.GetDefectComments(defect.id);
                DefectViewModel vmDefect = new DefectViewModel(defect, defectComments);

                ViewData["lstUsers"] = accountBL.GetAllAccounts();
                return View("Defect", vmDefect);
            }
            else
            {
                return RedirectToAction("Index", "DefectList");
            }
        }