示例#1
0
        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());
        }
示例#3
0
        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());
        }