/// <summary> /// 删除事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void gridBespeakLog_RowCommand(object sender, FineUI.GridCommandEventArgs e) { if (e.CommandName == "ActionDeleteBespeakLog") { int id = int.Parse(gridBespeakLog.Rows[e.RowIndex].DataKeys[0].ToString()); SeatManage.ClassModel.BespeakLogInfo bespeakModel = SeatManage.Bll.T_SM_SeatBespeak.GetBespeaklogById(id); if (bespeakModel.BsepeakState != BookingStatus.Waiting) { FineUI.Alert.Show("操作失败,状态无效"); GridBindDate(); } bespeakModel.BsepeakState = BookingStatus.Cencaled; bespeakModel.CancelPerson = Operation.Admin; bespeakModel.CancelTime = SeatManage.Bll.ServiceDateTime.Now; bespeakModel.Remark = "被管理员" + this.LoginId + "取消预约"; if (SeatManage.Bll.T_SM_SeatBespeak.UpdateBespeakList(bespeakModel) > 0) { FineUI.Alert.Show("取消成功"); GridBindDate(); } else { FineUI.Alert.Show("操作失败"); GridBindDate(); } } }
protected void Page_Load(object sender, EventArgs e) { if (this.LoginUserInfo == null || this.UserSchoolInfo == null) { Response.Redirect("../Login.aspx"); } seatNo = Request.QueryString["seatNo"]; seatShortNo = Request.QueryString["seatShortNo"]; date = Request.QueryString["date"]; roomNo = Request.QueryString["roomNo"]; if (!IsPostBack) { BindUIElement(seatNo, seatShortNo, DateTime.Parse(date)); } string cmd = Request.Form["subCmd"]; switch (cmd) { case "query": SeatManage.ClassModel.BespeakLogInfo bespeakModel = new SeatManage.ClassModel.BespeakLogInfo(); bespeakModel.BsepeakState = SeatManage.EnumType.BookingStatus.Waiting; DateTime bespeatDate = DateTime.Parse(string.Format("{0} {1}", DateTime.Parse(date).ToShortDateString(), lblBookTime.InnerText)); bespeakModel.BsepeakTime = bespeatDate; bespeakModel.CardNo = this.LoginUserInfo.CardNo; bespeakModel.ReadingRoomNo = roomNo; bespeakModel.Remark = string.Format("读者通过手机预约网站预约座位"); bespeakModel.SeatNo = seatNo; bespeakModel.SubmitTime = DateTime.Now; try { string resultValue = handler.SubmitBespeakInfo(this.UserSchoolInfo, bespeakModel); //bookSeatMessageBll.AddBespeakLogInfo(bespeakModel, Session["SchoolConnectionString"].ToString()); if (!string.IsNullOrEmpty(resultValue)) { page1.Style.Add("display", "none"); page2.Style.Add("display", "none"); page3.Style.Add("display", "block"); MessageTip.InnerText = resultValue; } else { page1.Style.Add("display", "none"); page2.Style.Add("display", "none"); page3.Style.Add("display", "block"); MessageTip.InnerText = "未知错误"; return; } } catch (Exception ex) { page1.Style.Add("display", "none"); page2.Style.Add("display", "none"); page3.Style.Add("display", "block"); MessageTip.InnerText = ex.Message; return; } break; } }
public JsonResult BespeakLogRemove(string BespeakID) { JsonResult result = null; int id = int.Parse(BespeakID); SeatManage.ClassModel.BespeakLogInfo bespeakModel = SeatManage.Bll.T_SM_SeatBespeak.GetBespeaklogById(id); if (bespeakModel.BsepeakState != BookingStatus.Waiting) { result = Json(new { status = "no", message = "只能删除状态为[等待确认]的预约记录,删除失败" }, JsonRequestBehavior.AllowGet); } bespeakModel.BsepeakState = BookingStatus.Cencaled; bespeakModel.CancelPerson = Operation.Reader; bespeakModel.CancelTime = SeatManage.Bll.ServiceDateTime.Now; bespeakModel.Remark = "读者取消预约"; if (SeatManage.Bll.T_SM_SeatBespeak.UpdateBespeakList(bespeakModel) > 0) { result = Json(new { status = "yes", message = "预约取消成功" }, JsonRequestBehavior.AllowGet); } else { result = Json(new { status = "no", message = "操作失败" }, JsonRequestBehavior.AllowGet); } return(result); }
public string EnterLib(string CardNo) { string[] strs = CardNo.Split(','); CardNo = strs[0]; if (!Verifylicensing()) { return("非法操作,此接口未进行授权!"); } //SeatManage.SeatManageComm.WriteLog.Write("传入卡号:" + strs[0]); //SeatManage.SeatManageComm.WriteLog.Write("传入图书馆号:" + strs[1]); StringBuilder message = new StringBuilder(); string ReaderNo = CardNo; string ReaderName = ""; string NowStatus = ""; string BeforeStatus = ""; string Error = ""; message.Append("<ReaderInfo>"); message.Append("<ReaderNo>{0}</ReaderNo>"); message.Append("<ReaderName>{1}</ReaderName>"); message.Append("<NowStatus>{2}</NowStatus>"); message.Append("<BeforeStatus>{3}</BeforeStatus>"); message.Append("<Error>{4}</Error>"); message.Append("</ReaderInfo>"); try { if (string.IsNullOrEmpty(CardNo)) { throw new Exception("输入的学号为空!"); } SeatManage.ClassModel.AccessSetting accset = SeatManage.Bll.T_SM_SystemSet.GetAccessSetting(); if (accset == null) { throw new Exception("获取通道机设置失败!"); } SeatManage.ClassModel.ReaderInfo reader = SeatManage.Bll.EnterOutOperate.GetReaderInfo(CardNo); if (reader == null) { throw new Exception("获取不到此学生的信息!"); } if (strs.Length > 1 && reader.AtReadingRoom != null && strs[1] != "00" && reader.AtReadingRoom.Libaray.No != strs[1]) { throw new Exception("学生在此图书馆未选座位!"); } ReaderNo = reader.CardNo; ReaderName = reader.Name; if (reader.EnterOutLog == null) { NowStatus = ((int)SeatManage.EnumType.EnterOutLogType.Leave).ToString(); BeforeStatus = ((int)SeatManage.EnumType.EnterOutLogType.Leave).ToString(); } else { NowStatus = ((int)reader.EnterOutLog.EnterOutState).ToString(); BeforeStatus = ((int)reader.EnterOutLog.EnterOutState).ToString(); } if (accset.IsUsed && accset.EnterLib) { if (reader.EnterOutLog != null && reader.EnterOutLog.EnterOutState != SeatManage.EnumType.EnterOutLogType.Leave) { switch (reader.EnterOutLog.EnterOutState) { case SeatManage.EnumType.EnterOutLogType.BookingConfirmation: case SeatManage.EnumType.EnterOutLogType.ComeBack: case SeatManage.EnumType.EnterOutLogType.ContinuedTime: case SeatManage.EnumType.EnterOutLogType.ReselectSeat: case SeatManage.EnumType.EnterOutLogType.SelectSeat: case SeatManage.EnumType.EnterOutLogType.WaitingSuccess: if (accset.IsReleaseOnSeat && reader.EnterOutLog.EnterOutTime.AddMinutes(accset.LeaveTimeSpan) < SeatManage.Bll.ServiceDateTime.Now) { SeatManage.ClassModel.EnterOutLogInfo enterOutLog = reader.EnterOutLog; enterOutLog.EnterOutState = SeatManage.EnumType.EnterOutLogType.Leave; enterOutLog.TerminalNum = ""; enterOutLog.Remark = string.Format("读者离开图书馆未刷卡,再次通过通道机进入,系统自动释放{0} {1}号座位", reader.AtReadingRoom.Name, enterOutLog.ShortSeatNo); enterOutLog.EnterOutTime = SeatManage.Bll.ServiceDateTime.Now; enterOutLog.Flag = SeatManage.EnumType.Operation.Service; int newId = 0; if (SeatManage.Bll.EnterOutOperate.AddEnterOutLog(enterOutLog, ref newId) == SeatManage.EnumType.HandleResult.Failed) { throw new Exception("更新进出记录失败!"); } NowStatus = ((int)SeatManage.EnumType.EnterOutLogType.Leave).ToString(); if (accset.AddViolationRecords) { SeatManage.ClassModel.ViolationRecordsLogInfo vrInfo = new SeatManage.ClassModel.ViolationRecordsLogInfo(); vrInfo.CardNo = enterOutLog.CardNo; vrInfo.EnterFlag = SeatManage.EnumType.ViolationRecordsType.LeaveNotReadCard; vrInfo.EnterOutTime = enterOutLog.EnterOutTime.ToString(); vrInfo.Flag = SeatManage.EnumType.LogStatus.Valid; vrInfo.ReadingRoomID = enterOutLog.ReadingRoomNo; vrInfo.SeatID = enterOutLog.SeatNo; vrInfo.Remark = string.Format("读者{0}离开图书馆未刷卡,再次通过通道机,记录违规", ReaderNo); if (!SeatManage.Bll.T_SM_ViolateDiscipline.AddViolationRecords(vrInfo)) { throw new Exception("添加违规记录失败!"); } } } break; case SeatManage.EnumType.EnterOutLogType.ShortLeave: if (accset.IsComeBack) { DateTime NowTime = SeatManage.Bll.ServiceDateTime.Now; SeatManage.ClassModel.EnterOutLogInfo enterOutLog = reader.EnterOutLog; System.TimeSpan shortleavetimelong = NowTime - enterOutLog.EnterOutTime; enterOutLog.EnterOutState = SeatManage.EnumType.EnterOutLogType.ComeBack; enterOutLog.TerminalNum = ""; enterOutLog.Remark = string.Format("在通道机刷卡暂离回来,暂离时长{0}分钟,继续使用{1} {2}号座位", shortleavetimelong.TotalMinutes.ToString().Split('.')[0], enterOutLog.ReadingRoomName, enterOutLog.ShortSeatNo); enterOutLog.EnterOutTime = NowTime; enterOutLog.Flag = SeatManage.EnumType.Operation.Service; int newId = 0; if (SeatManage.Bll.EnterOutOperate.AddEnterOutLog(enterOutLog, ref newId) == SeatManage.EnumType.HandleResult.Failed) { throw new Exception("更新进出记录失败!"); } List <SeatManage.ClassModel.WaitSeatLogInfo> waitSeatLogs = SeatManage.Bll.T_SM_SeatWaiting.GetWaitSeatList("", enterOutLog.EnterOutLogID, null, null, null); if (waitSeatLogs.Count > 0) { SeatManage.ClassModel.WaitSeatLogInfo waitSeatLog = waitSeatLogs[0]; waitSeatLog.NowState = SeatManage.EnumType.LogStatus.Fail; waitSeatLog.OperateType = SeatManage.EnumType.Operation.OtherReader; waitSeatLog.WaitingState = SeatManage.EnumType.EnterOutLogType.WaitingCancel; if (!SeatManage.Bll.T_SM_SeatWaiting.UpdateWaitLog(waitSeatLog)) { throw new Exception("修改等待记录失败!"); } } NowStatus = ((int)SeatManage.EnumType.EnterOutLogType.ComeBack).ToString(); } break; } } else { DateTime nowDate = SeatManage.Bll.ServiceDateTime.Now; if (accset.IsBookingConfinmed && reader.BespeakLog.Count > 0) { SeatManage.ClassModel.BespeakLogInfo bespeaklog = reader.BespeakLog[0]; SeatManage.ClassModel.ReadingRoomSetting set = reader.AtReadingRoom.Setting; DateTime dtBegin = bespeaklog.BsepeakTime.AddMinutes(-double.Parse(set.SeatBespeak.ConfirmTime.BeginTime)); DateTime dtEnd = bespeaklog.BsepeakTime.AddMinutes(double.Parse(set.SeatBespeak.ConfirmTime.EndTime)); if (SeatManage.SeatManageComm.DateTimeOperate.DateAccord(dtBegin, dtEnd, nowDate) || (set.SeatBespeak.NowDayBespeak && bespeaklog.SubmitTime == bespeaklog.BsepeakTime)) { SeatManage.ClassModel.EnterOutLogInfo seatUsedInfo = SeatManage.Bll.T_SM_EnterOutLog.GetUsingEnterOutLogBySeatNo(bespeaklog.SeatNo); if (seatUsedInfo != null && seatUsedInfo.EnterOutState != SeatManage.EnumType.EnterOutLogType.Leave) { //条件满足,说明座位正在使用。 seatUsedInfo.EnterOutState = SeatManage.EnumType.EnterOutLogType.Leave; seatUsedInfo.EnterOutType = SeatManage.EnumType.LogStatus.Valid; seatUsedInfo.Remark = string.Format("预约该座位的读者在通道机刷卡确认入座,设置在座读者离开"); seatUsedInfo.Flag = SeatManage.EnumType.Operation.OtherReader; int newId = -1; SeatManage.Bll.EnterOutOperate.AddEnterOutLog(seatUsedInfo, ref newId); } SeatManage.ClassModel.EnterOutLogInfo newEnterOutLog = new SeatManage.ClassModel.EnterOutLogInfo();//构造 newEnterOutLog.CardNo = bespeaklog.CardNo; newEnterOutLog.EnterOutLogNo = SeatManage.SeatManageComm.SeatComm.RndNum(); newEnterOutLog.EnterOutState = SeatManage.EnumType.EnterOutLogType.BookingConfirmation; newEnterOutLog.EnterOutType = SeatManage.EnumType.LogStatus.Valid; newEnterOutLog.Flag = SeatManage.EnumType.Operation.Reader; newEnterOutLog.ReadingRoomNo = bespeaklog.ReadingRoomNo; newEnterOutLog.SeatNo = bespeaklog.SeatNo; newEnterOutLog.Remark = string.Format("在通道机刷卡,入座预约的{0} {1}号座位", bespeaklog.ReadingRoomName, bespeaklog.ShortSeatNum); NowStatus = ((int)SeatManage.EnumType.EnterOutLogType.BookingConfirmation).ToString(); int logid = -1; SeatManage.EnumType.HandleResult result = SeatManage.Bll.EnterOutOperate.AddEnterOutLog(newEnterOutLog, ref logid); //添加入座记录 if (result == SeatManage.EnumType.HandleResult.Successed) { bespeaklog.BsepeakState = SeatManage.EnumType.BookingStatus.Confinmed; bespeaklog.CancelPerson = SeatManage.EnumType.Operation.Reader; bespeaklog.CancelTime = nowDate; bespeaklog.Remark = string.Format("在通道机刷卡,入座预约的{0} {1}号座位", bespeaklog.ReadingRoomName, bespeaklog.ShortSeatNum); SeatManage.Bll.T_SM_SeatBespeak.UpdateBespeakList(bespeaklog); } } } } } } catch (Exception e) { Error = e.Message; } return(string.Format(message.ToString(), ReaderNo, ReaderName, NowStatus, BeforeStatus, Error)); }
protected void btnBespeak_Click(object sender, EventArgs e) { SeatManage.ClassModel.BespeakLogInfo bespeakModel = new SeatManage.ClassModel.BespeakLogInfo(); bespeakModel.BsepeakState = SeatManage.EnumType.BookingStatus.Waiting; DateTime bespeatDate = DateTime.Parse(string.Format("{0} {1}", DateTime.Parse(date).ToShortDateString(), roomOpenTime.Value)); if (rblModel.SelectedValue == "1") { if (!DropDownList_Time.Hidden == true) { bespeatDate = DateTime.Parse(string.Format("{0} {1}", DateTime.Parse(date).ToShortDateString(), DropDownList_Time.SelectedText)); } else { bespeatDate = DateTime.Parse(string.Format("{0} {1}", DateTime.Parse(date).ToShortDateString(), DropDownList_FreeTime.SelectedText)); } } bespeakModel.BsepeakTime = bespeatDate; bespeakModel.CardNo = this.LoginId; bespeakModel.ReadingRoomNo = roomNo.Trim(); bespeakModel.Remark = string.Format("读者通过Web页面预约座位"); bespeakModel.SeatNo = seatNo; bespeakModel.SubmitTime = SeatManage.Bll.ServiceDateTime.Now; List <SeatManage.ClassModel.BespeakLogInfo> list = SeatManage.Bll.T_SM_SeatBespeak.GetBespeakLogInfoBySeatNo(seatNo, DateTime.Parse(date).Date); foreach (SeatManage.ClassModel.BespeakLogInfo b in list) { if (b.BsepeakTime == bespeakModel.BsepeakTime) { FineUI.Alert.ShowInTop("对不起,此时间段已被预约。"); btnBespeak.Enabled = false; PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference()); return; } } List <SeatManage.ClassModel.BespeakLogInfo> readerBespeaklist = SeatManage.Bll.T_SM_SeatBespeak.GetBespeakList(this.LoginId, null, DateTime.Parse(date).Date, 0, new List <SeatManage.EnumType.BookingStatus> { SeatManage.EnumType.BookingStatus.Waiting }); foreach (SeatManage.ClassModel.BespeakLogInfo b in readerBespeaklist) { if (b.BsepeakTime == bespeakModel.BsepeakTime) { FineUI.Alert.ShowInTop("对不起,同一时间段只能预约一个座位。"); btnBespeak.Enabled = false; PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference()); return; } } try { SeatManage.EnumType.HandleResult result = SeatManage.Bll.T_SM_SeatBespeak.AddBespeakLogInfo(bespeakModel); if (result == SeatManage.EnumType.HandleResult.Successed) { FineUI.Alert.ShowInTop("座位预约成功,请在规定的时间内刷卡确认。"); PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference()); } else { FineUI.Alert.ShowInTop("预约失败,该座位已经被别人预约。"); PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference()); } } catch (Exception ex) { FineUI.Alert.ShowInTop(string.Format("执行预约操作遇到错误:{0}", ex.Message)); PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference()); } }
public string SubmitBespeakInfo(AMS.Model.AMS_School school, SeatManage.ClassModel.BespeakLogInfo bespeakInfo) { return(bespeakProxy.SubmitBespeakInfo(bespeakInfo)); }
public string SubmitNowDayBespeakInfo(AMS.Model.AMS_School school, SeatManage.ClassModel.BespeakLogInfo bespeakInfo) { throw new NotImplementedException(); }
protected void Page_Load(object sender, EventArgs e) { string strparam = Request.QueryString["param"]; if (string.IsNullOrEmpty(strparam)) { spanWarmInfo.InnerText = "非正常的访问!"; divHanderPanel.Style.Add("display", "none"); return; } Code.ScanCodeParamModel param = new Code.ScanCodeParamModel(strparam); if (Request.Cookies["userInfo"] != null)//存在记录的cookies信息 { cardNo = CookiesManager.GetCookiesValue(CookiesManager.LoginID); password = CookiesManager.GetCookiesValue(CookiesManager.Password); schoolId = CookiesManager.GetCookiesValue(CookiesManager.SchoolId); connection = CookiesManager.GetCookiesValue(CookiesManager.ConnectionString); this.UserSchoolInfo = new AMS.Model.AMS_School() { Id = int.Parse(schoolId), ConnectionString = connection }; if (this.BespeakHandler == null) { this.BespeakHandler = new TcpClient_BespeakSeat.TcpClient_BespeakSeatAllMethod(UserSchoolInfo); } } else { Response.Redirect(string.Format("/Login.aspx?url=/BookSeat/ScanCode.aspx?param={0}", strparam)); } if (!IsPostBack) { DataBind(cardNo, param.SeatNum, param.ReadingRoomNum); } else { string cmd = Request.Form["subCmd"]; string result; switch (cmd) { case "changeSeat": result = this.BespeakHandler.ChangeSeat(this.UserSchoolInfo, cardNo, param.SeatNum, param.ReadingRoomNum); if (!string.IsNullOrEmpty(result)) { this.spanWarmInfo.InnerText = result; } else { this.spanWarmInfo.InnerText = "更换座位成功"; DataBind(cardNo, param.SeatNum, param.ReadingRoomNum); //this.divHanderPanel.Style.Add("display", "none"); } break; case "bespeak": SeatManage.ClassModel.BespeakLogInfo bespeakModel = new SeatManage.ClassModel.BespeakLogInfo(); bespeakModel.BsepeakState = SeatManage.EnumType.BookingStatus.Waiting; DateTime bespeatDate = DateTime.Parse(string.Format("{0} {1}", DateTime.Now.AddDays(1).ToShortDateString(), lblBookTime.InnerText)); bespeakModel.BsepeakTime = bespeatDate; bespeakModel.CardNo = cardNo; bespeakModel.ReadingRoomNo = param.ReadingRoomNum; bespeakModel.Remark = string.Format("读者通过扫码预约座位"); bespeakModel.SeatNo = param.SeatNum; bespeakModel.SubmitTime = DateTime.Now; try { result = this.BespeakHandler.SubmitBespeakInfo(this.UserSchoolInfo, bespeakModel); lblBeapeakMsg.InnerText = result; } catch (Exception ex) { lblBeapeakMsg.InnerText = ex.Message; } break; } } }
void client_OnMsgReceived(byte[] info) { SocketMsgData.SocketRequest msg = SeatManage.SeatManageComm.ByteSerializer.DeserializeByte <SocketMsgData.SocketMsgBase>(info) as SocketMsgData.SocketRequest; if (msg != null) { Console.WriteLine("子系统{0}请求执行{1}方法", msg.SubSystem.ToString(), msg.MethodName); SocketMsgData.SocketResponse response = new SocketMsgData.SocketResponse(); switch (msg.MethodName) { case "CheckAndGetReaderInfo": try { SeatManage.ClassModel.UserInfo user = msg.Parameters[0] as SeatManage.ClassModel.UserInfo; SeatManage.ClassModel.ReaderInfo reader = bespakBll.CheckAndGetReaderInfo(user); response.Result = reader; } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "DelaySeatUsedTime;": try { SeatManage.ClassModel.ReaderInfo reader = msg.Parameters[0] as SeatManage.ClassModel.ReaderInfo; string result = bespakBll.DelaySeatUsedTime(reader); response.Result = result; } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "FreeSeat": try { string cardNo = msg.Parameters[0].ToString(); string result = bespakBll.FreeSeat(cardNo); response.Result = result; } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetAllReadingRoomInfo": try { List <SeatManage.ClassModel.ReadingRoomInfo> rooms = bespakBll.GetAllReadingRoomInfo(); response.Result = rooms; } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetAllRoomSeatUsedState": try { Dictionary <string, SeatManage.ClassModel.ReadingRoomSeatUsedState_Ex> roomState = bespakBll.GetAllRoomSeatUsedState(); response.Result = roomState; } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetBlackList": try { string cardNo = msg.Parameters[0].ToString(); int queryDays = int.Parse(msg.Parameters[1].ToString()); List <SeatManage.ClassModel.BlackListInfo> result = bespakBll.GetBlackList(cardNo, queryDays); response.Result = result; } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetBookLogs": try { string cardNo = msg.Parameters[0].ToString(); string roomNum = msg.Parameters[1] == null ? null : msg.Parameters[1].ToString(); int queryDays = int.Parse(msg.Parameters[2].ToString()); List <SeatManage.ClassModel.BespeakLogInfo> result = bespakBll.GetBookLogs(cardNo, roomNum, queryDays); response.Result = result; } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetBookSeatList": try { DateTime dt = (DateTime)msg.Parameters[0]; string roomNum = msg.Parameters[1] == null ? null : msg.Parameters[1].ToString(); List <SeatManage.ClassModel.Seat> result = bespakBll.GetBookSeatList(dt, roomNum); response.Result = result; } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetCanBespeakReaderRoomInfo": try { DateTime dt = (DateTime)msg.Parameters[0]; response.Result = bespakBll.GetCanBespeakReaderRoomInfo(dt); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetEnterOutLogs": try { string cardNo = msg.Parameters[0].ToString(); string roomNum = msg.Parameters[1] == null ? null : msg.Parameters[1].ToString(); int queryDate = (int)msg.Parameters[2]; response.Result = bespakBll.GetEnterOutLogs(cardNo, roomNum, queryDate); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetReaderInfo": try { string cardNo = msg.Parameters[0].ToString(); response.Result = bespakBll.GetReaderInfo(cardNo); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetReaderInfoByCardNo": try { string cardNo = msg.Parameters[0].ToString(); response.Result = bespakBll.GetReaderInfoByCardNo(cardNo); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetReaderInfoByCardNofalse": try { string cardNo = msg.Parameters[0].ToString(); response.Result = bespakBll.GetReaderInfoByCardNofalse(cardNo); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetViolateDiscipline": try { string cardNo = msg.Parameters[0].ToString(); string roomNum = msg.Parameters[1] == null ? null : msg.Parameters[1].ToString(); int queryDate = (int)msg.Parameters[2]; response.Result = bespakBll.GetViolateDiscipline(cardNo, roomNum, queryDate); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "SetShortLeave": try { string cardNo = msg.Parameters[0].ToString(); response.Result = bespakBll.SetShortLeave(cardNo); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "SubmitBespeakInfo": try { SeatManage.ClassModel.BespeakLogInfo bespeak = (SeatManage.ClassModel.BespeakLogInfo)msg.Parameters[0]; response.Result = bespakBll.SubmitBespeakInfo(bespeak); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "UpdateBookLogsState": try { int bespeak = (int)msg.Parameters[0]; response.Result = bespakBll.UpdateBookLogsState(bespeak); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "GetScanCodeSeatInfo": try { string cardNo = msg.Parameters[0].ToString(); string seatNum = msg.Parameters[1].ToString(); string readingRoomNum = msg.Parameters[2].ToString(); response.Result = bespakBll.GetScanCodeSeatInfo(cardNo, seatNum, readingRoomNum); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; case "ChangeSeat": try { string cardNo = msg.Parameters[0].ToString(); string seatNum = msg.Parameters[1].ToString(); string readingRoomNum = msg.Parameters[2].ToString(); response.Result = bespakBll.ChangeSeat(cardNo, seatNum, readingRoomNum); } catch (Exception ex) { response.ErrorMsg = ex.Message; } break; } response.MethodName = msg.MethodName; response.Sender = msg.Target; response.SubSystem = msg.SubSystem; response.Target = msg.Sender; response.MsgType = SocketMsgData.TcpMsgDataType.Relay; client.Send(SeatManage.SeatManageComm.ByteSerializer.ObjectToByte(response)); Console.WriteLine("执行成功,已返回结果"); } }
public string SubmitBespeakInfo(AMS.Model.AMS_School school, SeatManage.ClassModel.BespeakLogInfo bespeakInfo) { SMS.BespeakServerProxy.BespeakServerProxy bespeakProxy = new SMS.BespeakServerProxy.BespeakServerProxy(school.ConnectionString); return(bespeakProxy.SubmitBespeakInfo(bespeakInfo)); }