Example #1
0
 public ActionResult Index()
 {
     if (Roles.IsUserInRole("OfficeOwner"))
     {
         var officeInfos = OfficeService.GetAllOfficeInfos(WebSecurity.CurrentUserId);
         return(View("~/Views/Office/OfficeOwnerHome.cshtml", officeInfos));
     }
     if (Roles.IsUserInRole("Employee"))
     {
         var tasks = _databaseContex.TaskInfos.Where(_ => _.EmployeeId == WebSecurity.CurrentUserId);
         return(View("~/Views/Employee/Index.cshtml", tasks));
     }
     else
     {
         return(View());
     }
 }
Example #2
0
 public ActionResult OfficeOwnerHome()
 {
     return(View(OfficeService.GetAllOfficeInfos(WebSecurity.CurrentUserId)));
 }