/// <summary> /// ÉèÖð´Å¥Ñùʽ /// </summary> /// <param name="btn">°´Å¥</param> /// <param name="btnType">ÀàÐÍ</param> /// <param name="ReadRoonNo">ÔÄÀÀÊÒ±àºÅ</param> private ReadingRoomButton InitDrawRoom(ReadingRoomInfo room, ReadingRoomStatus roomStatus) { SeatManage.MyUserControl.ReadingRoomButton roomButton = new SeatManage.MyUserControl.ReadingRoomButton(); try { roomButton.RoomNum = room.No; roomButton.Text = room.Name; int stopSeatCount = 0; foreach (KeyValuePair <string, Seat> item in room.SeatList.Seats) { if (item.Value.IsSuspended) { stopSeatCount++; } } roomButton.RoomUsedTip = roomSeatUsingState[room.No].SeatAmountUsed + "/" + (roomSeatUsingState[room.No].SeatAmountAll - stopSeatCount); roomButton.SeatUsingStatus = roomSeatUsingState[room.No].RoomSeatUsingState; //×ùλʹÓÃ״̬¸³Öµ roomButton.RoomStatus = roomStatus; //ÔÄÀÀÊÒ״̬¸³Öµ if (roomStatus != ReadingRoomStatus.Close && roomStatus != ReadingRoomStatus.BeforeClose) { roomButton.Click += new EventHandler(roomButton_Click); } return(roomButton); } catch (Exception ex) { throw ex; } }
private void ReadingRoomChooseForm_Load(object sender, EventArgs e) { #region ÏÔʾ´¥ÃþÆÁËù¹ÜÀíµÄÔÄÀÀÊÒ int roomCationX = 120; //ÔÄÀÀÊÒºáÏò×ø±ê int roomCationY = 140; //ÔÄÀÀÊÒÊúÖ±·½Ïò×ø±ê if (clientObject.ClientSetting.DeviceSetting.SystemResoultion.WindowSize.Size.X != 1080) { roomCationX = 80; roomCationY = 130; } int roomCount = 0; List <string> roomNums = new List <string>(); foreach (ReadingRoomInfo room in clientObject.ReadingRoomList.Values) { roomNums.Add(room.No); } //»ñÈ¡ÔÄÀÀÊÒ×ùλʹÓÃ״̬ roomSeatUsingState = NowReadingRoomState.GetRoomSeatUsedState(roomNums); foreach (string roomNum in clientObject.ClientSetting.DeviceSetting.Rooms) { ReadingRoomInfo room = clientObject.ReadingRoomList[roomNum]; ReadingRoomStatus roomStatus = NowReadingRoomState.ReadingRoomOpenState(room.Setting.RoomOpenSet, ServiceDateTime.Now); if (roomStatus == ReadingRoomStatus.Close && !clientObject.ClientSetting.DeviceSetting.IsShowClosedRoom) { continue; } ReadingRoomButton btnRoom = InitDrawRoom(room, roomStatus); btnRoom.Location = new Point(roomCationX, roomCationY); roomCount++; if (roomCount % 4 != 0) { roomCationX += 220; } else { if (clientObject.ClientSetting.DeviceSetting.SystemResoultion.WindowSize.Size.X != 1080) { roomCationX = 80; } else { roomCationX = 120; } roomCationY += 150; } this.Controls.Add(btnRoom); } #endregion #region ¹Ø±ÕÔÄÀÀÊÒ formClose = new FormCloseCountdown(int.Parse(lblCountdown.Text)); formClose.EventCountdown += new EventHandler(formClose_EventCountdown); #endregion }
/// <summary> /// 阅览室开放状态 /// </summary> /// <param name="openSeat"></param> /// <returns></returns> public static ReadingRoomStatus ReadingRoomOpenState(RoomOpenTimeSet openSeat, DateTime time) { if (openSeat.UninterruptibleModel) { return(ReadingRoomStatus.Open); } ReadingRoomStatus openState = ReadingRoomStatus.Close; if (openSeat.UsedAdvancedSet)//启用高级设置 { DayOfWeek day = time.DayOfWeek; try { RoomOpenPlanSet plan = openSeat.RoomOpenPlan[day]; if (plan.Used) { foreach (TimeSpace t in plan.OpenTime) { openState = calcRoomState(t.BeginTime, t.EndTime, time, openSeat.OpenBeforeTimeLength, openSeat.CloseBeforeTimeLength); switch (openState) { //当前时间阅览室状态为非关闭状态,直接返回结果。否则继续判断 case ReadingRoomStatus.BeforeClose: case ReadingRoomStatus.BeforeOpen: case ReadingRoomStatus.Open: return(openState); } } //遍历结束没有返回,则返回最后一次计算的结果 return(openState); } else { //否则当天没启用高级设置,返回默认开馆状态 openState = calcRoomState(openSeat.DefaultOpenTime.BeginTime, openSeat.DefaultOpenTime.EndTime, time, openSeat.OpenBeforeTimeLength, openSeat.CloseBeforeTimeLength); return(openState); } } catch { //当天没有高级设置,则返回默认开馆状态。 openState = calcRoomState(openSeat.DefaultOpenTime.BeginTime, openSeat.DefaultOpenTime.EndTime, time, openSeat.OpenBeforeTimeLength, openSeat.CloseBeforeTimeLength); return(openState); } } else { //没有开启高级设置,则返回默认开馆状态。 openState = calcRoomState(openSeat.DefaultOpenTime.BeginTime, openSeat.DefaultOpenTime.EndTime, time, openSeat.OpenBeforeTimeLength, openSeat.CloseBeforeTimeLength); return(openState); } }
protected void Page_Load(object sender, EventArgs e) { if (LoginUserInfo == null) { Response.Redirect(LoginUrl()); return; } DataBind(); int refreshNum = CookiesManager.RefreshNum; refreshNum += 1; CookiesManager.RefreshNum = refreshNum; if (!IsPostBack) { ShowReaderState(); } spanWarmInfo.InnerText = ""; spanWarmInfo.Visible = false; if (!Page.IsPostBack && refreshNum < 2) { } else { cmd = Request.Form["subCmd"]; //SeatManage.IPocketBookOnlineBll.IMainFunctionPageBll mainFunctionBll = new SeatManage.PocketBookOnLine.Bll.MainFunctionBll(); ReadingRoomStatus roomState = new ReadingRoomStatus(); if (LoginUserInfo.AtReadingRoom != null) { roomState = NowReadingRoomState.ReadingRoomOpenState(LoginUserInfo.AtReadingRoom.Setting.RoomOpenSet, DateTime.Now); } switch (cmd) { case "LoginOut": Session.Clear(); Response.Cookies["userInfo"].Expires = DateTime.Now.AddDays(-1); CookiesManager.RefreshNum = 0; string LogOutUrl = LogoutUrl(); if (string.IsNullOrEmpty(LogOutUrl)) { Response.Redirect("/seatwap/Login.aspx"); } else { Response.Redirect(LogOutUrl); } break; } } }
protected void Page_Load(object sender, EventArgs e) { if (this.LoginUserInfo == null || this.UserSchoolInfo == null) { Response.Redirect(LoginUrl()); return; } DataBind(); int refreshNum = SeatManage.SeatManageComm.CookiesManager.RefreshNum; refreshNum += 1; SeatManage.SeatManageComm.CookiesManager.RefreshNum = refreshNum; if (!IsPostBack) { LoginUserInfo = weiXinService.GetUserInfo_WeiXin(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo); ShowReaderState(); } //暂时注释ShowBookLogs(); spanWarmInfo.InnerText = ""; spanWarmInfo.Visible = false; if (!Page.IsPostBack && refreshNum < 2) { } else { cmd = Request.Form["subCmd"]; bookNo = Request.Form["subBookNo"]; //SeatManage.IPocketBookOnlineBll.IMainFunctionPageBll mainFunctionBll = new SeatManage.PocketBookOnLine.Bll.MainFunctionBll(); ReadingRoomStatus roomState = new ReadingRoomStatus(); if (LoginUserInfo.AjmReadingRoomState != null) { roomState = (ReadingRoomStatus)Enum.Parse(typeof(ReadingRoomStatus), LoginUserInfo.AjmReadingRoomState.OpenCloseState); } switch (cmd) { case "shortLeave": shortLeaveHandle(); //设置读者暂离 this.LoginUserInfo = weiXinService.GetUserInfo_WeiXin(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo); //重新绑定读者状态 ShowReaderState(); break; case "leave": //释放读者座位 freeSeat(); this.LoginUserInfo = weiXinService.GetUserInfo_WeiXin(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo);; ShowReaderState(); break; case "LoginOut": Session.Clear(); Response.Cookies["userInfo"].Expires = DateTime.Now.AddDays(-1); SeatManage.SeatManageComm.CookiesManager.RefreshNum = 0; Response.Redirect(LogoutUrl()); break; case "ContinuedWhen": LoginUserInfo = weiXinService.GetUserInfo_WeiXin(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo);; EnterOutLogType enterOutLogType = new EnterOutLogType(); enterOutLogType = (EnterOutLogType) Enum.Parse(typeof(EnterOutLogType), LoginUserInfo.AjmReaderStatus.AjmEnterOutLog.EnterOutState); if (LoginUserInfo.AjmReaderStatus.AjmEnterOutLog != null && enterOutLogType != EnterOutLogType.Leave) { switch (enterOutLogType) { case EnterOutLogType.BookingConfirmation: case EnterOutLogType.SelectSeat: case EnterOutLogType.ContinuedTime: case EnterOutLogType.ComeBack: case EnterOutLogType.ReselectSeat: case EnterOutLogType.WaitingSuccess: LoginUserInfo.AjmReaderStatus.AjmEnterOutLog.Remark = "通过手机预约网站延长座位使用时间"; LoginUserInfo.AjmReaderStatus.AjmEnterOutLog.EnterOutState = EnterOutLogType.ContinuedTime.ToString(); ContinuedWhen(); ShowReaderState(); break; case EnterOutLogType.ShortLeave: spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "续时失败,你处于暂离状态"; break; } } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "续时失败,您还没有选座"; } break; case "ComeBack": enterOutLogType = (EnterOutLogType) Enum.Parse(typeof(EnterOutLogType), LoginUserInfo.AjmReaderStatus.AjmEnterOutLog.EnterOutState); LoginUserInfo = weiXinService.GetUserInfo_WeiXin(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo); if (LoginUserInfo.AjmReaderStatus.AjmEnterOutLog != null && enterOutLogType == EnterOutLogType.ShortLeave) { LoginUserInfo.AjmReaderStatus.AjmEnterOutLog.Remark = "通过手机预约网站恢复在座"; LoginUserInfo.AjmReaderStatus.AjmEnterOutLog.EnterOutState = EnterOutLogType.ComeBack.ToString(); ComeBack(); ShowReaderState(); } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "暂离回来失败,您还没有暂离"; } break; case "cancel": CancelBookLog(bookNo); confrimSeat(); LoginUserInfo = weiXinService.GetUserInfo_WeiXin(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo); //重新绑定读者状态 ShowReaderState(); //暂时注释ShowBookLogs(); break; case "CancelWait": if (LoginUserInfo.AjmReaderStatus.AjmWaitSeatLogs != null) { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = weiXinService.CancelWait(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo); ShowReaderState(); } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "当前没有等待的座位"; } break; case "CancelBook": if (LoginUserInfo.AjmReaderStatus.AjmBespeakLogs != null && LoginUserInfo.AjmReaderStatus.AjmBespeakLogs.Count > 0) { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = weiXinService.CancelBesapeakById(int.Parse(LoginUserInfo.AjmReaderStatus.AjmBespeakLogs[0].Id), UserSchoolInfo.SchoolNo); LoginUserInfo = weiXinService.GetUserInfo_WeiXin(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo); //重新绑定读者状态 ShowReaderState(); //暂时注释ShowBookLogs(); } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "当前没有预约的座位"; } break; case "BookConfirm": if (LoginUserInfo.AjmReaderStatus.AjmBespeakLogs != null && LoginUserInfo.AjmReaderStatus.AjmBespeakLogs.Count > 0) { confrimSeat(); LoginUserInfo = weiXinService.GetUserInfo_WeiXin(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo); //重新绑定读者状态 ShowReaderState(); //暂时注释ShowBookLogs(); } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "当前没有预约的座位"; } break; } subCmd.Value = ""; } }
/// <summary> /// 执行阅览室开闭馆处理 /// </summary> /// <param name="RoomsStatus">阅览室状态</param> public void OpenCloseReadingRoom() { try { DateTime nowDateTime = ServiceDateTime.Now; List <ReadingRoomOpenCloseLogInfo> rrocList = T_SM_RROpenCloseLog.GetReadingRoomOClog(null, LogStatus.Valid, null, null); //遍历所有阅览室 foreach (ReadingRoomInfo rri in roomList.Values.Where(rri => rri.Setting != null)) { //获取阅览室状态 ReadingRoomOpenCloseLogInfo rroc = rrocList.OrderByDescending(u => u.OperateTime).ToList().Find(u => u.ReadingRoomNo == rri.No); if (rroc == null) { rroc = new ReadingRoomOpenCloseLogInfo(); rroc.OpenCloseState = ReadingRoomStatus.Close; rroc.ReadingRoomNo = rri.No; rroc.OperateNo = SeatComm.RndNum(); rroc.OperateTime = nowDateTime; rroc.Logstatus = LogStatus.Valid; } int new_id = 0; //如果启用24小时模式 if (rri.Setting.RoomOpenSet.UninterruptibleModel) { if (rroc.OpenCloseState == ReadingRoomStatus.Close) { rroc.OpenCloseState = ReadingRoomStatus.Open; rroc.OperateTime = nowDateTime; T_SM_RROpenCloseLog.AddNewReadingRoomOClog(rroc, ref new_id); WriteLog.Write(string.Format("监控服务:{0},开启", rri.Name)); } continue; } ReadingRoomStatus nowState = rri.Setting.ReadingRoomOpenState(nowDateTime); //判断状态 if (rroc.OpenCloseState == nowState) { continue; } switch (nowState) { case ReadingRoomStatus.Open: rroc.OpenCloseState = ReadingRoomStatus.Open; rroc.OperateTime = ServiceDateTime.Now; rroc.OperateNo = SeatComm.RndNum(); T_SM_RROpenCloseLog.AddNewReadingRoomOClog(rroc, ref new_id); WriteLog.Write(string.Format("监控服务:{0},开启", rri.Name)); break; case ReadingRoomStatus.Close: CloseReadingRoom(rri); rroc.OpenCloseState = ReadingRoomStatus.Close; rroc.OperateTime = ServiceDateTime.Now; T_SM_RROpenCloseLog.AddNewReadingRoomOClog(rroc, ref new_id); WriteLog.Write(string.Format("监控服务:{0},关闭", rri.Name)); break; } } } catch (Exception ex) { WriteLog.Write(string.Format("监控服务:执行阅览室开闭馆处理遇到错误:{0}", ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { if (LoginUserInfo == null) { Response.Redirect(LoginUrl()); return; } DataBind(); int refreshNum = CookiesManager.RefreshNum; refreshNum += 1; CookiesManager.RefreshNum = refreshNum; if (!IsPostBack) { LoginUserInfo = handler.GetReaderInfo(LoginUserInfo.CardNo); ShowReaderState(); } ShowBookLogs(); spanWarmInfo.InnerText = ""; spanWarmInfo.Visible = false; if (!Page.IsPostBack && refreshNum < 2) { } else { cmd = Request.Form["subCmd"]; bookNo = Request.Form["subBookNo"]; //SeatManage.IPocketBookOnlineBll.IMainFunctionPageBll mainFunctionBll = new SeatManage.PocketBookOnLine.Bll.MainFunctionBll(); ReadingRoomStatus roomState = new ReadingRoomStatus(); if (LoginUserInfo.AtReadingRoom != null) { roomState = NowReadingRoomState.ReadingRoomOpenState(LoginUserInfo.AtReadingRoom.Setting.RoomOpenSet, DateTime.Now); } switch (cmd) { case "shortLeave": shortLeaveHandle(); //设置读者暂离 LoginUserInfo = handler.GetReaderInfo(LoginUserInfo.CardNo); //重新绑定读者状态 ShowReaderState(); break; case "leave": //释放读者座位 freeSeat(); LoginUserInfo = handler.GetReaderInfo(LoginUserInfo.CardNo); ShowReaderState(); break; case "LoginOut": Session.Clear(); Response.Cookies["userInfo"].Expires = DateTime.Now.AddDays(-1); CookiesManager.RefreshNum = 0; Response.Redirect(LogoutUrl()); break; case "ContinuedWhen": LoginUserInfo = handler.GetReaderInfo(LoginUserInfo.CardNo); if (LoginUserInfo.EnterOutLog != null && LoginUserInfo.EnterOutLog.EnterOutState != EnterOutLogType.Leave) { switch (LoginUserInfo.EnterOutLog.EnterOutState) { case EnterOutLogType.BookingConfirmation: case EnterOutLogType.SelectSeat: case EnterOutLogType.ContinuedTime: case EnterOutLogType.ComeBack: case EnterOutLogType.ReselectSeat: case EnterOutLogType.WaitingSuccess: LoginUserInfo.EnterOutLog.Remark = "通过手机预约网站延长座位使用时间"; LoginUserInfo.EnterOutLog.EnterOutState = EnterOutLogType.ContinuedTime; ContinuedWhen(); ShowReaderState(); break; case EnterOutLogType.ShortLeave: spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "续时失败,你处于暂离状态"; break; } } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "续时失败,您还没有选座"; } break; case "ComeBack": LoginUserInfo = handler.GetReaderInfo(LoginUserInfo.CardNo); if (LoginUserInfo.EnterOutLog != null && LoginUserInfo.EnterOutLog.EnterOutState == EnterOutLogType.ShortLeave) { LoginUserInfo.EnterOutLog.Remark = "通过手机预约网站恢复在座"; LoginUserInfo.EnterOutLog.EnterOutState = EnterOutLogType.ComeBack; ComeBack(); ShowReaderState(); } spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "暂离回来失败,您还没有暂离"; break; case "cancel": CancelBookLog(bookNo); confrimSeat(); LoginUserInfo = handler.GetReaderInfo(LoginUserInfo.CardNo); //重新绑定读者状态 ShowReaderState(); ShowBookLogs(); break; case "CancelWait": if (LoginUserInfo.WaitSeatLog != null) { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = handler.CancelWait(LoginUserInfo.WaitSeatLog); ShowReaderState(); } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "当前没有等待的座位"; } break; case "CancelBook": if (LoginUserInfo.BespeakLog != null && LoginUserInfo.BespeakLog.Count > 0) { spanWarmInfo.Visible = true; if (handler.UpdateBookLogsState(int.Parse(LoginUserInfo.BespeakLog[0].BsepeaklogID))) { spanWarmInfo.InnerText = "取消预约成功"; confrimSeat(); LoginUserInfo = handler.GetReaderInfo(LoginUserInfo.CardNo); //重新绑定读者状态 ShowReaderState(); ShowBookLogs(); } else { spanWarmInfo.InnerText = "取消预约取消失败"; } } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "当前没有预约的座位"; } break; case "BookConfirm": if (LoginUserInfo.BespeakLog != null && LoginUserInfo.BespeakLog.Count > 0) { confrimSeat(); LoginUserInfo = handler.GetReaderInfo(LoginUserInfo.CardNo); //重新绑定读者状态 ShowReaderState(); ShowBookLogs(); } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "当前没有预约的座位"; } break; } subCmd.Value = ""; } }
void seatBtn_Click(object sender, EventArgs e) { try { OftenUsedSeatButton seatBtn = sender as OftenUsedSeatButton; if (string.IsNullOrEmpty(seatBtn.SeatNo)) { return; } ReadingRoomInfo roomInfo = clientobject.ReadingRoomList[seatBtn.ReadingRoomNo]; if (seatBtn != null) { #region 验证黑名单 if (SelectSeatProven.ProvenReaderState(clientobject.EnterOutLogData.Student, roomInfo, clientobject.RegulationRulesSet.BlacklistSet, clientobject.ClientSetting.DeviceSetting)) { clientobject.EnterOutLogData.EnterOutlog.SeatNo = ""; return; } #endregion #region 检查阅览室当前状态 ReadingRoomStatus roomState = NowReadingRoomState.ReadingRoomOpenState(roomInfo.Setting.RoomOpenSet, ServiceDateTime.Now); if (roomState == ReadingRoomStatus.Close || roomState == ReadingRoomStatus.BeforeClose) { SeatManage.SeatClient.Tip.Tip_Framework tip = new SeatManage.SeatClient.Tip.Tip_Framework(SeatManage.EnumType.TipType.ReadingRoomClosing, 7);//显示提示窗体 tip.ShowDialog(); clientobject.EnterOutLogData.EnterOutlog.SeatNo = ""; return; } #endregion #region 锁定座位。 SeatManage.EnumType.SeatLockState lockseat = T_SM_Seat.LockSeat(seatBtn.SeatNo); if (lockseat == SeatManage.EnumType.SeatLockState.Locked)//座位成功加锁 { string roomName = seatBtn.ReadingRoomName; string seatNo = seatBtn.ShortSeatNo; clientobject.EnterOutLogData.Student.AtReadingRoom = roomInfo; clientobject.EnterOutLogData.EnterOutlog.SeatNo = seatBtn.SeatNo; clientobject.EnterOutLogData.EnterOutlog.TerminalNum = clientobject.ClientSetting.ClientNo; clientobject.EnterOutLogData.FlowControl = SeatManage.EnumType.ClientOperation.SelectSeat; //操作为选择座位 clientobject.EnterOutLogData.EnterOutlog.ReadingRoomNo = seatBtn.ReadingRoomNo; clientobject.EnterOutLogData.EnterOutlog.Remark = string.Format("在终端{0}选择常坐座位,{1},{2}号座位", clientobject.ClientSetting.ClientNo, roomName, seatNo); this.Close(); this.Dispose(); } else if (lockseat == SeatManage.EnumType.SeatLockState.UnLock) //没有成功加锁 { SeatManage.SeatClient.Tip.Tip_Framework tip = new SeatManage.SeatClient.Tip.Tip_Framework(SeatManage.EnumType.TipType.SeatLocking, 7); //显示提示窗体 tip.ShowDialog(); clientobject.EnterOutLogData.EnterOutlog.SeatNo = ""; } #endregion } } 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(); clientobject.EnterOutLogData.EnterOutlog.SeatNo = ""; } }
protected void Page_Load(object sender, EventArgs e) { if (this.LoginUserInfo == null || this.UserSchoolInfo == null) { Response.Redirect("Login.aspx"); return; } DataBind(); int refreshNum = SeatManage.SeatManageComm.CookiesManager.RefreshNum; refreshNum += 1; SeatManage.SeatManageComm.CookiesManager.RefreshNum = refreshNum; if (!IsPostBack) { ShowReaderState(); } spanWarmInfo.InnerText = ""; spanWarmInfo.Visible = false; if (!Page.IsPostBack && refreshNum < 2) { } else { cmd = Request.Form["subCmd"]; //SeatManage.IPocketBookOnlineBll.IMainFunctionPageBll mainFunctionBll = new SeatManage.PocketBookOnLine.Bll.MainFunctionBll(); ReadingRoomStatus roomState = new ReadingRoomStatus(); if (this.LoginUserInfo.AtReadingRoom != null) { roomState = SeatManage.Bll.NowReadingRoomState.ReadingRoomOpenState(this.LoginUserInfo.AtReadingRoom.Setting.RoomOpenSet, DateTime.Now); } switch (cmd) { case "shortLeave": shortLeaveHandle(); //设置读者暂离 this.LoginUserInfo = handler.GetReaderInfo(this.UserSchoolInfo, this.LoginUserInfo.CardNo); //重新绑定读者状态 ShowReaderState(); break; case "leave": //释放读者座位 freeSeat(); this.LoginUserInfo = handler.GetReaderInfo(this.UserSchoolInfo, this.LoginUserInfo.CardNo); ShowReaderState(); break; case "LoginOut": Session.Clear(); Response.Cookies["userInfo"].Expires = DateTime.Now.AddDays(-1); SeatManage.SeatManageComm.CookiesManager.RefreshNum = 0; Response.Redirect("Login.aspx"); break; case "ContinuedWhen": this.LoginUserInfo = handler.GetReaderInfo(this.UserSchoolInfo, this.LoginUserInfo.CardNo); if (this.LoginUserInfo.EnterOutLog != null && this.LoginUserInfo.EnterOutLog.EnterOutState != EnterOutLogType.Leave) { switch (this.LoginUserInfo.EnterOutLog.EnterOutState) { case EnterOutLogType.BookingConfirmation: case EnterOutLogType.SelectSeat: case EnterOutLogType.ContinuedTime: case EnterOutLogType.ComeBack: case EnterOutLogType.ReselectSeat: case EnterOutLogType.WaitingSuccess: this.LoginUserInfo.EnterOutLog.Remark = "通过手机预约网站延长座位使用时间"; this.LoginUserInfo.EnterOutLog.EnterOutState = EnterOutLogType.ContinuedTime; ContinuedWhen(); ShowReaderState(); break; case EnterOutLogType.ShortLeave: spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "续时失败,你处于暂离状态"; break; } } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "续时失败,您还没有选座"; } break; case "ComeBack": this.LoginUserInfo = handler.GetReaderInfo(this.UserSchoolInfo, this.LoginUserInfo.CardNo); if (this.LoginUserInfo.EnterOutLog != null && this.LoginUserInfo.EnterOutLog.EnterOutState == EnterOutLogType.ShortLeave) { this.LoginUserInfo.EnterOutLog.Remark = "通过手机预约网站恢复在座"; this.LoginUserInfo.EnterOutLog.EnterOutState = EnterOutLogType.ComeBack; ComeBack(); ShowReaderState(); break; } else { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "暂离回来失败,您还没有暂离"; } break; } } }