Ejemplo n.º 1
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()));
     }
 }
Ejemplo n.º 2
0
        public IActionResult Index()
        {
            int defaultUniversId;
            IEnumerable <Univers> univers = new List <Univers> {
            };

            univers          = unvS.getAllUnivers();
            defaultUniversId = univers.First().Id;
            ViewBag.univers  = new SelectList(univers, "Id", "NameOfUniver", defaultUniversId);
            IEnumerable <Faculties> faculties = new List <Faculties> {
            };

            faculties         = fS.getFacultiesOfUniver(defaultUniversId);
            ViewBag.faculties = new SelectList(faculties, "Id", "NameOfFaculties");

            return(View("Index", unvS.getAllUnivers()));
        }
Ejemplo n.º 3
0
 public ActionResult GetFacultiesOfUnivers(int id)
 {
     return(PartialView(fS.getFacultiesOfUniver(id)));
 }