Esempio n. 1
0
        /// <summary>
        /// 获取所有的阅览室列表
        /// </summary>
        public void GetReadingRooms()
        {
            SeatManage.Bll.ReadingRoomOperate            readingRoomBll = new SeatManage.Bll.ReadingRoomOperate();
            List <SeatManage.ClassModel.ReadingRoomInfo> rooms          = SeatManage.Bll.T_SM_ReadingRoom.GetReadingRooms(null, null, null);

            this.ReadingRoom.Clear();
            for (int i = 0; i < rooms.Count; i++)
            {
                if (this.ReadingRoom.Count == 0)
                {
                    this.ReadingRoom.Add(new SeatManage.ClassModel.ReadingRoomInfo {
                        No = "", Name = "请选择", SeatList = new SeatManage.ClassModel.SeatLayout()
                    });
                }
                this.ReadingRoom.Add(rooms[i]);
            }
            ReadingRoomPostion.Add(new RoomPosition {
                PositionName = "请选择", PositionValue = ReadingRoomPosition.None
            });
            ReadingRoomPostion.Add(new RoomPosition {
                PositionName = "东", PositionValue = ReadingRoomPosition.East
            });
            ReadingRoomPostion.Add(new RoomPosition {
                PositionName = "西", PositionValue = ReadingRoomPosition.West
            });
            ReadingRoomPostion.Add(new RoomPosition {
                PositionName = "南", PositionValue = ReadingRoomPosition.South
            });
            ReadingRoomPostion.Add(new RoomPosition {
                PositionName = "北", PositionValue = ReadingRoomPosition.North
            });
        }
 public void GetData()
 {
     try
     {
         ReadingRoomPostion.Clear();
         ReadingRoomPostion.Add(new RoomPosition {
             PositionName = "请选择", PositionValue = ReadingRoomPosition.None
         });
         ReadingRoomPostion.Add(new RoomPosition {
             PositionName = "东", PositionValue = ReadingRoomPosition.East
         });
         ReadingRoomPostion.Add(new RoomPosition {
             PositionName = "西", PositionValue = ReadingRoomPosition.West
         });
         ReadingRoomPostion.Add(new RoomPosition {
             PositionName = "南", PositionValue = ReadingRoomPosition.South
         });
         ReadingRoomPostion.Add(new RoomPosition {
             PositionName = "北", PositionValue = ReadingRoomPosition.North
         });
         ReadingRooms.Clear();
         ObservableCollection <ViewModel.ViewModel_ReadingRoom> ReadingRoomList = SeatLayoutTool.Code.ReadingRoomEdit.GetReadingRooms();
         ReadingRooms.Add(new ViewModel.ViewModel_ReadingRoom()
         {
             No = "0", Name = "请选择"
         });
         foreach (ViewModel.ViewModel_ReadingRoom vm in ReadingRoomList)
         {
             ReadingRooms.Add(vm);
         }
     }
     catch (Exception ex)
     {
         ErrorMessage = ex.Message;
     }
 }