public ActionResult AddClassroom()
        {
            List <Facility> Facilities = BUSFacility.GetFacilities();

            ViewBag.Facilities = new SelectList(Facilities, "ID", "Name");
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult AddFaculty()
        {
            List <Facility> facilities = BUSFacility.GetFacilities();

            ViewBag.facilities = new SelectList(facilities, "ID", "Name");
            return(View());
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 5
0
        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"));
        }