Exemple #1
0
 public ActionResult Add(string id)
 {
     try
     {
         _LoggingService.Write("ExecutionController (Add) page access", true);
         _ExecutionRepository.AddPlane(_ExecutionRepository.GetCurrent(), id);
         return(RedirectToAction("Index", "Home"));
     }
     catch (Exception ex)
     {
         _LoggingService.WriteWithInner(ex, true, "ExecutionController(Add) error: ");
         return(new HttpNotFoundResult());
     }
 }
Exemple #2
0
        public ActionResult Index()
        {
            try
            {
                _LoggingService.Write("HomeController (Index) page access", true);
                HomeViewModel vmHome = new HomeViewModel();
                _PreferenceRepository.LoadBasePreferences(vmHome);
                vmHome.ScriptListViewModel.List = _ScriptRepository.GetAll();
                vmHome.PlaneListViewModel.List  = _PlaneRepository.GetAll();

                Execution currentExecution = _ExecutionRepository.GetCurrent();
                vmHome.ExecutionViewModel.Current = currentExecution;
                vmHome.ExecutionViewModel.List    = _PlaneRepository.GetPlaneList(currentExecution.ExecutionPlane.ToList());

                return(View(vmHome));
            }
            catch (Exception ex)
            {
                _LoggingService.WriteWithInner(ex, true, "HomeController(Index) error: ");
                return(new HttpNotFoundResult());
            }
        }
Exemple #3
0
 public void GetCurrent()
 {
     Assert.IsNotNull(myExecutionRepository.GetCurrent());
 }
Exemple #4
0
 public void GetPlaneList()
 {
     Assert.IsTrue(myPlaneRepository.GetPlaneList(myExecutionRepository.GetCurrent().ExecutionPlane.ToList()).Count > 0);
 }