Example #1
0
        public IActionResult DeleteUser(int id)
        {
            uS.deleteUser(id);
            AdminViewModel views = new AdminViewModel();

            views.users     = uS.getAllUsers().ToList();
            views.univers   = unvS.getAllUnivers().ToList();
            views.faculties = fS.getAllFaculties().ToList();
            return(View("Index", views));
        }
Example #2
0
        public IActionResult GetFaculties(Int32 Id)
        {
            IEnumerable <Faculties> Faculties = fS.getAllFaculties().Where(t => t.UniversId == Id);
            Univers Uni = unvS.getAllUnivers().Where(t => t.Id == Id).First();
            string  qwe = Uni.NameOfUniver;

            ViewBag.ChoisenUniver = qwe;
            return(View("FacultyList", Faculties.ToList()));
        }
Example #3
0
 public JsonResult Get(String Univer)
 {
     if (Univer != null)
     {
         Univers q = uS.getUniverByName(Univer);
         return(Json(fS.getFacultiesOfUniver(q.Id)));
     }
     else
     {
         return(Json(fS.getAllFaculties()));
     }
 }