コード例 #1
0
 public ActionResult MyStatements()
 {
     if (User.Identity.IsAuthenticated && (User.IsInRole("Admin") || User.IsInRole("User")))
     {
         return(View(StatementManager.GetFormatStatementListViewModel(User.Identity.GetUserId(), false, "none", true)));
     }
     return(RedirectToAction("Index", "Home"));
 }
コード例 #2
0
 public ActionResult NotConsideredStatements()
 {
     if (User.Identity.IsAuthenticated && User.IsInRole("Admin"))
     {
         ViewBag.Type = "NotConsidered";
         return(View("~/Views/Kindergarten/Statements.cshtml", StatementManager.GetFormatStatementListViewModel("none", false, "NotConsidered", true)));
     }
     return(RedirectToAction("Index", "Home"));
 }
コード例 #3
0
 public ActionResult NotConsideredStatements(string id)
 {
     if (User.Identity.IsAuthenticated && (User.IsInRole("Admin") || (User.IsInRole("Administrator") && User.Identity.GetUserId() == id)))
     {
         ViewBag.Id   = id;
         ViewBag.Type = "NotConsidered";
         return(View("~/Views/Kindergarten/Statements.cshtml", StatementManager.GetFormatStatementListViewModel(id, true, "NotConsidered")));
     }
     return(RedirectToAction("Index", "Home"));
 }
コード例 #4
0
 public ActionResult Statements(string id)
 {
     if (User.Identity.IsAuthenticated && (User.IsInRole("Admin") || (User.IsInRole("Administrator") && User.Identity.GetUserId() == id)))
     {
         ViewBag.Id   = id;
         ViewBag.Type = "All";
         return(View(StatementManager.GetFormatStatementListViewModel(id, true)));
     }
     return(RedirectToAction("Index", "Home"));
 }