public ActionResult AllocateClassRoom(AllocateClassRoom allocateClassRoom) { List <Department> aDepartments = aDepartmentManager.GetAllDepartment(); ViewBag.Departmentlist = aDepartments; List <Day> aDays = aRoomAndDayManager.GetAllDay(); ViewBag.Daylist = aDays; List <Room> aRooms = aRoomAndDayManager.GetAllRoom(); ViewBag.RoomList = aRooms; string message = aAllocateClassRoomManager.SaveAlocateClassRoom(allocateClassRoom); ViewBag.message = message; return(View()); }
public ActionResult AllocateClassRoom(string unassignSubmit, string submit, AllocateClassRoom allocateClassRoom) { List <Department> aDepartments = aDepartmentManager.GetAllDepartment(); ViewBag.Departmentlist = aDepartments; List <Day> aDays = aRoomAndDayManager.GetAllDay(); ViewBag.Daylist = aDays; List <Room> aRooms = aRoomAndDayManager.GetAllRoom(); ViewBag.RoomList = aRooms; if (submit != null) { string message = aAllocateClassRoomManager.SaveAlocateClassRoom(allocateClassRoom); ViewBag.message = message; } if (unassignSubmit != null) { string unallocationMessage = aRoomAndDayManager.ClassroomUnassign(); ViewBag.unallocationMessage = unallocationMessage; } return(View()); }
public ActionResult AllocateClassRoom(AllocateClassRoom allocateClassRoom) { if (Session["userType"] == null) { return(RedirectToAction("Login", "Account")); } if (Session["userType"].ToString() != "admin") { return(RedirectToAction("Index", "Home")); } List <Department> aDepartments = aDepartmentManager.GetAllDepartment(); ViewBag.Departmentlist = aDepartments; List <Day> aDays = aRoomAndDayManager.GetAllDay(); ViewBag.Daylist = aDays; List <Room> aRooms = aRoomAndDayManager.GetAllRoom(); ViewBag.RoomList = aRooms; string message = aAllocateClassRoomManager.SaveAlocateClassRoom(allocateClassRoom); ViewBag.message = message; return(View()); }