Exemplo n.º 1
0
        public ActionResult Roommanagement()
        {
            RoomListViewModel roomListview = new RoomListViewModel();
            string            name         = Session["UserName"].ToString();

            roomListview.GetRoomListView(name);

            return(View("../Host/RoomManagement_Host", roomListview));
        }
Exemplo n.º 2
0
        public ActionResult Roomsort(string option)
        {
            if (option == "All")
            {
                return(RedirectToAction("Roommanagement", "Dorm"));
            }
            else if (option == "Wait")
            {
                RoomListViewModel roomListview = new RoomListViewModel();
                string            name         = Session["UserName"].ToString();
                roomListview.GetRoomListView(name, Status.WaitRoomMate);
                return(View("../Host/RoomManagement_Host", roomListview));
            }
            else if (option == "Avaliable")
            {
                RoomListViewModel roomListview = new RoomListViewModel();
                string            name         = Session["UserName"].ToString();
                roomListview.GetRoomListView(name, Status.Avaliable);
                return(View("../Host/RoomManagement_Host", roomListview));
            }
            else if (option == "Not")
            {
                RoomListViewModel roomListview = new RoomListViewModel();
                string            name         = Session["UserName"].ToString();
                roomListview.GetRoomListView(name, Status.NotAvaliable);
                return(View("../Host/RoomManagement_Host", roomListview));
            }
            else if (option == "Reserved")
            {
                RoomListViewModel roomListview = new RoomListViewModel();
                string            name         = Session["UserName"].ToString();
                roomListview.GetRoomListView(name, Status.Reserved);
                return(View("../Host/RoomManagement_Host", roomListview));
            }

            return(Content(option));
        }