public ActionResult StatementDetails(int id) { stm_list = recordsDAO.getStatementById(id); foreach (var item in stm_list) { ViewData["statement_title"] = item.title; ViewData["statement_subject"] = item.subjtitle; ViewData["statement_status"] = item.status; } foreach (var it in recordsDAO.GetStudGroupByStatementID(id)) { ViewData["idstudgr"] = it.idstudgroup; ViewData["studgrname"] = it.studgroupname; } ViewData["statement_id"] = id; if (User.IsInRole("dek")) { return(View("dekStatementDetails", recordsDAO.getMarksForStatement(id))); } else if (User.IsInRole("prep")) { ViewData["mymodel"] = (IEnumerable <uchet1.Models.Mark>)recordsDAO.getMarksForStatement(id); return(View("StatementDetails", new Mark { id_statement = id })); } else { return(View("Index")); } }