Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            cmd        = Request.Form["subCmd"];
            loginOkUrl = Request.QueryString["url"];
            AJM_WeiXinUserInfo user     = new AJM_WeiXinUserInfo();
            string             loginId  = txt_LoginID.Value;
            string             password = txt_Password.Value;

            if (!IsPostBack)
            {
                BindSelSchool();
            }

            //通过页面验证,执行登录操作
            if (cmd == "Login")
            {
                CookiesManager.RemoveCookies("userInfo");
                if (loginHandle(loginId, password, selSchool.Value))
                {
                    //若选择记住密码,则记录用户信息cookies
                    CookiesManager.SetCookies(loginId, password, UserSchoolInfo.SchoolNo);
                    if (!string.IsNullOrEmpty(loginOkUrl))
                    {
                        Response.Redirect(loginOkUrl);
                    }
                    else
                    {
                        Response.Redirect("MainFunctionPage.aspx");
                    }
                }
            }
            else
            {
                if (Request.Cookies["userInfo"] != null)//存在记录的cookies信息
                {
                    loginId  = CookiesManager.GetCookiesValue(CookiesManager.LoginID);
                    password = CookiesManager.GetCookiesValue(CookiesManager.Password);
                    string schoolId = CookiesManager.GetCookiesValue(CookiesManager.SchoolId);

                    if (loginHandle(loginId, password, schoolId))
                    {
                        if (!string.IsNullOrEmpty(loginOkUrl))
                        {
                            Response.Redirect(loginOkUrl);
                        }
                        else
                        {
                            Response.Redirect("MainFunctionPage.aspx");
                        }
                    }
                }
            }
        }
 /// <summary>
 /// 获取登录读者详细信息
 /// </summary>
 /// <param name="studentNo"></param>
 /// <param name="schoolNo"></param>
 /// <returns></returns>
 public AJM_WeiXinUserInfo GetUserInfo_WeiXin(string studentNo, string schoolNo)
 {
     try
     {
         IMobileAppDataObtianProxy appService = new MobileAppDataObtainProxy(schoolNo);
         string           result    = appService.GetUserInfo_WeiXin(studentNo);
         AJM_HandleResult ajmResult = JSONSerializer.Deserialize <AJM_HandleResult>(result);
         if (ajmResult == null)
         {
             throw new Exception("获取登录读者详细信息失败!");
         }
         if (!ajmResult.Result)
         {
             throw new Exception(ajmResult.Msg);
         }
         AJM_WeiXinUserInfo ajmWeiXinUserInfo = JSONSerializer.Deserialize <AJM_WeiXinUserInfo>(ajmResult.Msg);
         return(ajmWeiXinUserInfo);
     }
     catch (Exception ex)
     {
         WriteLog.Write("获取登录读者详细信息失败:" + ex.Message);
         return(null);
     }
 }
        /// <summary>
        /// 显示读者状态
        /// </summary>
        /// <param name="reader"></param>
        private void ShowReaderState()
        {
            AJM_WeiXinUserInfo reader = LoginUserInfo;

            if (reader.AjmReaderStatus.AjmEnterOutLog == null)
            {
                state = "Leave";
            }
            else
            {
                state = reader.AjmReaderStatus.AjmEnterOutLog.EnterOutState.ToString();
            }

            if (reader.AjmReaderStatus.AjmBespeakLogs.Count > 0 && state == "Leave")
            {
                state = "Booking";
            }
            if (reader.AjmReaderStatus.AjmWaitSeatLogs != null)
            {
                state = "Waiting";
            }
            string statusMessage = "";

            btnLeave.Visible          = false;
            btnShortLeave.Visible     = false;
            btn_ComeBack.Visible      = false;
            btn_ContinuedWhen.Visible = false;
            btn_CancelBook.Visible    = false;
            btn_CancelWait.Visible    = false;
            btn_BookConfirm.Visible   = false;

            lblReadingRoomName.InnerText = "无";
            lblSeatNo.InnerText          = "无";
            lblSeatStatus.InnerText      = "无";
            lblenterOutTime.InnerText    = "无";
            lblRemark.InnerText          = "无";
            switch (state)
            {
            case "SelectSeat":
            case "ComeBack":
            case "ContinuedTime":
            case "WaitingSuccess":
            case "BookingConfirmation":
            case "ReselectSeat":
                lblSeatStatus.InnerText      = "在座";
                lblReadingRoomName.InnerText = reader.AjmReaderStatus.AjmEnterOutLog.RoomName;
                lblSeatNo.InnerText          = reader.AjmReaderStatus.AjmEnterOutLog.SeatShortNo;
                lblenterOutTime.InnerText    = reader.AjmReaderStatus.AjmEnterOutLog.EnterOutTime;
                lblRemark.InnerText          = reader.AjmReaderStatus.AjmEnterOutLog.Remark;
                if (reader.AjmPecketBookSetting.UseShortLeave)
                {
                    btnShortLeave.Visible = true;
                }
                if (reader.AjmPecketBookSetting.UseCanLeave)
                {
                    btnLeave.Visible = true;
                }
                //暂时注释
                //if (reader.AjmPecketBookSetting.UseContinue && reader.Setting.SeatUsedTimeLimit.Used && reader.AtReadingRoom.Setting.SeatUsedTimeLimit.IsCanContinuedTime)
                //{
                //    btn_ContinuedWhen.Visible = true;
                //}

                break;

            case "Leave":
                break;

            case "Booking":
                lblSeatStatus.InnerText      = "预约等待签到中";
                lblReadingRoomName.InnerText = reader.AjmReaderStatus.AjmBespeakLogs[0].RoomName;
                lblSeatNo.InnerText          = reader.AjmReaderStatus.AjmBespeakLogs[0].SeatShortNo;
                lblenterOutTime.InnerText    = reader.AjmReaderStatus.AjmBespeakLogs[0].BookTime;
                lblRemark.InnerText          = reader.AjmReaderStatus.AjmBespeakLogs[0].Remark;
                if (reader.AjmPecketBookSetting.UseCancelBook)
                {
                    btn_CancelBook.Visible = true;
                }
                if (reader.AjmPecketBookSetting.UseBookComfirm)
                {
                    if (reader.AjmReaderStatus.AjmBespeakLogs[0].SubmitDateTime == reader.AjmReaderStatus.AjmBespeakLogs[0].BookTime)
                    {
                        btn_BookConfirm.Visible = true;
                    }
                    else
                    {
                        #region 暂时注释
                        //if (Convert.ToDateTime(reader.AjmReaderStatus.AjmBespeakLogs[0].BookTime).AddMinutes(-double.Parse(reader.AtReadingRoom.Setting.SeatBespeak.ConfirmTime.BeginTime)) <= DateTime.Now)
                        //{
                        //    btn_BookConfirm.Visible = true;
                        //}
                        #endregion
                    }
                }
                break;

            case "Waiting":
                lblSeatStatus.InnerText      = "等待座位";
                lblReadingRoomName.InnerText = reader.AjmReaderStatus.AjmEnterOutLog.RoomName;
                lblSeatNo.InnerText          = reader.AjmReaderStatus.AjmWaitSeatLogs.SeatShortNo;
                lblenterOutTime.InnerText    = reader.AjmReaderStatus.AjmWaitSeatLogs.SeatWaitTime;
                lblRemark.InnerText          = "您把读者" + reader.AjmReaderStatus.AjmWaitSeatLogs.StudentNo_A + "设置为暂离,并等待此座位。";
                if (reader.AjmPecketBookSetting.UseCancelWait)
                {
                    btn_CancelWait.Visible = true;
                }
                break;

            case "ShortLeave":
                lblSeatStatus.InnerText      = "暂离";
                lblReadingRoomName.InnerText = reader.AjmReaderStatus.AjmEnterOutLog.RoomName;
                lblSeatNo.InnerText          = reader.AjmReaderStatus.AjmEnterOutLog.SeatShortNo;
                lblenterOutTime.InnerText    = reader.AjmReaderStatus.AjmEnterOutLog.EnterOutTime;
                lblRemark.InnerText          = reader.AjmReaderStatus.AjmEnterOutLog.Remark;
                if (reader.AjmPecketBookSetting.UseComeBack)
                {
                    btn_ComeBack.Visible = true;
                }
                if (reader.AjmPecketBookSetting.UseCanLeave)
                {
                    btnLeave.Visible = true;
                }
                break;

            default: statusMessage = "没有座位";
                break;
            }
            //if (reader.EnterOutLog != null && reader.EnterOutLog.EnterOutState != SeatManage.EnumType.EnterOutLogType.Leave)
            //{
            //    lblReadingRoomName.InnerText = reader.EnterOutLog.ReadingRoomName;
            //    lblSeatNo.InnerText = reader.EnterOutLog.ShortSeatNo;
            //    lblSeatStatus.InnerText = statusMessage;
            //    lblenterOutTime.InnerText = reader.EnterOutLog.EnterOutTime.ToLongTimeString();
            //    lblRemark.InnerText = reader.EnterOutLog.Remark;
            //}
            //else
            //{
            //    lblReadingRoomName.InnerText = "无";
            //    lblSeatNo.InnerText = "无";
            //    lblSeatStatus.InnerText = statusMessage;
            //    lblenterOutTime.InnerText = "无";
            //    lblRemark.InnerText = "无";
            //}
        }
        /// <summary>
        /// 获取登录读者详细信息
        /// </summary>
        /// <param name="studentNo"></param>
        /// <returns></returns>
        public string GetUserInfo_WeiXin(string studentNo)
        {
            AJM_HandleResult result = new AJM_HandleResult();

            try
            {
                if (string.IsNullOrEmpty(studentNo))
                {
                    result.Result = false;
                    result.Msg    = "学号不能为空!";
                    return(JSONSerializer.Serialize(result));
                }
                ReaderInfo readerInfo = seatManageDateService.GetReader(studentNo, true);
                if (readerInfo == null)
                {
                    result.Result = false;
                    result.Msg    = "未查询到该读者的当前状态";
                    return(JSONSerializer.Serialize(result));
                }
                AJM_WeiXinUserInfo ajmWeiXinUserInfo = new AJM_WeiXinUserInfo();
                ajmWeiXinUserInfo.StudentNo  = readerInfo.CardNo;
                ajmWeiXinUserInfo.Name       = readerInfo.Name;
                ajmWeiXinUserInfo.ReaderType = readerInfo.ReaderType;
                //预约网站设置
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseBookComfirm     = readerInfo.PecketWebSetting.UseBookComfirm;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseBookNextDaySeat = readerInfo.PecketWebSetting.UseBookNextDaySeat;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseBookNowDaySeat  = readerInfo.PecketWebSetting.UseBookNowDaySeat;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseBookSeat        = readerInfo.PecketWebSetting.UseBookSeat;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseCanLeave        = readerInfo.PecketWebSetting.UseCanLeave;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseCancelBook      = readerInfo.PecketWebSetting.UseCancelBook;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseCancelWait      = readerInfo.PecketWebSetting.UseCancelWait;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseChangeSeat      = readerInfo.PecketWebSetting.UseChangeSeat;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseComeBack        = readerInfo.PecketWebSetting.UseComeBack;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseContinue        = readerInfo.PecketWebSetting.UseContinue;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseSelectSeat      = readerInfo.PecketWebSetting.UseSelectSeat;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseShortLeave      = readerInfo.PecketWebSetting.UseShortLeave;
                ajmWeiXinUserInfo.AjmPecketBookSetting.UseWaitSeat        = readerInfo.PecketWebSetting.UseWaitSeat;

                AJM_ReaderStatus ajmReaderStatus = new AJM_ReaderStatus();

                if (readerInfo.EnterOutLog != null)
                {
                    AJM_EnterOutLog ajmEnterOutLog = new AJM_EnterOutLog();
                    ajmEnterOutLog.EnterOutTime           = readerInfo.EnterOutLog.EnterOutTime.ToString("yyyy-MM-dd HH:mm:ss");
                    ajmEnterOutLog.EnterOutState          = readerInfo.EnterOutLog.EnterOutState.ToString();
                    ajmEnterOutLog.Id                     = readerInfo.EnterOutLog.EnterOutLogID;
                    ajmEnterOutLog.Operator               = readerInfo.EnterOutLog.Flag.ToString();
                    ajmEnterOutLog.Remark                 = readerInfo.EnterOutLog.Remark;
                    ajmEnterOutLog.RoomName               = readerInfo.EnterOutLog.ReadingRoomName;
                    ajmEnterOutLog.RoomNo                 = readerInfo.EnterOutLog.ReadingRoomNo;
                    ajmEnterOutLog.SeatNo                 = readerInfo.EnterOutLog.SeatNo;
                    ajmEnterOutLog.SeatShortNo            = readerInfo.EnterOutLog.ShortSeatNo;
                    ajmWeiXinUserInfo.AjmReadingRoomState = GetSingleRoomOpenState(ajmEnterOutLog.RoomNo);

                    switch (readerInfo.EnterOutLog.EnterOutState)
                    {
                    case EnumType.EnterOutLogType.None:
                    case EnumType.EnterOutLogType.Leave:
                    case EnumType.EnterOutLogType.BookingCancel:
                    case EnumType.EnterOutLogType.WaitingCancel:
                    case EnumType.EnterOutLogType.BespeakWaiting:
                        ajmReaderStatus.Status = EnumType.ReaderStatus.Leave.ToString();
                        break;

                    case EnumType.EnterOutLogType.BookingConfirmation:
                    case EnumType.EnterOutLogType.CancelTime:
                    case EnumType.EnterOutLogType.ComeBack:
                    case EnumType.EnterOutLogType.ContinuedTime:
                    case EnumType.EnterOutLogType.ReselectSeat:
                    case EnumType.EnterOutLogType.SelectSeat:
                    case EnumType.EnterOutLogType.Timing:
                    case EnumType.EnterOutLogType.WaitingSuccess:
                        ajmReaderStatus.Status = EnumType.ReaderStatus.Seating.ToString();
                        break;

                    case EnumType.EnterOutLogType.ShortLeave:
                        ajmReaderStatus.Status = EnumType.ReaderStatus.ShortLeave.ToString();
                        break;

                    case EnumType.EnterOutLogType.Waiting:
                        ajmReaderStatus.Status = EnumType.ReaderStatus.Waiting.ToString();
                        break;
                    }
                    ajmReaderStatus.AjmEnterOutLog = ajmEnterOutLog;
                }
                if (readerInfo.WaitSeatLog != null)
                {
                    AJM_WaitSeatLog ajmWaitSeatLog = new AJM_WaitSeatLog();
                    ajmWaitSeatLog.RoomName               = readerInfo.WaitSeatLog.EnterOutLog.ReadingRoomName;
                    ajmWaitSeatLog.RoomNo                 = readerInfo.WaitSeatLog.ReadingRoomNo;
                    ajmWaitSeatLog.SeatNo                 = readerInfo.WaitSeatLog.SeatNo;
                    ajmWaitSeatLog.SeatShortNo            = readerInfo.WaitSeatLog.EnterOutLog.ShortSeatNo;
                    ajmWaitSeatLog.SeatWaitId             = readerInfo.WaitSeatLog.SeatWaitingID;
                    ajmWaitSeatLog.SeatWaitTime           = readerInfo.WaitSeatLog.SeatWaitTime.ToString("yyyy-MM-dd HH:mm:ss");
                    ajmWaitSeatLog.StudentNo_A            = readerInfo.WaitSeatLog.CardNo;
                    ajmWaitSeatLog.StudentNo_B            = readerInfo.WaitSeatLog.CardNoB;
                    ajmWeiXinUserInfo.AjmReadingRoomState = GetSingleRoomOpenState(ajmWaitSeatLog.RoomNo);

                    ajmReaderStatus.AjmWaitSeatLogs = ajmWaitSeatLog;
                    ajmReaderStatus.Status          = EnumType.ReaderStatus.Waiting.ToString();
                }
                if (readerInfo.BespeakLog.Count > 0)
                {
                    foreach (BespeakLogInfo model in readerInfo.BespeakLog)
                    {
                        if (model.BsepeakTime.Date == DateTime.Now.Date)
                        {
                            ajmReaderStatus.Status = EnumType.ReaderStatus.Booking.ToString();
                        }
                        AJM_BespeakLog ajmBespeakLog = new AJM_BespeakLog
                        {
                            Id             = model.BsepeaklogID,
                            BookTime       = model.BsepeakTime.ToString("yyyy-MM-dd HH:mm:ss"),
                            IsValid        = true,
                            Remark         = model.Remark,
                            RoomName       = model.ReadingRoomName,
                            RoomNo         = model.ReadingRoomNo,
                            SeatNo         = model.SeatNo,
                            SeatShortNo    = model.ShortSeatNum,
                            SubmitDateTime = model.SubmitTime.ToString("yyyy-MM-dd HH:mm:ss")
                        };
                        ajmReaderStatus.AjmBespeakLogs.Add(ajmBespeakLog);
                    }
                }
                ajmWeiXinUserInfo.AjmReaderStatus = ajmReaderStatus;

                result.Result = true;
                result.Msg    = JSONSerializer.Serialize(ajmWeiXinUserInfo);
                return(JSONSerializer.Serialize(result));
            }
            catch (Exception ex)
            {
                WriteLog.Write(string.Format("获取登录读者详细信息遇到异常:{0}", ex.Message));
                result.Result = false;
                result.Msg    = "获取登录读者详细信息执行遇到异常!";
                return(JSONSerializer.Serialize(result));
            }
        }
        private void ShowReaderState()
        {
            //此方法需要修改scmodel = ((SeatManage.IPocketBespeak.IMainFunctionPage_Ex)handler).GetSeatUsingInfo(UserSchoolInfo, readingRoomNo, seatNo);
            bool isCanUseSeat = false;

            if (scmodel != null && scmodel.SeatInfo != null)
            {
                this.seatlblReadingRoomName.InnerText = scmodel.SeatInfo.ReadingRoom.Name;
                this.seatlblSeatNo.InnerText          = scmodel.SeatInfo.ShortSeatNo;

                switch (scmodel.SeatInfo.SeatUsedState)
                {
                case SeatManage.EnumType.EnterOutLogType.ComeBack:
                case SeatManage.EnumType.EnterOutLogType.ContinuedTime:
                case SeatManage.EnumType.EnterOutLogType.ReselectSeat:
                case SeatManage.EnumType.EnterOutLogType.ShortLeave:
                case SeatManage.EnumType.EnterOutLogType.WaitingSuccess:
                case SeatManage.EnumType.EnterOutLogType.SelectSeat:
                case SeatManage.EnumType.EnterOutLogType.BookingConfirmation:
                case SeatManage.EnumType.EnterOutLogType.BespeakWaiting:
                    this.seatlblSeatStatus.InnerText = "正在使用中";
                    break;

                default:
                    this.seatlblSeatStatus.InnerText = "空闲";
                    isCanUseSeat = true;
                    break;
                }
                if (scmodel.SeatInfo.IsSuspended)
                {
                    this.seatlblSeatStatus.InnerText = "已被停用";
                    spanWarmInfo.Visible             = true;
                    spanWarmInfo.InnerText           = "此座位已被停用";
                }
                else if (!scmodel.InReadingRoom.Setting.SeatBespeak.Used)
                {
                    spanWarmInfo.Visible   = true;
                    spanWarmInfo.InnerText = "此座位不提供预约";
                }
                else if (scmodel.BookSeatInfo.Count < 1)
                {
                    spanWarmInfo.Visible   = true;
                    spanWarmInfo.InnerText = "此座位没有可预约的时间段";
                }
                else
                {
                    List <AJM_ReadingRoom> roomList = weiXinService.GetAllRoomInfo(UserSchoolInfo.SchoolNo);
                    if (this.ReadingRoomList == null)
                    {
                        this.ReadingRoomList = new Dictionary <string, AJM_ReadingRoom>();
                    }
                    else
                    {
                        this.ReadingRoomList.Clear();
                    }
                    foreach (AJM_ReadingRoom item in roomList)
                    {
                        this.ReadingRoomList.Add(item.RoomNo, item);
                    }

                    StringBuilder sbListInfo = new StringBuilder();
                    sbListInfo.Append("<li data-theme='d' data-role='list-divider' role='heading'>座位预约 </li>");
                    foreach (KeyValuePair <DateTime, Seat> item in scmodel.BookSeatInfo)
                    {
                        if (item.Key.Date.CompareTo(DateTime.Now.Date) == 0)
                        {
                            sbListInfo.Append(string.Format("<li date-theme='d' style=\"padding-top: 0px;padding-bottom: 0px;\">{0}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input data-inline='true' data-mini='true' value='预约' type='button'onclick=\"location.href='../BookSeat/BookNowSeatMessage.aspx?seatNo={1}&seatShortNo={2}&roomNo={3}&date={4}&timeSpan={5}'\")' /></li>", item.Key.ToLongDateString(), item.Value.SeatNo, item.Value.ShortSeatNo, readingRoomNo, item.Key.ToLongDateString(), item.Value.CanBespeakStr));
                        }
                        else
                        {
                            sbListInfo.Append(string.Format("<li date-theme='d' style=\"padding-top: 0px;padding-bottom: 0px;\">{0}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input data-inline='true' data-mini='true' value='预约' type='button'onclick=\"location.href='../BookSeat/BookSeatMessage.aspx?seatNo={1}&seatShortNo={2}&roomNo={3}&date={4}&timeSpan={5}'\")' /></li>", item.Key.ToLongDateString(), item.Value.SeatNo, item.Value.ShortSeatNo, readingRoomNo, item.Key.ToLongDateString(), item.Value.CanBespeakStr));
                        }
                        //sbListInfo.Append(string.Format("<li><input data-inline='true' data-mini='false' value='预约' type='button'onclick=\"location.href='../MainFunctionPage.aspx'\")' /></li>", bookLogList[i].BsepeaklogID));
                    }
                    sbListInfo.Append("</li>");

                    listMessage = sbListInfo.ToString();
                }
            }

            LoginUserInfo = weiXinService.GetUserInfo_WeiXin(LoginUserInfo.StudentNo, UserSchoolInfo.SchoolNo);
            AJM_WeiXinUserInfo reader = LoginUserInfo;

            if (reader.AjmReaderStatus.AjmEnterOutLog == null)
            {
                state = "Leave";
            }
            else
            {
                state = reader.AjmReaderStatus.AjmEnterOutLog.EnterOutState;
            }

            if (reader.AjmReaderStatus.AjmBespeakLogs.Count > 0 && state == "Leave")
            {
                state = "Booking";
            }
            if (reader.AjmReaderStatus.AjmBespeakLogs != null)
            {
                state = "Waiting";
            }
            btnLeave.Visible          = false;
            btnShortLeave.Visible     = false;
            btn_ComeBack.Visible      = false;
            btn_ContinuedWhen.Visible = false;
            btn_CancelBook.Visible    = false;
            btn_CancelWait.Visible    = false;
            btn_BookConfirm.Visible   = false;
            btn_SelectSeat.Visible    = false;
            btn_ChangeSeat.Visible    = false;
            btn_WaitSeat.Visible      = false;

            lblReadingRoomName.InnerText = "无";
            lblSeatNo.InnerText          = "无";
            lblSeatStatus.InnerText      = "无";
            lblenterOutTime.InnerText    = "无";
            lblRemark.InnerText          = "无";
            switch (state)
            {
            case "SelectSeat":
            case "ComeBack":
            case "ContinuedTime":
            case "WaitingSuccess":
            case "BookingConfirmation":
            case "ReselectSeat":
                lblSeatStatus.InnerText      = "在座";
                lblReadingRoomName.InnerText = reader.AjmReaderStatus.AjmEnterOutLog.RoomName;
                lblSeatNo.InnerText          = reader.AjmReaderStatus.AjmEnterOutLog.SeatShortNo;
                lblenterOutTime.InnerText    = reader.AjmReaderStatus.AjmEnterOutLog.EnterOutTime;
                lblRemark.InnerText          = reader.AjmReaderStatus.AjmEnterOutLog.Remark;
                if (reader.AjmReaderStatus.AjmEnterOutLog.SeatNo == seatNo && readingRoomNo == reader.AjmReaderStatus.AjmEnterOutLog.RoomNo)
                {
                    if (reader.AjmPecketBookSetting.UseShortLeave)
                    {
                        btnShortLeave.Visible = true;
                    }
                    if (reader.AjmPecketBookSetting.UseCanLeave)
                    {
                        btnLeave.Visible = true;
                    }
                    //这个需要修改
                    //if (reader.AjmPecketBookSetting.UseContinue && reader.AtReadingRoom.Setting.SeatUsedTimeLimit.Used && reader.AtReadingRoom.Setting.SeatUsedTimeLimit.IsCanContinuedTime)
                    //{
                    //    btn_ContinuedWhen.Visible = true;
                    //}
                }
                else if (isCanUseSeat)
                {
                    if (reader.AjmPecketBookSetting.UseChangeSeat)
                    {
                        btn_ChangeSeat.Visible = true;
                    }
                }
                break;

            case "Leave":
                if (isCanUseSeat)
                {
                    if (reader.AjmPecketBookSetting.UseSelectSeat)
                    {
                        btn_SelectSeat.Visible = true;
                    }
                }
                else if (scmodel.SeatInfo.SeatUsedState != EnterOutLogType.ShortLeave)
                {
                    if (reader.AjmPecketBookSetting.UseWaitSeat)
                    {
                        btn_WaitSeat.Visible = true;
                    }
                }
                break;

            case "Booking":
                lblSeatStatus.InnerText      = "预约等待签到中";
                lblReadingRoomName.InnerText = reader.AjmReaderStatus.AjmBespeakLogs[0].RoomName;
                lblSeatNo.InnerText          = reader.AjmReaderStatus.AjmBespeakLogs[0].SeatShortNo;
                lblenterOutTime.InnerText    = reader.AjmReaderStatus.AjmBespeakLogs[0].BookTime;
                lblRemark.InnerText          = reader.AjmReaderStatus.AjmBespeakLogs[0].Remark;
                if (reader.AjmReaderStatus.AjmBespeakLogs[0].SeatNo == seatNo && readingRoomNo == reader.AjmReaderStatus.AjmBespeakLogs[0].RoomNo)
                {
                    if (reader.AjmPecketBookSetting.UseCancelBook)
                    {
                        btn_CancelBook.Visible = true;
                    }
                    if (reader.AjmPecketBookSetting.UseBookComfirm)
                    {
                        if (reader.AjmReaderStatus.AjmBespeakLogs[0].SubmitDateTime == reader.AjmReaderStatus.AjmBespeakLogs[0].BookTime)
                        {
                            btn_BookConfirm.Visible = true;
                        }
                        else
                        {
                            //这个需要修改
                            //if (Convert.ToDateTime(reader.AjmReaderStatus.AjmBespeakLogs[0].BookTime).AddMinutes(-double.Parse(reader.AtReadingRoom.Setting.SeatBespeak.ConfirmTime.BeginTime)) <= DateTime.Now)
                            //{
                            //    btn_BookConfirm.Visible = true;
                            //}
                        }
                    }
                }
                break;

            case "Waiting":
                lblSeatStatus.InnerText      = "等待座位";
                lblReadingRoomName.InnerText = reader.AjmReaderStatus.AjmWaitSeatLogs.RoomName;
                lblSeatNo.InnerText          = reader.AjmReaderStatus.AjmWaitSeatLogs.SeatShortNo;
                lblenterOutTime.InnerText    = reader.AjmReaderStatus.AjmWaitSeatLogs.SeatWaitTime;
                lblRemark.InnerText          = "您把读者" + reader.AjmReaderStatus.AjmWaitSeatLogs.StudentNo_A + "设置为暂离,并等待此座位。";
                if (reader.AjmReaderStatus.AjmWaitSeatLogs.SeatNo == seatNo && readingRoomNo == reader.AjmReaderStatus.AjmWaitSeatLogs.RoomName)
                {
                    if (reader.AjmPecketBookSetting.UseCancelWait)
                    {
                        btn_CancelWait.Visible = true;
                    }
                }
                break;

            case "ShortLeave":
                lblSeatStatus.InnerText      = "暂离";
                lblReadingRoomName.InnerText = reader.AjmReaderStatus.AjmEnterOutLog.RoomName;
                lblSeatNo.InnerText          = reader.AjmReaderStatus.AjmEnterOutLog.SeatShortNo;
                lblenterOutTime.InnerText    = reader.AjmReaderStatus.AjmEnterOutLog.EnterOutTime;
                lblRemark.InnerText          = reader.AjmReaderStatus.AjmEnterOutLog.Remark;
                if (reader.AjmReaderStatus.AjmEnterOutLog.SeatNo == seatNo && readingRoomNo == reader.AjmReaderStatus.AjmEnterOutLog.RoomNo)
                {
                    if (reader.AjmPecketBookSetting.UseComeBack)
                    {
                        btn_ComeBack.Visible = true;
                    }
                    if (reader.AjmPecketBookSetting.UseCanLeave)
                    {
                        btnLeave.Visible = true;
                    }
                }
                else if (isCanUseSeat)
                {
                    if (reader.AjmPecketBookSetting.UseChangeSeat)
                    {
                        btn_ChangeSeat.Visible = true;
                    }
                }
                break;

            default: lblSeatStatus.InnerText = "没有座位";
                if (isCanUseSeat)
                {
                    if (reader.AjmPecketBookSetting.UseSelectSeat)
                    {
                        btn_ChangeSeat.Visible = true;
                    }
                }
                else if (scmodel.SeatInfo.SeatUsedState != EnterOutLogType.ShortLeave)
                {
                    if (reader.AjmPecketBookSetting.UseWaitSeat)
                    {
                        btn_WaitSeat.Visible = true;
                    }
                }
                break;
            }
        }