public ActionResult AllocateClassroom(AllocateClassroom allocateClassroom) { _allocateClassRoomManager.IsRoomAllocated(allocateClassroom); if (_allocateClassRoomManager.Message == "") { bool result = _allocateClassRoomManager.Save(allocateClassroom); if (result) { ViewBag.SuccessMessage = "Class Room Allocated Successfully"; } else { ViewBag.ErrorMessage = "Class Room Allocation Failed"; } } else { ViewBag.ErrorMessage = _allocateClassRoomManager.Message; } ViewBag.Department = _departmentManager.GetAllDepartments(); ViewBag.Classroom = _classroomManager.GetAllRooms(); ViewBag.Day = _dayManager.GetAllDays(); return(View()); }