public ActionResult Delete(int id)
        {
            _department = new MockDepartment();

            _department.DeleteDepartment(id);
            return(RedirectToAction("List"));
        }
        public ActionResult Create(Depart model)
        {
            _department = new MockDepartment();

            _department.InsertDepartment(model);
            return(RedirectToAction("List"));
        }
        public ActionResult Edit(Depart model)
        {
            _department = new MockDepartment();

            _department.UpdateDepartment(model);
            return(RedirectToAction("List"));
        }
        public ActionResult List()
        {
            _department = new MockDepartment();
            var model = _department.GetAllDepartment();

            return(View(model));
        }
Example #5
0
        public ActionResult Create()
        {
            _department = new MockDepartment();

            ViewBag.DepartmentName = _department.GetAllDepartment();
            return(View());
        }
        public ActionResult Edit(int id)
        {
            _department = new MockDepartment();

            var model = _department.GetDepartById(id);

            return(View(model));
        }
Example #7
0
        public ActionResult Edit(int id)
        {
            _department = new MockDepartment();

            ViewBag.DepartmentName = _department.GetAllDepartment();
            var model = _employee.GetEmployeeById(id);

            return(View(model));
        }
Example #8
0
        public ActionResult Create(Employee model)
        {
            _department = new MockDepartment();

            ViewBag.DepartmentName = _department.GetAllDepartment();

            _employee.InsertEmployee(model);
            return(RedirectToAction("List"));
        }
 // parameter-less constructor for Xaml designer
 public DepartmentViewModel()
     : this(null, null)
 {
     Model = new MockDepartment();
 }