public async Task <IActionResult> Index() { var user = await _userManager.GetUserAsync(User); if (user == null) { throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); } var model = new IndexViewModel { Username = user.UserName, Email = user.Email, PhoneNumber = user.PhoneNumber, IsEmailConfirmed = user.EmailConfirmed, StatusMessage = StatusMessage }; // var notification = new Notifications(); // model.Detalle = _EmpleadosData.GetDetails(); model.Notificaciones = _EmpleadosData.GetNotifications(); return(View(model)); }
// GET: ChooseUs public async Task <IActionResult> Index() { var user = await _userManager.GetUserAsync(User); if (user == null) { return(RedirectToAction(nameof(AccountController.Login), "Account")); } else { try { ViewBag.sms = TempData["sms"].ToString(); } catch { } var model = new ChooseUsViewModel(); model.Notificaciones = _empleadosData.GetNotifications(); model.Motivos = _empleadosData.GetAllTheReasons(); return(View(model)); } }
// GET: PeopleDatas 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 empleado = new PeopleData(); var model = new PeopleDataViewModel(); model.Notificaciones = _empleadosData.GetNotifications(); model.Empleados = _empleadosData.GetEmpleados(); return(View(model)); // return View(await _context.PeopleData.ToListAsync()); } }
// GET: Notifications public async Task <IActionResult> Index() { var user = await _userManager.GetUserAsync(User); if (user == null) { return(RedirectToAction(nameof(AccountController.Login), "Account")); } var model = new NotificationsViewModel(); model.Notificaciones = _empleadosData.GetNotifications(); return(View(model)); }
public IActionResult Index() { var model = new EmpleadosViewModel(); model.Empleados = _EmpleadosData.GetAll(); model.Razones = _EmpleadosData.GetAllTheReasons(); model.Servicios = _EmpleadosData.GetAllServices(); model.Fotos = _EmpleadosData.GetAllPictures(); model.Notificaciones = _EmpleadosData.GetNotifications(); return(View(model)); }