private PCIntervalRatings GetIntervalRatingEntity(MonMsg_G2H request) { InstallationDetailsForMSMQ installationDetails = ExCommsDataContext.Current.GetInstallationDetailsByDatapak(request.InstallationNo); MeterDeltaForPCSessionResult meterdelta = ExCommsDataContext.Current.GetMeterDeltaForPCSession(request.InstallationNo, request.CardNumber, "IR"); string asset = HandlerHelper.Current.GetAssetByStockPrefix(request.Asset); DateTime endDate = DateTime.Now; PCIntervalRatings pgStatusRequest = new PCIntervalRatings() { CardNo = request.CardNumber, CardLength = request.CardNumber.Length, SlotNo = asset, Stand = installationDetails.Bar_Pos_Name, StartDate = meterdelta.SessionStartDate.GetValueOrDefault().ToString("yyyyMMdd"), StartTime = meterdelta.SessionStartDate.GetValueOrDefault().ToString("HHmmss"), EndDate = endDate.Date.ToString("yyyyMMdd"), EndTime = endDate.ToString("HHmmss"), CoinsBet = Convert.ToInt64(meterdelta.CoinsIn), CoinsWon = Convert.ToInt64(meterdelta.CoinsOut), GamesPlayed = Convert.ToInt64(meterdelta.GamesPlayed), BarPosition = installationDetails.Bar_Pos_Name, Asset = asset, SiteCode = request.SiteCode, RatingBasis = HandlerHelper.Current.PCRatingBasis }; return pgStatusRequest; }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { using (ILogMethod method = Log.LogMethod("MonitorHandler_EPI_23_3", "ProcessG2HMessageInternal")) { try { MonTgt_G2H_EFT_DepositRequest monDepositRequest = request.Targets[0] as MonTgt_G2H_EFT_DepositRequest; if (monDepositRequest == null) return false; //DeleteEPIMessage(request.InstallationNo); if (DoDepositRequest(request, monDepositRequest)) method.Info("Deposit Request Transfer done"); else method.Info("Deposit Request Could not complete your transaction"); return true; } catch (Exception ex) { //EPIMsgProcessor.Current.SendEPIMessage(monBalanceResponse); //EPIMsgProcessor.Current.DisplayBallyWelcomeMsg(request.InstallationNo, ); method.Exception(ex); } return false; } }
public bool ProcessG2HMessage(MonMsg_G2H request) { try { return exMonProxy.ProcessG2HMessage(request); } catch (Exception ex) { ExceptionManager.Publish(ex); return false; } }
public bool ProcessG2HMessage(MonMsg_G2H request) { try { ExMonServer4CommsServerProxy exMonProxy = ExMonServer4CommsServerProxyFactory.Get(); return(exMonProxy.ProcessG2HMessage(request)); } catch (Exception ex) { ExceptionManager.Publish(ex); return(false); } }
public bool ProcessG2HMessage(MonMsg_G2H request) { try { ExMonServer4CommsServerProxy exMonProxy = ExMonServer4CommsServerProxyFactory.Get(); return exMonProxy.ProcessG2HMessage(request); } catch (Exception ex) { ExceptionManager.Publish(ex); return false; } }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { try { if (_epiMsg_G2H.ContainsKey(request.FaultType)) return _epiMsg_G2H[request.FaultType](request); return false; } catch (Exception ex) { Log.Exception(ex); return false; } }
/// <summary> /// Converts Freeform entity message to Moitor entity message /// </summary> /// <param name="request"></param> /// <returns></returns> public MonMsg_G2H CreateEntity(FFMsg_G2H request) { using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "CreateEntity")) { MonMsg_G2H result = null; try { result = _monMsgParserG2H.CreateEntity(null, request) as MonMsg_G2H; if (result == null) { Log.Info("Unable to create the monitor message"); return(null); } Stack <IFreeformEntity> st = new Stack <IFreeformEntity>(); request.CopyTo(st); // push all the grandchildren into stack and process again while (st.Count != 0) { IFreeformEntity child = st.Pop() as IFreeformEntity; if (child.IsLeafNode) { continue; } MonitorEntity_MsgTgt target = this.CreateTargetEntity(child as IFreeformEntity_MsgTgt); if (target != null) { result.AddTarget(target); } if (target is MonTgt_G2H_Status_CardBase) { result.CardNumber = (target as MonTgt_G2H_Status_CardBase).CardNumber; } child.CopyTo(st); } } catch (Exception ex) { method.Exception(ex); } return(result); } }
protected bool CheckCardInSession(MonMsg_G2H request, Action<MonMsg_G2H> doWork) { // check if the card in exists in the local dictionary if (!CurrentEPIManager.EPIProcessExists(request.InstallationNo)) { // no card in, ok check in the database if (!CurrentDataContext.IsCardSessionExists(request.InstallationNo, request.CardNumber.ConvertToInt32())) { // still no card in, so exit now if (doWork != null) doWork(request); Log.Info("No card in .. Exiting"); return false; } } return true; }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { using (ILogMethod method = Log.LogMethod("MonitorHandler_PC_33_12", "ProcessG2HMessageInternal")) { try { PCIntervalRatings pgIntervalRating = GetIntervalRatingEntity(request); HandlerHelper.PlayerGatewayInstance.PCIntervalRatingUpdates(pgIntervalRating); return true; } catch (Exception ex) { method.Exception(ex); } return false; } }
/// <summary> /// Invoke appropriate method based on Target and Sub Target Id /// </summary> /// <param name="ffEntity"></param> /// <returns></returns> private MonMsg_G2H InvokeAndReturnMonitorEntity(IFreeformEntity_MsgTgt ffEntity, int targetId) { MonMsg_G2H monMsg = null; try { KeyValuePair <int, int> _value = new KeyValuePair <int, int>(targetId, ffEntity.TargetID); if (_monEntitymsg_G2H.ContainsKey(_value)) { monMsg = _monEntitymsg_G2H[_value].DynamicInvoke(ffEntity) as MonMsg_G2H; } } catch (Exception ex) { ExceptionManager.Publish(ex); } return(monMsg); }
bool IExMonServer4MonProcessorCallback.ProcessG2HMessage(MonMsg_G2H request) { using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "ProcessG2HMessage")) { bool result = default(bool); try { result = MonitorHandlerFactory.Current.Execute(new MonitorExecutionContext(request)); } catch (Exception ex) { method.Exception(ex); } return result; } }
private PCEnrollParamorStatusRequest GetPCEnrollParamorStatusRequestEntity(MonMsg_G2H request, MonTgt_G2H_PC_EnrollmentParameterRequest enrollParamStatReq) { string encryptedPin = HandlerHelper.Current.GetEncryptedPIN(Crypto.Crypto.AsciiToHex(enrollParamStatReq.PlayerPIN, HandlerHelper.Current.Encode)); string asset = HandlerHelper.Current.GetAssetByStockPrefix(request.Asset); DateTime transDate = DateTime.Now; InstallationDetailsForMSMQ installationDetails = ExCommsDataContext.Current.GetInstallationDetailsByDatapak(request.InstallationNo); PCEnrollParamorStatusRequest pgEnrollParamStatReq = new PCEnrollParamorStatusRequest() { CardNo = request.CardNumber, CardLength = request.CardNumber.Length, EncryptedPin = encryptedPin, EventDate = transDate.Date.ToString("yyyyMMdd"), EventTime = transDate.Date.ToString("HHmmss"), SlotNo = installationDetails.Bar_Pos_Name, Stand = asset, BarPosition = installationDetails.Bar_Pos_Name }; return pgEnrollParamStatReq; }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { using (ILogMethod method = Log.LogMethod("MonitorHandler_PC_33_7", "ProcessG2HMessageInternal")) { try { MonTgt_G2H_PC_NotificationResponse notificationResponse = request.Targets[0] as MonTgt_G2H_PC_NotificationResponse; if (notificationResponse == null) return false; PCNotificationResponse pgnotificationResponse = GetNotificationResponseEntity(request, notificationResponse); HandlerHelper.PlayerGatewayInstance.SendPCNotificationResponse(pgnotificationResponse); return true; } catch (Exception ex) { method.Exception(ex); } return false; } }
private PCNotificationResponse GetNotificationResponseEntity(MonMsg_G2H request, MonTgt_G2H_PC_NotificationResponse notificationResponse) { InstallationDetailsForMSMQ installationDetails = ExCommsDataContext.Current.GetInstallationDetailsByDatapak(request.InstallationNo); string asset = HandlerHelper.Current.GetAssetByStockPrefix(request.Asset); DateTime transDate = DateTime.Now; PCNotificationResponse pgnotificationResponse = new PCNotificationResponse() { CardNo = request.CardNumber, CardLength = request.CardNumber.Length, SlotNo = request.Asset, Stand = installationDetails.Bar_Pos_Name, EventDate = transDate.Date, EventTime = transDate.Date.TimeOfDay, SiteCode = request.SiteCode, BarPosition = request.Asset, Asset = asset }; return pgnotificationResponse; }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { using (ILogMethod method = Log.LogMethod("MonitorHandler_PC_33_8", "ProcessG2HMessageInternal")) { try { MonTgt_G2H_PC_PlayerEnrollmentRequest playerEnrollmentReq = request.Targets[0] as MonTgt_G2H_PC_PlayerEnrollmentRequest; if (playerEnrollmentReq == null) return false; installationNo = request.InstallationNo; PCEnrollmentRequest pgEnrollParamStatReq = GetPCPlayerEnrollmentRequestEntity(request, playerEnrollmentReq); HandlerHelper.PlayerGatewayInstance.PCEnrollmentRequestCall(pgEnrollParamStatReq, this.PCPlayerEnrollmentResponseInfo); return true; } catch (Exception ex) { method.Exception(ex); } return false; } }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { using (ILogMethod method = Log.LogMethod("MonitorHandler_PC_33_1", "ProcessG2HMessageInternal")) { try { MonTgt_G2H_PC_StatusRequest statusRequest = request.Targets[0] as MonTgt_G2H_PC_StatusRequest; if (statusRequest == null) return false; installationNo = request.InstallationNo; PCEnrollParamorStatusRequest pgStatusRequest = GetStatusRequestEntity(request, statusRequest); HandlerHelper.PlayerGatewayInstance.PCStatusRequest(pgStatusRequest, this.PCStatusRespone); return true; } catch (Exception ex) { method.Exception(ex); } return false; } }
public MonMsg_G2H CreateEntity(FFMsg_G2H request, IList <MonitorEntity_MsgTgt> targets) { using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "CreateEntity")) { MonMsg_G2H result = null; try { result = _monMsgParserG2H.CreateEntity(null, request) as MonMsg_G2H; if (result == null) { Log.Info("Unable to create the monitor message"); return(null); } foreach (var target in targets) { if (target != null) { if (target is MonTgt_G2H_Status_CardBase) { result.CardNumber = (target as MonTgt_G2H_Status_CardBase).CardNumber; } else if (target is MonTgt_G2H_Meters) { result.Meters = target as MonTgt_G2H_Meters; continue; } result.Targets.Add(target); } } } catch (Exception ex) { method.Exception(ex); } return(result); } }
private bool DoDepositRequest(MonMsg_G2H request, MonTgt_G2H_EFT_DepositRequest monDepositRequest) { Log.Info("Started Deposit Request"); Log.Info("Card Value : " + monDepositRequest.CardNumber); //Log.Info("Encrypted Pin XXXXXXXXXXXXXXXX"); Log.Info("Started DepositRequest " + monDepositRequest.CardNumber); InstallationDetailsForMSMQ installationDetails = ExCommsDataContext.Current.GetInstallationDetailsByDatapak(request.InstallationNo); HandlerHelper.Current.SaveSDTRequest(monDepositRequest.CardNumber, request.InstallationNo); //HandlerHelper.Current.SaveSDTAccountType(monDepositRequest.CardNumber, ); string asset = HandlerHelper.Current.GetAssetByStockPrefix(request.Asset); DateTime transDate = DateTime.Now; //Authentication - To do DepositRequest depositRequest = new DepositRequest { //AccountType = monDepositRequest.ac, CashableFunds = Convert.ToInt32((monDepositRequest.CashableAmount * 100)), NonCashableFunds = Convert.ToInt32((monDepositRequest.NonCashableAmount * 100)), //Authentication = BarPosition = installationDetails.Bar_Pos_Name, CardNo = monDepositRequest.CardNumber, //EncryptedPin = InstallationNo = request.InstallationNo, SlotIndex = installationDetails.Bar_Pos_Name, SlotNumber = asset, Stand = installationDetails.Bar_Pos_Name, TransactionDate = transDate.ToString("yyyyMMdd").PadLeft(8, '0'), TransactionID = installationDetails.TransactionID.ToString(), TransactionTime = transDate.ToString("HHmmss").PadLeft(6, '0'), SiteCode = request.SiteCode }; HandlerHelper.PlayerGatewayInstance.DepositRequest(depositRequest, this.DepositRequestResp); Log.Info("Time taken to send message to Gateway " + DateTime.Now.TimeOfDay.ToString()); return true; }
/// <summary> /// TO process GameIdInfo message /// </summary> /// <param name="request"></param> /// <returns></returns> private bool ProcessGameIdInfoMessage(MonMsg_G2H request) { try { MonTgt_G2H_GIM_GameIDInfo monTgtMsg = request.Targets[0] as MonTgt_G2H_GIM_GameIDInfo; if (monTgtMsg == null) return false; int? installationNo = 0; string assetNo = string.Empty; char? gamePrefix = '\0'; if (GIM_DataAccess.GetInstance().InsertGMULogin(monTgtMsg, request.IpAddress, ref installationNo, ref assetNo, ref gamePrefix)) { MonMsg_H2G monH2G_Msg = new MonMsg_H2G(); MonTgt_H2G_GIM_GameIDInfo monH2G_GameIdInfo_Msg = new MonTgt_H2G_GIM_GameIDInfo(); monH2G_Msg.FaultSource = Convert.ToInt32(FaultSource.GIM_Event); monH2G_Msg.FaultType = Convert.ToInt32(FaultType_GIM.Game_Id_Info_H2G); monH2G_Msg.IpAddress = request.IpAddress; monH2G_Msg.InstallationNo = installationNo.GetValueOrDefault(); monH2G_GameIdInfo_Msg.SourceAddress = new System.Net.IPAddress(Convert.ToByte(request.IpAddress)); monH2G_GameIdInfo_Msg.AssetNumber = assetNo; monH2G_GameIdInfo_Msg.PokerGamePrefix = gamePrefix.ToString(); monH2G_Msg.AddTarget(monH2G_GameIdInfo_Msg); this.ProcessH2GMessage(monH2G_Msg); return true; } return false; } catch (Exception ex) { Log.Exception(ex); return false; } }
private bool ProcessBalanceRequest(MonMsg_G2H request) { try { ModuleProc PROC = new ModuleProc("EPIHandler", "ProcessBalanceRequest"); MonTgt_G2H_EFT_BalanceRequest balnceRequest = request.Targets[0] as MonTgt_G2H_EFT_BalanceRequest; if (balnceRequest == null) return false; string _pin = Crypto.Crypto.AsciiToHex(balnceRequest.Pin, _handlerInstance.IsASCIIEncoding() ? Encoding.ASCII : ASCIIEncoding.Default); string _encryptedPin = Crypto.Crypto.EncryptHexString(_handlerInstance.EncryptionKey, _pin, _handlerInstance.IsASCIIEncoding() ? Encoding.ASCII : ASCIIEncoding.Default); Log.Info("Encrypted Pin " + _encryptedPin); InstallationDetailsForMSMQ installationDetails = EFT_DataAccess.GetInstance().GetInstallationDetailsByDatapak(request.InstallationNo); return false; } catch (Exception ex) { Log.Exception(ex); return false; } }
private void TicketReedeemFail(MonTgt_G2H_Ticket_Redemption_Close tgtSrc, MonMsg_G2H msgSrc, ICallWebService ticketService, ref int? voucherID) { using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "TicketReedeemFail")) { try { long retCode = 0; if (tgtSrc.Status != FF_AppId_TicketRedemption_Close_Status.CouponRejectedbySystem) { if (_configStore.IsCrossTicketingEnabled) { if ((string.Equals(HandlerHelper.Current.LocalSiteCode, msgSrc.SiteCode)) || ticketService.IsTISPrintedTicketPrefix(tgtSrc.Barcode)) { if (!ExCommsDataContext.Current.RedeemTicketComplete(tgtSrc.Barcode, msgSrc.Asset, ref voucherID, msgSrc.SiteCode, msgSrc.CardNumber)) { Log.Info("TICKET_REDEEM_CLOSE_FAIL (TIS or LOCAL SITE): No proper Ticket Redeemption!!"); } } else { Log.Info("TICKET_REDEEM_CLOSE_FAIL (CROSS SITE): Foreign Ticket Rdm Cmpt cancel"); if (msgSrc.InstallationNo == 0 || string.IsNullOrEmpty(msgSrc.Asset)) { Log.Info("TICKET_REDEEM_CLOSE_FAIL (CROSS SITE): Installation detail in " + msgSrc.InstallationNo.ToString() + " lID DeviceID " + msgSrc.Asset); if (ticketService.TicketRedeemCancel(tgtSrc.Barcode, msgSrc.Asset, 0, out retCode) != 0) { Log.Info("TICKET_REDEEM_CLOSE_FAIL (CROSS SITE): Problem while sending the Ticket Redeem complete msg to DB!"); } } else { Log.Info("TICKET_REDEEM_CLOSE_FAIL (CROSS SITE): Stored Installation detail in " + msgSrc.InstallationNo.ToString() + " lID DeviceID " + msgSrc.Asset); if (ticketService.TicketRedeemCancel(tgtSrc.Barcode, msgSrc.Asset, 0, out retCode) != 0) { Log.Info("TICKET_REDEEM_CLOSE_FAIL (CROSS SITE): Problem while sending the Ticket Redeem complete msg to DB!"); } } } } else { if (!ExCommsDataContext.Current.RedeemTicketComplete(tgtSrc.Barcode, msgSrc.Asset, ref voucherID, msgSrc.SiteCode, msgSrc.CardNumber)) { Log.Info("TICKET_REDEEM_CLOSE_FAIL (LOCAL SITE): No proper Ticket Redeemption!!"); } } } } catch (Exception ex) { method.Exception(ex); } } }
private PCEnrollmentRequest GetPCPlayerEnrollmentRequestEntity(MonMsg_G2H request, MonTgt_G2H_PC_PlayerEnrollmentRequest playerEnrollmentReq) { string asset = HandlerHelper.Current.GetAssetByStockPrefix(request.Asset); DateTime transDate = DateTime.Now; InstallationDetailsForMSMQ installationDetails = ExCommsDataContext.Current.GetInstallationDetailsByDatapak(request.InstallationNo); PCEnrollmentRequest pgEnrollParamStatReq = new PCEnrollmentRequest() { CardNo = request.CardNumber, CardLength = request.CardNumber.Length, SlotNo = installationDetails.Bar_Pos_Name, Stand = asset, BarPosition = installationDetails.Bar_Pos_Name, EventDate = transDate.Date.ToString("yyyyMMdd"), EventTime = transDate.Date.ToString("HHmmss"), IsDayTimeBasis = playerEnrollmentReq.IsDayTimeBasis, DayTargetTime = playerEnrollmentReq.DayDefaultTime.ToString(), IsWeekTimeBasis = playerEnrollmentReq.IsWeekTimeBasis, WeekTargetTime = playerEnrollmentReq.WeekTargetTime.ToString(), IsMonthTimeBasis = playerEnrollmentReq.IsMonthTimeBasis, MonthTargetTime = playerEnrollmentReq.MonthTargetTime.ToString(), IsDayLossBasis = playerEnrollmentReq.IsDayLossBasis, DayTargetLoss = Convert.ToInt32((playerEnrollmentReq.DayTargetLossValue * 100)), IsWeekLossBasis = playerEnrollmentReq.IsWeekLossBasis, WeekTargetLoss = Convert.ToInt32((playerEnrollmentReq.WeekTargetLossValue * 100)), IsMonthLossBasis = playerEnrollmentReq.IsMonthLossBasis, MonthTargetLoss = Convert.ToInt32((playerEnrollmentReq.MonthTargetLossValue * 100)), IsDayWagerBasis = playerEnrollmentReq.IsDayWagerBasis, DayTargetWagers = Convert.ToInt32((playerEnrollmentReq.DayTargetWager* 100)), IsWeekWagerBasis = playerEnrollmentReq.IsWeekWagerBasis, WeekTargetWagers = Convert.ToInt32((playerEnrollmentReq.WeekTargetWager* 100)), IsMonthWagerBasis = playerEnrollmentReq.IsMonthWagerBasis, MonthTargetWagers = Convert.ToInt32((playerEnrollmentReq.MonthTargetWager * 100)) }; return pgEnrollParamStatReq; }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { if (request == null) return false; using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "ProcessG2HMessageInternal")) { bool result = false; string key = request.FaultSourceTypeKey; try { method.Info("!&! HANDLER STARTED FOR : " + key); result = _handlerMappings.ContainsKey(key) ? _handlerMappings[key].ProcessG2HMessage(request) : _faultHandler.ProcessG2HMessage(request); } catch (Exception ex) { method.Exception(ex); } finally { method.Info("!&! HANDLER COMPLETED FOR : " + key); } return result; } }
protected override void OnCreateTicketException(MonMsg_G2H request, MonitorEntity_MsgTgt target) { InstallationDetailsForMSMQ dbData = request.Extra as InstallationDetailsForMSMQ; ExCommsDataContext.Current.CreateTickeException_Handpay(request.InstallationNo, 0, dbData.Bar_Pos_Name, true, "MYSTERY", request.FaultDate); }
protected virtual bool ProcessG2HMessageInternal(MonMsg_G2H request) { return true; }
private void FillRequestValues(MonMsg_G2H request) { using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "FillRequestValues")) { try { InstallationDetailsForMSMQ data = ModuleHelper.Current.GetInstallationFromCache(request.FaultSourceTypeKey, request.InstallationNo); request.Extra = data; request.SiteCode = data.SiteCode; request.Asset = data.Stock_No; } catch (Exception ex) { method.Exception(ex); } } }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { MonTgt_G2H_GameCapping_StartEnd tgt_G2H_GameCapping_Start = request.Targets[0] as MonTgt_G2H_GameCapping_StartEnd; ExCommsDataContext.Current.AlertGameCappingSessionExpires(request.InstallationNo); return true; }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { bool retVal = true; const string msg_type = "Card Out"; InstallationDetailsForMSMQ installationDetails = null; // add the card detail var cardDetail = EPIManager.Current.AddOrUpdateCardInDetail(request.InstallationNo, request.CardNumber); using (ILogMethod method = Log.LogMethod("MonitorHandler_EPI_22_38", "ProcessG2HMessageInternal")) { try { method.Info("Started Employee Card Out for " + request.CardNumber); if (HandlerHelper.Current.IsEmployeeCardTrackingEnabled) { ExCommsDataContext.Current.UpdateFloorStatus(request.InstallationNo, DateTime.Now, null, null, null, null, null, null, null, null, "", request.FaultDate.ToString(), null); EPIManager.Current.CreateProcess(request.InstallationNo); method.Info("Insert Employee card Session Details"); ExCommsDataContext.Current.UpdateEmployeeCardSessions(request.CardNumber, request.FaultDate, request.InstallationNo, msg_type); installationDetails = request.Extra as InstallationDetailsForMSMQ; ExCommsDataContext.Current.SendEmployeeSTMALert(installationDetails.Bar_Pos_No.ToString(), request.FaultDate, msg_type, request.CardNumber); try { Audit.Transport.Audit_History m_AuditInfo = new Audit.Transport.Audit_History(); m_AuditInfo.AuditModuleName = ModuleName.MSMQ; m_AuditInfo.Audit_Date = DateTime.Now.Date; m_AuditInfo.Audit_User_ID = 0; m_AuditInfo.Audit_User_Name = "System"; m_AuditInfo.Audit_Screen_Name = "Employee card"; m_AuditInfo.Audit_Desc = "Employee Card Out"; m_AuditInfo.AuditOperationType = OperationType.ADD; m_AuditInfo.Audit_Field = "EmployeecardNumber"; m_AuditInfo.Audit_New_Vl = request.CardNumber; m_AuditInfo.Audit_Slot = request.Asset; Log.Info(method.PROC, "Insert Auditing info for Employee card out Event"); AuditViewerBusiness.InsertAuditData(m_AuditInfo); } catch (Exception ex) { Log.Exception(ex); } try { if (SDTMessages.Instance.ProcessEmployeeCardOut(request)) { EPIManager.Current.CreateInactivityTimeout(request.InstallationNo); EPIManager.Current.CreateIntervalRatingTimer(request.InstallationNo); } } finally { } } } catch (Exception ex) { retVal = false; // TODO: EPIMsgProcessor.SendCommand if (installationDetails != null) CurrentEPIMsgProcessor.DisplayBallyWelcomeMsg(request.InstallationNo, installationDetails.Bar_Pos_Name, DateTime.Now); if (cardDetail != null) cardDetail.Clear(); Log.Exception(ex); } finally { method.Info("Employee Card Out completed for : " + request.CardNumber); } } return retVal; }
protected virtual void OnCreateTicketException(MonMsg_G2H request, MonitorEntity_MsgTgt target) { }
public MonitorExecutionContext(MonMsg_G2H sourceMessage) : this() { this.G2HMessage = sourceMessage; }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { bool retVal = true; const string msg_type = "Card In"; InstallationDetailsForMSMQ installationDetails = null; // add the card detail var cardDetail = EPIManager.Current.AddOrUpdateCardInDetail(request.InstallationNo, request.CardNumber); using (ILogMethod method = Log.LogMethod("MonitorHandler_EPI_22_37", "ProcessG2HMessageInternal")) { try { method.Info("Started Employee Card In for " + request.CardNumber); EPIManager.Current.CreateProcess(request.InstallationNo); if (HandlerHelper.Current.IsEmployeeCardTrackingEnabled) { method.Info("Insert Employee card Session Details"); ExCommsDataContext.Current.UpdateEmployeeCardSessions(request.CardNumber, request.FaultDate, request.InstallationNo, msg_type); installationDetails = request.Extra as InstallationDetailsForMSMQ; ExCommsDataContext.Current.SendEmployeeSTMALert(installationDetails.Bar_Pos_No.ToString(), request.FaultDate, msg_type, request.CardNumber); try { Audit.Transport.Audit_History m_AuditInfo = new Audit.Transport.Audit_History(); m_AuditInfo.AuditModuleName = ModuleName.MSMQ; m_AuditInfo.Audit_Date = DateTime.Now.Date; m_AuditInfo.Audit_User_ID = 0; m_AuditInfo.Audit_User_Name = "System"; m_AuditInfo.Audit_Screen_Name = "Employee card"; m_AuditInfo.Audit_Desc = "Employee Card In"; m_AuditInfo.AuditOperationType = OperationType.ADD; m_AuditInfo.Audit_Field = "EmployeecardNumber"; m_AuditInfo.Audit_New_Vl = request.CardNumber; m_AuditInfo.Audit_Slot = request.Asset; Log.Info(method.PROC, "Insert Auditing info for Employee card In Event"); AuditViewerBusiness.InsertAuditData(m_AuditInfo); } catch (Exception ex) { Log.Exception(ex); } string empflags = ExCommsDataContext.Current.GetEmployeeFlags(request.CardNumber); if (!String.IsNullOrEmpty(empflags)) { method.Info("Flags " + empflags); empflags = empflags.Substring(2); List<byte> enumver = Enumerable.Range(0, empflags.Length) .Where((x) => x % 2 == 0) .Select((x) => Convert.ToByte(empflags.Substring(x, 2), 16)) .ToList(); List<byte> cardno = Enumerable.Range(0, request.CardNumber.PadLeft(10, '0').Length) .Where((x) => x % 2 == 0) .Select((x) => Convert.ToByte(request.CardNumber.PadLeft(10, '0').Substring(x, 2), 16)) .ToList(); enumver.Insert(0, Convert.ToByte(empflags[0])); enumver.Insert(1, Convert.ToByte(empflags[1])); enumver.InsertRange(0, cardno); // TODO: EPIMsgProcessor.SendCommand } } ExCommsDataContext.Current.UpdateFloorStatus(request.InstallationNo, DateTime.Now, null, null, null, null, null, null, null, null, request.CardNumber, request.FaultDate.ToString(), null); ExCommsDataContext.Current.UpdateGameCappingDetails(request.CardNumber, 1, false); try { if (SDTMessages.Instance.ProcessEmployeeCardIn(request)) { EPIManager.Current.CreateInactivityTimeout(request.InstallationNo); EPIManager.Current.CreateIntervalRatingTimer(request.InstallationNo); } } finally { } } catch (Exception ex) { retVal = false; // TODO: EPIMsgProcessor.SendCommand if (installationDetails != null) CurrentEPIMsgProcessor.DisplayBallyWelcomeMsg(request.InstallationNo, installationDetails.Bar_Pos_Name, DateTime.Now); if (cardDetail != null) cardDetail.Clear(); Log.Exception(ex); } finally { method.Info("Employee Card In completed for : " + request.CardNumber); } } return retVal; }
protected override bool ProcessG2HMessageInternal(MonMsg_G2H request) { return false; }
private bool DoDepositComplete(MonMsg_G2H request, MonTgt_G2H_EFT_DepositComplete monDepositRequest) { InstallationDetailsForMSMQ installationDetails = ExCommsDataContext.Current.GetInstallationDetailsByDatapak(request.InstallationNo); HandlerHelper.Current.SaveSDTRequest(monDepositRequest.CardNumber, request.InstallationNo); Log.Info("TransactionID used in Deposit Request " + installationDetails.TransactionID.ToString()); string asset = HandlerHelper.Current.GetAssetByStockPrefix(request.Asset); DateTime transDate = DateTime.Now; //Authentication - To do DepositRequest depositRequest = new DepositRequest { //AccountType = monDepositRequest.ac, CashableFunds = Convert.ToInt32((monDepositRequest.CashableAmount * 100)), NonCashableFunds = Convert.ToInt32((monDepositRequest.NonCashableAmount * 100)), //Authentication = BarPosition = installationDetails.Bar_Pos_Name, CardNo = monDepositRequest.CardNumber, InstallationNo = request.InstallationNo, SlotIndex = installationDetails.Bar_Pos_Name, SlotNumber = asset, Stand = installationDetails.Bar_Pos_Name, TransactionDate = transDate.ToString("yyyyMMdd").PadLeft(8, '0'), TransactionID = installationDetails.TransactionID.ToString().PadLeft(3, '0').Substring(0, 3), TransactionTime = transDate.ToString("HHmmss").PadLeft(6, '0'), SiteCode = request.SiteCode }; HandlerHelper.PlayerGatewayInstance.DepositComplete(depositRequest, this.DepositCompleteResp); return true; }
public bool ProcessG2HMessage(MonMsg_G2H request) { bool result = false; try { // force meters add //this.ForceMeterRead(request); // processing result = this.ProcessG2HMessageInternal(request); } catch (Exception ex) { Log.Exception(ex); } return result; }