public TITO() { _exchangeClientSiteCode = new ExchangeClient(); _exchangeClientSiteCode.OPT_PARAM_ACK += ExchangeClientSiteCodeAck; _exchangeClientSiteCode.InitialiseExchange(0); _exchangeClientTITOEnDis = new ExchangeClient(); _exchangeClientTITOEnDis.TITO_ENDIS_ACK += ExchangeClientTITOAck; _exchangeClientTITOEnDis.InitialiseExchange(0); _exchangeClientTITOEXP = new ExchangeClient(); _exchangeClientTITOEXP.TITO_PARAM_ACK += ExchangeClientVoucherAck; _exchangeClientTITOEXP.InitialiseExchange(0); if (dTITORequest == null) { dTITORequest = new SortedDictionary <int, TITOThreadDataRequest>(); } if (dTicketExpireRequest == null) { dTicketExpireRequest = new SortedDictionary <int, int>(); } if (dSiteCodeRequest == null) { dSiteCodeRequest = new SortedDictionary <int, int>(); } _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("TITOConfigInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _thAckResponse = new ThreadDispatcher <TITOThreadDataResponse>(1, "_thTITOAckResponse"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <TITOThreadDataResponse>(this.TITOProcessResponse)); _thAckResponse.Initialize(); _thTicketExpireAckResponse = new ThreadDispatcher <TITOThreadDataResponse>(1, "_thTicketExpireAckResponse"); _thTicketExpireAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <TITOThreadDataResponse>(this.TicketExpireProcessResponse)); _thTicketExpireAckResponse.Initialize(); _thSiteCodeAckResponse = new ThreadDispatcher <TITOThreadDataResponse>(1, "_thSiteCodeAckResponse"); _thSiteCodeAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <TITOThreadDataResponse>(this.SiteCodeProcessResponse)); _thSiteCodeAckResponse.Initialize(); _iExchangeAdminSiteCode = (IExchangeAdmin)_exchangeClientSiteCode; _iExchangeAdminTITOEnDis = (IExchangeAdmin)_exchangeClientTITOEnDis; _iExchangeAdminTITOEXP = (IExchangeAdmin)_exchangeClientTITOEXP; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }
public AFTEnableDisable() { _exchangeClient = new ExchangeClient(); _exchangeClient.AFTAck += ExchangeClientAck; _exchangeClient.InitialiseExchange(0); if (_requestCollection == null) _requestCollection = new SortedDictionary<int, AFTEnableDisableThreadData>(); _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("AFTTimeInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _thAckResponse = new ThreadDispatcher<AFTEnableDisableThreadDataResponse>(1, "_thAckResponse_AFTEnableDisable"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler<AFTEnableDisableThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }
public EmployeeMasterCard() { _exchangeClient = new ExchangeClient(); _exchangeClient.EMP_DATA_ACK += new _IExchangeClientEvents_EMP_DATA_ACKEventHandler(_exchangeClient_EMP_DATA_ACK); _exchangeClient.InitialiseExchange(0); if (_requestCollection == null) { _requestCollection = new SortedDictionary <int, EmployeeMasterCardThreadData>(); } _tmrRequest = new System.Timers.Timer(Int32.Parse(ConfigManager.Read("EmployeecardTimeInterval")) * 1000); _tmrRequest.Elapsed += new ElapsedEventHandler(ProcessRequest); _thAckResponse = new ThreadDispatcher <EmployeeMasterCardThreadDataResponse>(1, "_thAckResponse_EmployeeMasterCard"); _thAckResponse.AddProcessThreadData(new ProcessThreadDataHandler <EmployeeMasterCardThreadDataResponse>(this.ProcessResponse)); _thAckResponse.Initialize(); _iExchangeAdmin = (IExchangeAdmin)_exchangeClient; ObjectStateNotifier.AddObserver(this); _tmrRequest.Start(); }