/// <summary> /// 添加常坐座位 /// </summary> public void AddOften() { try { List <Seat> seats = T_SM_Seat.GetReaderOftenUsedSeat(ClientObject.EnterOutLogData.EnterOutlog.CardNo, ClientObject.ClientSetting.DeviceSetting.UsingOftenUsedSeat.LengthDays, ClientObject.ClientSetting.DeviceSetting.Rooms); for (int i = 0; i < 12; i++) { if (i > seats.Count - 1) { OftenUsedSeats[i].SeatNo = ""; OftenUsedSeats[i].ShortSeatNo = ""; OftenUsedSeats[i].ReadingRoomName = ""; OftenUsedSeats[i].ReadingRoomNo = ""; OftenUsedSeats[i].UCVisible = "Collapsed"; } else { OftenUsedSeats[i].SeatNo = seats[i].SeatNo; OftenUsedSeats[i].ShortSeatNo = SeatComm.SeatNoToShortSeatNo(ClientObject.ReadingRoomList[seats[i].ReadingRoomNum].Setting.SeatNumAmount, seats[i].SeatNo); OftenUsedSeats[i].ReadingRoomName = ClientObject.ReadingRoomList[seats[i].ReadingRoomNum].Name; OftenUsedSeats[i].ReadingRoomNo = seats[i].ReadingRoomNum; OftenUsedSeats[i].UCVisible = "Visible"; } } } catch (Exception ex) { WriteLog.Write("加载阅览室遇到异常" + ex.Message); PopupWindowsObject.GetInstance().Window.ShowMessage(TipType.Exception); } }
private void FrmOftenSeat_Load(object sender, EventArgs e) { try { string cardNo = clientobject.EnterOutLogData.EnterOutlog.CardNo; int days = clientobject.ClientSetting.DeviceSetting.UsingOftenUsedSeat.LengthDays; List <string> roomNums = clientobject.ClientSetting.DeviceSetting.Rooms; List <Seat> seats = T_SM_Seat.GetReaderOftenUsedSeat(cardNo, days, roomNums); InitiallizeOftenSeat(seats); } catch (Exception ex) { WriteLog.Write(string.Format("常坐座位窗体初始化遇到异常:{0}", ex.Message)); SeatManage.SeatClient.Tip.Tip_Framework tip = new SeatManage.SeatClient.Tip.Tip_Framework(SeatManage.EnumType.TipType.Exception, 7);//显示提示窗体 tip.ShowDialog(); } }