Exemple #1
0
        // GET: /<controller>/
        /// <summary>
        /// Action method <c>StartCoordinator</c> that returns the view with tables of errands.
        /// List of errands are passed as viewbag
        /// ListofDepartments are passed as viewbag =>shown as dropdown list. kommunen is excluded from the list (from repository)
        /// </summary>
        /// <param name="request">takes a request as parameter which decided which data to be fetched from database.</param>
        /// <returns>View with table of errands filtered as request object.</returns>
        public ViewResult StartCoordinator(InvokeRequest request)
        {
            ViewBag.ErrandList        = repository.GetErrandList(request);
            ViewBag.ListOfDepartments = repository.Departments;

            return(View());
        }
 // GET: /<controller>/
 public ViewResult StartManager(InvokeRequest request)
 {
     ViewBag.ErrandList   = repository.GetErrandList(request);
     ViewBag.EmployeeList = repository.Employees.Where(x => x.DepartmentId == repository.GetUserDepartment());
     return(View());
 }
Exemple #3
0
 // GET: /<controller>/
 /// <summary>
 /// Action method that receives request object and returns view with table of data filtered according to <c>request</c>
 /// </summary>
 /// <param name="request">object of <c>InvokeRequest that holds filtering parameters</c></param>
 /// <returns></returns>
 public ViewResult StartInvestigator(InvokeRequest request)
 {
     ViewBag.ErrandList = repository.GetErrandList(request);
     return(View());
 }