public bool IsCanWaitSeat(AMS.Model.AMS_School school, string CardNo, string roomNo) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.IsCanWaitSeat(CardNo, roomNo)); } catch (Exception ex) { throw new RemoteServiceLinkFailed(ex.Message); } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
public string SubmitWaitInfo(AMS.Model.AMS_School school, ClassModel.WaitSeatLogInfo waitInfo) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.SubmitWaitInfo(waitInfo)); } catch (Exception ex) { throw new RemoteServiceLinkFailed(ex.Message); } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
/// <summary> /// 获取读者信息 /// </summary> /// <param name="school"></param> /// <param name="reader"></param> /// <returns></returns> public ClassModel.ReaderInfo GetReaderInfo(AMS.Model.AMS_School school, ClassModel.ReaderInfo reader) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.GetReaderInfo(reader.CardNo)); } catch (ReaderHandlerFailed ex) { throw ex; } catch (Exception ex) { throw new RemoteServiceLinkFailed(); } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
public List <ClassModel.Seat> GetBookSeatList(AMS.Model.AMS_School school, DateTime bespeakDate, string RoomId) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.GetBookSeatList(bespeakDate, RoomId)); } catch (Exception ex) { throw new RemoteServiceLinkFailed(ex.Message); } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
/// <summary> /// 续时 /// </summary> /// <param name="school"></param> /// <param name="reader"></param> /// <returns></returns> public string DelaySeatUsedTime(AMS.Model.AMS_School school, ReaderInfo reader) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.DelaySeatUsedTime(reader)); } catch (ReaderHandlerFailed ex) { throw ex; } catch (Exception ex) { throw ex; } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
public string SelectSeat(AMS.Model.AMS_School school, string cardNo, string seatNum, string readingRoomNum) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.SelectSeat(cardNo, seatNum, readingRoomNum)); } catch (Exception ex) { throw ex; } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
/// <summary> /// 过去预约记录 /// </summary> /// <param name="school"></param> /// <param name="cardNo"></param> /// <param name="readingRoomID"></param> /// <param name="queryDays"></param> /// <returns></returns> public List <ClassModel.BespeakLogInfo> GetBookLogs(AMS.Model.AMS_School school, string cardNo, string readingRoomID, int queryDays) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.GetBookLogs(cardNo, readingRoomID, queryDays)); } catch (Exception ex) { throw ex; } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
/// <summary> /// 获取阅览室状态 /// </summary> /// <param name="school"></param> /// <returns></returns> public Dictionary <string, ReadingRoomSeatUsedState_Ex> GetAllRoomSeatUsedState(AMS.Model.AMS_School school) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.GetAllRoomSeatUsedState()); } catch (ReaderHandlerFailed ex) { throw ex; } catch (Exception ex) { throw new RemoteServiceLinkFailed(); } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
/// <summary> /// 更新预约状态 /// </summary> /// <param name="school"></param> /// <param name="bookNo"></param> /// <returns></returns> public bool UpdateBookLogsState(AMS.Model.AMS_School school, int bookNo) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.UpdateBookLogsState(bookNo)); } catch (Exception ex) { throw ex; } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
public List <ClassModel.ReadingRoomInfo> GetReadingRoomUsingUsingState(AMS.Model.AMS_School school) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.GetReadingRoomUsingUsingState()); } catch (Exception ex) { throw ex; } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
public ClassModel.StudyBookingLog GetStudyLog(AMS.Model.AMS_School school, int logID) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.GetStudyLog(logID)); } catch (Exception ex) { throw new RemoteServiceLinkFailed(ex.Message); } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }
public SeatBespeakTcpProxy() { try { bespakBll = new SeatManage.PocketBespeakBllService.PocketBespeakBllService(); } catch (Exception ex) { throw ex; } }
/// <summary> /// 从学校获取读者 信息 /// </summary> /// <param name="user"></param> /// <param name="school"></param> /// <returns></returns> public ClassModel.ReaderInfo CheckAndGetReaderInfo(ClassModel.UserInfo user, AMS.Model.AMS_School school) { SeatManage.IPocketBespeakBllService.IPocketBespeakBllService pocketBespeak = BespeakServiceConnProxy.BespeakServiceConnProxy.CreateChannelPocketBespeakBllService(school.ConnectionString); try { return(pocketBespeak.CheckAndGetReaderInfo(user)); } catch (LoginFailed ex) { throw ex; } catch (ReaderHandlerFailed ex) { throw ex; } catch (EndpointNotFoundException ex) { throw new RemoteServiceLinkFailed(); } catch (CommunicationException ex) { throw ex; } catch (Exception ex) { throw ex; } finally { ICommunicationObject ICommObjectService = pocketBespeak as ICommunicationObject; try { if (ICommObjectService.State == CommunicationState.Faulted) { ICommObjectService.Abort(); } else { ICommObjectService.Close(); } } catch { ICommObjectService.Abort(); } } }