public IActionResult Edit(int id)
        {
            ViewData["Section"] = "Dentistas";
            ViewData["Action"]  = "Editar";

            var ViewModel = new VMDentistUser();

            ViewModel.Dentist = DentistsDAO.GetById(id);
            ViewModel.User    = UsersDAO.GetById(id);
            ViewBag.Types     = UsersDAO.GetTypes();

            return(View("Add", ViewModel));
        }
        public IActionResult Edit(int id)
        {
            ViewData["Section"] = "Colaboradores";
            ViewData["Action"]  = "Editar";

            var ViewModel = new VMAdminUser();

            ViewModel.Admin = AdministratorsDAO.GetById(id);
            ViewModel.User  = UsersDAO.GetById(id);
            ViewBag.Types   = UsersDAO.GetTypes().Where(t => t.Name != "DEV" && t.Name != "DENTIST");
            var types = UsersDAO.GetTypes().Where(t => t.Name != "DEV" && t.Name != "DENTIST");

            return(View("Add", ViewModel));
        }
Exemplo n.º 3
0
        public IActionResult Edit(int id)
        {
            ViewData["Section"] = "Usuários";
            ViewData["Action"]  = "Editar";
            ViewBag.Types       = UsersDAO.GetTypes();

            var user = UsersDAO.GetById(id);

            return(View("Add", user));
        }