Пример #1
0
        public ActionResult Edit(Guid id)
        {
            var emp = _employeesService.Get(id);

            if (emp == null)
            {
                return(RedirectToAction("ListRole"));
            }

            var modelView = new CreateEditEmployeesViewModel
            {
                Id     = emp.Id,
                Name   = emp.Name,
                RoleId = emp.RoleId,
                Phone  = emp.Phone,
                Email  = emp.Email,
                Skype  = emp.Skype,

                Roles = _employeesRoleService.GetBaseSelectListEmployeesRole(_employeesRoleService.GetAll())
            };

            return(View(modelView));
        }
 // GET api/values
 public IEnumerable <EmployeeModel> Get()
 {
     return(_employeesService.Get());
 }