protected override IMonitorEntity_MsgTgt CreateMonitorTarget(IMonitorEntity parent, IFreeformEntity_MsgTgt request) { using (ILogMethod method = Log.LogMethod("MonTgtParser_PC_StatusRequest_G2H", "CreateMonitorTarget")) { try { FFTgt_G2H_PC_StatusRequest ffTgt = request as FFTgt_G2H_PC_StatusRequest; if (ffTgt == null) { return(null); } MonTgt_G2H_PC_StatusRequest monTgt = new MonTgt_G2H_PC_StatusRequest() { PlayerAccNoLen = ffTgt.PlayerAccNoLen, PlayerAccNo = ffTgt.PlayerAccNo, PlayerPIN = ffTgt.PlayerPIN, }; return(monTgt); } catch (Exception ex) { method.Exception(ex); return(null); } } }
private PCEnrollParamorStatusRequest GetStatusRequestEntity(MonMsg_G2H request, MonTgt_G2H_PC_StatusRequest statusRequest) { string encryptedPin = HandlerHelper.Current.GetEncryptedPIN(Crypto.Crypto.AsciiToHex(statusRequest.PlayerPIN, HandlerHelper.Current.Encode)); string asset = HandlerHelper.Current.GetAssetByStockPrefix(request.Asset); DateTime transDate = DateTime.Now; InstallationDetailsForMSMQ installationDetails = ExCommsDataContext.Current.GetInstallationDetailsByDatapak(request.InstallationNo); Log.Info("Encrypted Pin " + encryptedPin); PCEnrollParamorStatusRequest pgStatusRequest = new PCEnrollParamorStatusRequest() { CardNo = request.CardNumber, CardLength = request.CardNumber.Length, EncryptedPin = encryptedPin, EventDate = transDate.Date.ToString("yyyyMMdd"), EventTime = transDate.Date.ToString("HHmmss"), SlotNo = asset, Stand = installationDetails.Bar_Pos_Name, BarPosition = installationDetails.Bar_Pos_Name, Asset = asset }; return pgStatusRequest; }
protected override IMonitorEntity_MsgTgt CreateMonitorTarget(IMonitorEntity parent, IFreeformEntity_MsgTgt request) { using (ILogMethod method = Log.LogMethod("MonTgtParser_PC_StatusRequest_G2H", "CreateMonitorTarget")) { try { FFTgt_G2H_PC_StatusRequest ffTgt = request as FFTgt_G2H_PC_StatusRequest; if (ffTgt == null) return null; MonTgt_G2H_PC_StatusRequest monTgt = new MonTgt_G2H_PC_StatusRequest() { PlayerAccNoLen = ffTgt.PlayerAccNoLen, PlayerAccNo = ffTgt.PlayerAccNo, PlayerPIN = ffTgt.PlayerPIN, }; return monTgt; } catch (Exception ex) { method.Exception(ex); return null; } } }