Ejemplo n.º 1
0
 public static ScenarioViewModel CreateTopThird(IScenarioRepository repository, long projectID)
 {
     var viewModel = new ScenarioViewModel();
     viewModel.UtilitiesList = repository.UtilityList(projectID).OrderBy(x => x.Scenario.Priority).ToList();
     viewModel.ScenariosList = repository.GetTopThird(projectID).OrderBy(x => x.Priority).ToList();
     viewModel.TopScenarios = repository.GetTopThird(projectID).OrderBy(x => x.Priority);
     return viewModel;
 }
Ejemplo n.º 2
0
 public static ScenarioViewModel CreateIndex(IScenarioRepository repository, long projectID)
 {
     var viewModel = new ScenarioViewModel();
         viewModel.projectID = projectID;
         viewModel.Scenarios = repository.GetByProjectID(projectID).OrderBy(x => x.Priority);
         viewModel.Steps = repository.Steps().ToList();
         viewModel.ProjectName = repository.GetProjectByID(projectID).Name;
         viewModel.nextStepToComplete = repository.NextStepToComplete();
     return viewModel;
 }