Beispiel #1
0
        public ActionResult Allocate(AllocateClassroom allocate)
        {
            DepartmentManager aDepartmentManager = new DepartmentManager();
            RoomManager       aRoomManager       = new RoomManager();
            sevendaysManager  aSevendaysManager  = new sevendaysManager();

            ViewBag.aldepartments = aDepartmentManager.GetAllDepartmentInfo();
            ViewBag.allrooms      = aRoomManager.GetAllRooms();
            ViewBag.sevendays     = aSevendaysManager.GetAllDays();
            AllocateClassRoomManager allocateClassRoomManager = new AllocateClassRoomManager();
            bool allocateRoom = allocateClassRoomManager.GetRoomCheck(allocate);

            if (allocate.From > allocate.To)
            {
                ViewBag.message = "Your Time Formate isn't Right";
            }

            else if (allocateRoom)
            {
                ViewBag.message = "Room Is Not Free";
            }
            else
            {
                if (allocateClassRoomManager.SaveAllocateClassRoom(allocate) > 0)
                {
                    ViewBag.message = "Room Is Allocated";
                }
                else
                {
                    ViewBag.message = "Failed To Allocated";
                }
            }

            return(View());
        }
Beispiel #2
0
 public ClassRoomController()
 {
     allocateClassRoomManager = new AllocateClassRoomManager();
     departmentManager        = new DepartmentManager();
     courseManager            = new CourseManager();
     roomManager = new RoomManager();
     dayManager  = new DayManager();
 }
Beispiel #3
0
 public AllocateClassRoomController()
 {
     departmentManager        = new DepartmentManager();
     courseManager            = new CourseManager();
     allocateClassRoomManager = new AllocateClassRoomManager();
     classRoomManager         = new ClassRoomManager();
     teacherManager           = new TeacherManager();
 }
 public AllocateClassRoomController()
 {
     departmentManager        = new DepartmentManager();
     courseManager            = new CourseManager();
     allocateClassRoomManager = new AllocateClassRoomManager();
     roomManager          = new RoomManager();
     dayManager           = new DayManager();
     classScheduleManager = new ClassScheduleManager();
 }
Beispiel #5
0
 public UnallocatedClassController()
 {
     allocateClassRoomManager = new AllocateClassRoomManager();
 }
 public AllocateClassRoomController()
 {
     allocateClassRoomManager = new AllocateClassRoomManager();
 }