예제 #1
0
        // GET: Services
        public async Task <IActionResult> Index()
        {
            var user = await _userManager.GetUserAsync(User);

            if (user == null)
            {
                return(RedirectToAction(nameof(AccountController.Login), "Account"));
                // throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
            }
            else
            {
                try
                {
                    ViewBag.sms = TempData["sms"].ToString();
                }
                catch
                {
                }
                var model = new ServicesViewModel();

                model.Notificaciones = _empleadosData.GetNotifications();
                model.Servicios      = _empleadosData.GetAllServices();
                return(View(model));
            }
        }
예제 #2
0
        public IActionResult Dashboard()

        {
            var model = new IndexViewModel();

            model.Notificaciones = _EmpleadosData.GetNotifications();
            model.Empleados      = _EmpleadosData.GetEmpleados();
            model.Galeria        = _EmpleadosData.GetAllPictures();
            model.Motivos        = _EmpleadosData.GetAllTheReasons();
            model.Servicios      = _EmpleadosData.GetAllServices();
            return(View(model));
        }
예제 #3
0
        public IActionResult Index()
        {
            var model = new EmpleadosViewModel();


            model.Empleados = _EmpleadosData.GetAll();

            model.Razones = _EmpleadosData.GetAllTheReasons();

            model.Servicios = _EmpleadosData.GetAllServices();

            model.Fotos = _EmpleadosData.GetAllPictures();

            return(View(model));
        }