public ActionResult AddClassroom() { List <Facility> Facilities = BUSFacility.GetFacilities(); ViewBag.Facilities = new SelectList(Facilities, "ID", "Name"); return(View()); }
public ActionResult AddFaculty() { List <Facility> facilities = BUSFacility.GetFacilities(); ViewBag.facilities = new SelectList(facilities, "ID", "Name"); return(View()); }
public ActionResult EditFaculty(int ID) { List <Facility> facilities = BUSFacility.GetFacilities(); ViewBag.facilities = new SelectList(facilities, "ID", "Name"); Faculty facu = BUSFaculty.GetFacultyByID(ID); return(View(facu)); }
public ActionResult Index(int?FacilityID) { List <Facility> Facilities = BUSFacility.GetFacilities(); ViewBag.Facilities = new SelectList(Facilities, "ID", "Name"); List <Classroom> Clasro = BUSClassroom.GetClassroomsByFacilityID02(FacilityID.HasValue ? FacilityID.Value : Facilities.First().ID); return(View(Clasro)); }
public ActionResult AddFaculty(Faculty faculty) { if (!ModelState.IsValid) { List <Facility> facilities = BUSFacility.GetFacilities(); ViewBag.facilities = new SelectList(facilities, "ID", "Name"); return(View(faculty)); } BUSFaculty.AddFaculty(faculty); return(RedirectToAction("FaculitiesList")); }