public IActionResult Index() { AdminIndexModel aim = new AdminIndexModel(); aim.Meetups.AddRange(Domain.GetAdminMeetup()); return(View(aim)); }
public ActionResult Index() { AdminIndexModel model = new AdminIndexModel(); model.PackageBookings = _packageService.GetAllBookingRequiest(); model.AirTicketViewModels = _airTicketService.GetFiveTicketRequest(); return(View(model)); }
// GET: Admin public ActionResult Index() { var adminIndexModel = new AdminIndexModel { Roles = RoleManager.Roles, Users = UserManager.Users }; return(View(adminIndexModel)); }
public async Task <IActionResult> Index() { if (!HttpContext.User.Identity.IsAuthenticated) { return(Redirect("/Identity/Account/Login?returnUrl=/admin")); } var model = new AdminIndexModel(); model.AircraftTracked = _context.Aircrafts.Count(x => x.FirstSeen != null); model.Stations = _context.Stations.Count(); return(View(model)); }
public IActionResult Index() { AdminIndexModel aim = new AdminIndexModel(); aim.Meetups.AddRange(Domain.GetAdminMeetup()); aim.HelloText = CurrentUser.FirstName; // When I said I was a specially crafted software, I was not joking... if (CurrentUser.FirstName == "Lori") { aim.HelloText = $"<i class=\"fa fa-heart\" style='color:pink;font-size:24px'> </i>{aim.HelloText}<i class=\"fa fa-heart\" style='color:pink;font-size:24px'></i>"; } return(View(aim)); }
public async Task <ActionResult> Index(ManageMessageId?message) { ViewBag.StatusMessage = message == ManageMessageId.ChangePasswordSuccess ? "Your password has been changed." : ""; var userId = User.Identity.GetUserId(); var model = new AdminIndexModel { HasPassword = HasPassword(), BrowserRemembered = await AuthenticationManager.TwoFactorBrowserRememberedAsync(userId) }; return(View(model)); }
/// <summary> /// Подсчитывает статистику доходов за последние 30 дней, и статистику дохода мастеров /// </summary> /// <returns>Главный экран панели администратора</returns> public async Task <IActionResult> Index() { var data = new AdminIndexModel(); for (int i = 0; i <= 30; i++) { data.Dates.Add(DateTime.Now.AddDays(-i).ToShortDateString()); data.Moneys.Add(await db.Receipts.Where(r => r.ClosedDate.DayOfYear == DateTime.Now.AddDays(-i).DayOfYear).SumAsync(r => r.TotalPrice)); } data.Masters.AddRange(db.Employeers.Where(e => e.RoleId == 2).Select(e => e.Name)); foreach (var item in data.Masters) { data.Salaries.Add(await db.Receipts.Include(r => r.Employeer).Where(r => r.Employeer.Name == item).SumAsync(r => r.TotalPrice)); } data.Moneys.Reverse(); data.Dates.Reverse(); return(View(data)); }
public ActionResult Admin() { if (Session["Login"] != null) { gelen = (AppUsers)Session["Login"]; AdminIndexModel adminIndexVeri = new AdminIndexModel(); adminIndexVeri.toplamgoruntulenme = adminIndexManagement.ProductView(); adminIndexVeri.toplamuye = adminIndexManagement.TotalUser(); adminIndexVeri.toplamsirket = adminIndexManagement.TotalCompany(); adminIndexVeri.toplamurun = adminIndexManagement.TotalProduct(); adminIndexVeri.gunluksatıs = adminIndexManagement.getDailySales(); adminIndexVeri.aylıksatıs = adminIndexManagement.getMonthlySales(); adminIndexVeri.yıllıksatıs = adminIndexManagement.getYearlySales(); adminIndexVeri.totalsatıs = adminIndexManagement.getTotalSales(); return(View(adminIndexVeri)); } else { return(RedirectToAction("Index", "Admin")); } }
public ActionResult Index() { if (SessionManager.Current.CurrentParliamentId == 0) { SessionManager.Current.CurrentParliamentId = 1; } LawService lawService = new LawService(); PetitionService petitionService = new PetitionService(); var model = new AdminIndexModel { UnverifiedCustomVotesCount = lawService.GetUnverifiedCustomVotesCount(), UnverifiedLawSectionCustomVoteCount = lawService.GetUnverifiedLawSectionCustomVotesCount(), UnverifiedQuestionsCount = lawService.GetUnverifiedQuestionsCount(), UnverifiedRepresentativeQuestionsCount = lawService.GetUnverifiedRepresentativeQuestionsCount(), UnverifiedPetitionsCount = petitionService.GetUnverifiedPetitionsCount() }; return(View(model)); }