/// <summary> /// 初始化桌子列表 /// </summary> public void InitDeskList() { this.clean(); for (int i = 0; i < 5; i++) { DeskInfo desk = new DeskInfo(); desk.deskNo = i; this.deskList.Add(desk); } this.sortDesk(this.deskList); }
/// <summary> /// 根据房间号获得房间信息 /// </summary> /// <param name="deskNo"></param> /// <returns></returns> public DeskInfo getDeskByNo(int deskNo) { DeskInfo findDesk = null; for (int i = 0; i < this.deskList.Count; i++) { var desk = this.deskList[i]; if (deskNo == desk.deskNo) { findDesk = desk; return(findDesk); } } Log.Debug("no find deskNo" + deskNo); return(null); }
/// <summary> /// 初始化 /// </summary> private void init() { this.deskList = new List <DeskInfo>(); this.curDesk = null; }