public ActionResult Contacts(int Projects, ContactsSearchViewModel search) { ViewBag.ProjectsName = Projectservice.GetnameProjects(Projects); var items = ContactsService.GetAll(Projects, search); ViewBag.Search = search; ViewBag.ProjectId = Projects; return(View("~/Views/Project/Contacts.cshtml", items)); }
// public async System.Threading.Tasks.Tasks<ActionResult> IndexAsync(int project) public ActionResult Index(int Projects) { Session["CurrentProId"] = Projects; var Outcomes = Outcomeservice.Get(Projects); //Taskservice.Save(listTasks); var jira = JiraService.GetJira(Projects); ViewBag.Jira = jira; ViewBag.Projects = Projectservice.Get(Projects); ViewBag.OutcomesUntilNow = Outcomes.Sum(i => i.Cost); ViewBag.OuotcomeDiff = ViewBag.Projects.TaskTotalCost - Outcomes.Sum(i => i.Cost); var percentage = (ViewBag.OuotcomeDiff / ViewBag.Projects.TaskTotalCost) * 100; percentage = Math.Floor(percentage); ViewBag.Percenses = percentage; ViewBag.ProjectsName = Projectservice.GetnameProjects(Projects); ViewBag.Status = ToDoListStatusesService.Get(); ViewBag.Projects = Projectservice.Get(); //var closestRisks = Riskservice.(Projects); //ViewBag.Days = Enumerable.Range(0, 1 + (closestRisks.Date - DateTime.Now).Days) //.Select(offset => (DateTime.Now).AddDays(offset)).Count(); var percentageSprint = jira.ClosedIssuesInActiveSprint / ViewBag.Jira.AllIssuesInActiveSprint * 100; if (percentageSprint > 0) { ViewBag.PercentageSprint = percentageSprint; } else { ViewBag.PercentageSprint = 0; } var percentageCloseSprint = jira.ClosestSprint * 100 / jira.CountSprint; if (percentageCloseSprint > 0) { ViewBag.PercentageCloseSprint = percentageCloseSprint; } else { ViewBag.PercentageCloseSprint = 0; } //ViewBag.ClosestRisks = closestRisks; ViewBag.ProjectId = Projects; ViewBag.CurrentProject = Projectservice.Get(Projects); Session["isManneger"] = Userservice.IsProjectManager(Projects, ((UsersViewModel)Session["CurrentUsers"]).Id); return(View()); }