コード例 #1
0
 public virtual ActionResult Index()
 {
     ScrumTimeEntities scrumTimeEntities = new ScrumTimeEntities();
     string currentProductName = "None";
     string currentSprintName = "None";
     string nextReleaseName = "None";
     ProductService productService = new ProductService(scrumTimeEntities);
     Product product = productService.GetProductById(SessionHelper.GetCurrentProductId(User.Identity.Name, Session));
     if (product != null && product.ProductId > 0)
     {
         currentProductName = product.Name;
         SprintService sprintService = new SprintService(scrumTimeEntities);
         Sprint sprint = sprintService.GetSprintById(SessionHelper.GetCurrentSprintId(User.Identity.Name, Session));
         if (sprint != null && sprint.SprintId > 0)
         {
             currentSprintName = sprint.Name;
             ReleaseService releaseService = new ReleaseService(scrumTimeEntities);
             Release nextRelease = releaseService.GetNextReleaseEqOrAfterDate(sprint.ProductId, sprint.FinishDate);
             if (nextRelease != null && nextRelease.ReleaseId > 0)
                 nextReleaseName = nextRelease.Name;
         }
     }
     DashboardViewModel dashboardViewModel = new DashboardViewModel()
     {
         CurrentProductName = currentProductName,
         CurrentSprintName = currentSprintName,
         NextReleaseName = nextReleaseName
     };
     return PartialView(dashboardViewModel);
 }
コード例 #2
0
 public ReleaseController()
 {
     _ScrumTimeEntities = new ScrumTimeEntities();
     _ReleaseService = new ReleaseService(_ScrumTimeEntities);
     _ProductService = new ProductService(_ScrumTimeEntities);
 }
コード例 #3
0
 public ScheduleController()
 {
     _ScrumTimeEntities = new ScrumTimeEntities();
     _SprintService = new SprintService(_ScrumTimeEntities);
     _ReleaseService = new ReleaseService(_ScrumTimeEntities);
 }