Пример #1
0
 // GET: Home (for neizv)
 public ActionResult Index()
 {
     if (User.IsInRole("dek"))
     {
         return(View("ViewStatements", recordsDAO.dekGETALLSTATEMENTS()));
     }
     else if (User.IsInRole("prep"))
     {
         string prepid = User.Identity.GetUserId();
         return(View("ViewStatements", recordsDAO.getStatementsForPrep(prepid)));
     }
     else if (User.IsInRole("stud"))
     {
         string studid = User.Identity.GetUserId();
         ViewData["this_view_title"] = "Просмотр всех оценок студента";
         return(View("studViewMarks", recordsDAO.studGetMarks(studid, "all")));
     }
     else
     {
         return(View("neizv-user"));
     }
 }