/// <summary> /// 房间留言 /// </summary> /// <param name="roomId"></param> /// <returns></returns> public ActionResult _SelMessage(long roomId) { var hotelId = UserContext.CurrentUser.HotelId; ViewBag.HotelId = hotelId; ViewBag.RoomId = roomId; var room = RoomBll.GetById(roomId); if (room != null) { var msg = RoomBll.GetMessage(roomId); if (msg == null) { msg = new RoomMessage(); } ViewBag.Message = msg; ViewBag.RoomRegId = room.RoomRegId; ViewBag.Room = room; ViewBag.RoomReg = RoomRegBll.GetById(room.RoomRegId); } else { ViewBag.Message = new RoomMessage(); ViewBag.Room = new Hotel.Model.Room(); ViewBag.RoomRegId = 0; ViewBag.RoomReg = new Hotel.Model.RoomReg(); } return(View()); }