public async Task <ActionResult> ProjectBoxDropDowns(int?id) { var allProjects = new SelectList(projectServices.GetForUser(User.Identity.GetUserId()), "IdProject", "ProjectName", User.Identity.GetActiveProject()); return(PartialView("LayoutPartials/ProjectBoxDropDowns", new ProjectsBoxDropDownsViewModels() { ProjectsDropDowns = allProjects })); }
// GET: Contexts public ActionResult Index() { var model = projectServices.GetForUser(User.Identity.GetUserId()).ProjectTo <ProjectsViewModel>(); SetViewBagsAndHeaders(Request.IsAjaxRequest(), "All projects", " "); if (Request.IsAjaxRequest()) { return(PartialView(model)); } return(View(model)); }
public ActionResult Index() { var model = new IndexViewModels { Languages = { CurrentCount = langService.GetByActiveProject(UserActiveProject).Count(), ActiveCount = langService.GetActiveByActiveProject(UserActiveProject).Count() }, Contexts = { CurrentCount = phrsContService.GetAllByIdProject(UserActiveProject, User.Identity.GetUserId()).Count(), Translated = phrsContService.GetTranslatedByIdProject(UserActiveProject, User.Identity.GetUserId()).Count() }, Projects = { ProjectCount = projectServices.GetForUser(User.Identity.GetUserId()).Count() }, SystemStabilityBox = GetSystemStabilityLoggsViewModel(), BearerToken = tokenContainer.ApiToken?.ToString() }; SetViewBagsAndHeaders(Request.IsAjaxRequest(), "Dashboard", "Hello! This is your administration panel."); if (Request.IsAjaxRequest()) { return(PartialView(model)); } return(View(model)); }