Exemplo n.º 1
0
        // GET: AdminSetUps/Create
        public ActionResult CreateOrEdit(long id)
        {
            AdminSetUpViewModel vm = new AdminSetUpViewModel();

            vm.AdminSetUp         = adminSetUpService.GetAdminSetUp(id);
            vm.StatusSelectModels = adminSetUpService.StatusSelectModels();
            vm.Employees          = employeeService.GetEmployeeSelectModels();
            return(View(vm));
        }
Exemplo n.º 2
0
        public ActionResult CreateOrEdit(AdminSetUpViewModel vm)
        {
            if (vm.AdminSetUp.AdminId <= 0)
            {
                adminSetUpService.SaveAdminSetUp(0, vm.AdminSetUp);
            }

            else
            {
                adminSetUpService.SaveAdminSetUp(vm.AdminSetUp.AdminId, vm.AdminSetUp);
            }
            return(RedirectToAction("Index"));
        }