Example #1
0
        public List <SelectListItem> GetRoomForDropdown()
        {
            List <SelectListItem> selectListItems = new List <SelectListItem>();

            selectListItems.Add(new SelectListItem()
            {
                Text = "--Select--", Value = ""
            });

            List <Room> GetAllRoom = allocateClassRoomGateway.GetAllRooms();


            foreach (Room aroom in GetAllRoom)
            {
                SelectListItem selectList = new SelectListItem();
                selectList.Text  = aroom.RoomName;
                selectList.Value = aroom.RoomID.ToString();
                selectListItems.Add(selectList);
            }
            return(selectListItems);
        }
Example #2
0
 public List <Room> GetAllRooms()
 {
     return(allocateClassRoomGateway.GetAllRooms());
 }