protected override IMonitorEntity_MsgTgt CreateMonitorTarget(IMonitorEntity parent, IFreeformEntity_MsgTgt request) { using (ILogMethod method = Log.LogMethod("MonTgtParser_PC_NotificationResponse_G2H", "CreateMonitorTarget")) { try { FFTgt_G2H_PC_NotificationResponse ffTgt = request as FFTgt_G2H_PC_NotificationResponse; if (ffTgt == null) { return(null); } MonTgt_G2H_PC_NotificationResponse monTgt = new MonTgt_G2H_PC_NotificationResponse() { AcknowledgementType = ffTgt.AcknowledgementType, PlayerAccNoLen = ffTgt.PlayerAccNoLen, PlayerAccNo = ffTgt.PlayerAccNo }; return(monTgt); } catch (Exception ex) { method.Exception(ex); return(null); } } }
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 IMonitorEntity_MsgTgt CreateMonitorTarget(IMonitorEntity parent, IFreeformEntity_MsgTgt request) { using (ILogMethod method = Log.LogMethod("MonTgtParser_PC_NotificationResponse_G2H", "CreateMonitorTarget")) { try { FFTgt_G2H_PC_NotificationResponse ffTgt = request as FFTgt_G2H_PC_NotificationResponse; if (ffTgt == null) return null; MonTgt_G2H_PC_NotificationResponse monTgt = new MonTgt_G2H_PC_NotificationResponse() { AcknowledgementType = ffTgt.AcknowledgementType, PlayerAccNoLen= ffTgt.PlayerAccNoLen, PlayerAccNo = ffTgt.PlayerAccNo }; return monTgt; } catch (Exception ex) { method.Exception(ex); return null; } } }