public byte[] GetRelaxedLimitFreeFormMessage(string strResponse) { try { FreeFormMsg objFreeFormMsg = new FreeFormMsg(); PCRelaxedLimitNotification objPCRelaxedLimitNotification = new PCRelaxedLimitNotification(); objPCRelaxedLimitNotification.MessageType = GetMessageType(strResponse); objPCRelaxedLimitNotification.TransactionCode = GetTransactionCode(strResponse); objPCRelaxedLimitNotification.CardLength = ResponseDataAccess.IsExtendedPlayer ? Convert.ToInt32(strResponse.Substring(4, 2)) : 0; objPCRelaxedLimitNotification.CardNo = GetCardNumber(strResponse); objPCRelaxedLimitNotification.SlotNo = GetSlotNumber(strResponse); objPCRelaxedLimitNotification.Stand = GetStand(strResponse); if (ResponseDataAccess.IsExtendedPlayer) { objPCRelaxedLimitNotification.IsDayTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(49, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetTime = strResponse.Substring(50, 4); objPCRelaxedLimitNotification.DayOldTargetTime = strResponse.Substring(54, 4); objPCRelaxedLimitNotification.IsWeekTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(58, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetTime = strResponse.Substring(59, 2); objPCRelaxedLimitNotification.WeekOldTargetTime = strResponse.Substring(61, 2); objPCRelaxedLimitNotification.IsMonthTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(63, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetTime = strResponse.Substring(64, 2); objPCRelaxedLimitNotification.MonthOldTargetTime = strResponse.Substring(66, 2); objPCRelaxedLimitNotification.IsDayLossBasisChanged = Convert.ToBoolean(strResponse.Substring(68, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetLoss = Convert.ToInt32(strResponse.Substring(69, 9)); objPCRelaxedLimitNotification.DayOldTargetLoss = Convert.ToInt32(strResponse.Substring(78, 9)); objPCRelaxedLimitNotification.IsWeekLossBasisChanged = Convert.ToBoolean(strResponse.Substring(87, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetLoss = Convert.ToInt32(strResponse.Substring(88, 9)); objPCRelaxedLimitNotification.WeekOldTargetLoss = Convert.ToInt32(strResponse.Substring(97, 9)); objPCRelaxedLimitNotification.IsMonthLossBasisChanged = Convert.ToBoolean(strResponse.Substring(106, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetLoss = Convert.ToInt32(strResponse.Substring(107, 9)); objPCRelaxedLimitNotification.MonthOldTargetLoss = Convert.ToInt32(strResponse.Substring(116, 9)); objPCRelaxedLimitNotification.IsDayWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(125, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetWager = Convert.ToInt32(strResponse.Substring(126, 9)); objPCRelaxedLimitNotification.DayOldTargetWager = Convert.ToInt32(strResponse.Substring(135, 9)); objPCRelaxedLimitNotification.IsWeekWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(144, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetWager = Convert.ToInt32(strResponse.Substring(145, 9)); objPCRelaxedLimitNotification.WeekOldTargetWager = Convert.ToInt32(strResponse.Substring(154, 9)); objPCRelaxedLimitNotification.IsMonthWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(163, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetWager = Convert.ToInt32(strResponse.Substring(164, 9)); objPCRelaxedLimitNotification.MonthOldTargetWager = Convert.ToInt32(strResponse.Substring(182, 9)); objPCRelaxedLimitNotification.IsConsecutiveDaysChanged = Convert.ToBoolean(strResponse.Substring(183, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.NewConsecutiveDays = Convert.ToInt32(strResponse.Substring(185, 2)); objPCRelaxedLimitNotification.OldConsecutiveDays = Convert.ToInt32(strResponse.Substring(188, 2)); } else { objPCRelaxedLimitNotification.IsDayTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(48, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetTime = strResponse.Substring(49, 4); objPCRelaxedLimitNotification.DayOldTargetTime = strResponse.Substring(53, 4); objPCRelaxedLimitNotification.IsWeekTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(57, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetTime = strResponse.Substring(58, 2); objPCRelaxedLimitNotification.WeekOldTargetTime = strResponse.Substring(60, 2); objPCRelaxedLimitNotification.IsMonthTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(62, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetTime = strResponse.Substring(63, 2); objPCRelaxedLimitNotification.MonthOldTargetTime = strResponse.Substring(65, 2); objPCRelaxedLimitNotification.IsDayLossBasisChanged = Convert.ToBoolean(strResponse.Substring(67, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetLoss = Convert.ToInt32(strResponse.Substring(68, 9)); objPCRelaxedLimitNotification.DayOldTargetLoss = Convert.ToInt32(strResponse.Substring(77, 9)); objPCRelaxedLimitNotification.IsWeekLossBasisChanged = Convert.ToBoolean(strResponse.Substring(86, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetLoss = Convert.ToInt32(strResponse.Substring(87, 9)); objPCRelaxedLimitNotification.WeekOldTargetLoss = Convert.ToInt32(strResponse.Substring(96, 9)); objPCRelaxedLimitNotification.IsMonthLossBasisChanged = Convert.ToBoolean(strResponse.Substring(105, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetLoss = Convert.ToInt32(strResponse.Substring(106, 9)); objPCRelaxedLimitNotification.MonthOldTargetLoss = Convert.ToInt32(strResponse.Substring(115, 9)); objPCRelaxedLimitNotification.IsDayWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(124, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetWager = Convert.ToInt32(strResponse.Substring(125, 9)); objPCRelaxedLimitNotification.DayOldTargetWager = Convert.ToInt32(strResponse.Substring(134, 9)); objPCRelaxedLimitNotification.IsWeekWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(143, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetWager = Convert.ToInt32(strResponse.Substring(144, 9)); objPCRelaxedLimitNotification.WeekOldTargetWager = Convert.ToInt32(strResponse.Substring(153, 9)); objPCRelaxedLimitNotification.IsMonthWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(162, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetWager = Convert.ToInt32(strResponse.Substring(163, 9)); objPCRelaxedLimitNotification.MonthOldTargetWager = Convert.ToInt32(strResponse.Substring(172, 9)); objPCRelaxedLimitNotification.IsConsecutiveDaysChanged = Convert.ToBoolean(strResponse.Substring(181, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.NewConsecutiveDays = Convert.ToInt32(strResponse.Substring(182, 2)); objPCRelaxedLimitNotification.OldConsecutiveDays = Convert.ToInt32(strResponse.Substring(184, 2)); } return objFreeFormMsg.GetRelaxedLimitResponse(objPCRelaxedLimitNotification); } catch (Exception ex) { ExceptionManager.Publish(ex); return new byte[] { }; } }
public byte[] GetRelaxedLimitFreeFormMessage(string strResponse) { try { FreeFormMsg objFreeFormMsg = new FreeFormMsg(); PCRelaxedLimitNotification objPCRelaxedLimitNotification = new PCRelaxedLimitNotification(); objPCRelaxedLimitNotification.MessageType = GetMessageType(strResponse); objPCRelaxedLimitNotification.TransactionCode = GetTransactionCode(strResponse); objPCRelaxedLimitNotification.CardLength = ResponseDataAccess.IsExtendedPlayer ? Convert.ToInt32(strResponse.Substring(4, 2)) : 0; objPCRelaxedLimitNotification.CardNo = GetCardNumber(strResponse); objPCRelaxedLimitNotification.SlotNo = GetSlotNumber(strResponse); objPCRelaxedLimitNotification.Stand = GetStand(strResponse); if (ResponseDataAccess.IsExtendedPlayer) { objPCRelaxedLimitNotification.IsDayTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(49, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetTime = strResponse.Substring(50, 4); objPCRelaxedLimitNotification.DayOldTargetTime = strResponse.Substring(54, 4); objPCRelaxedLimitNotification.IsWeekTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(58, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetTime = strResponse.Substring(59, 2); objPCRelaxedLimitNotification.WeekOldTargetTime = strResponse.Substring(61, 2); objPCRelaxedLimitNotification.IsMonthTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(63, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetTime = strResponse.Substring(64, 2); objPCRelaxedLimitNotification.MonthOldTargetTime = strResponse.Substring(66, 2); objPCRelaxedLimitNotification.IsDayLossBasisChanged = Convert.ToBoolean(strResponse.Substring(68, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetLoss = Convert.ToInt32(strResponse.Substring(69, 9)); objPCRelaxedLimitNotification.DayOldTargetLoss = Convert.ToInt32(strResponse.Substring(78, 9)); objPCRelaxedLimitNotification.IsWeekLossBasisChanged = Convert.ToBoolean(strResponse.Substring(87, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetLoss = Convert.ToInt32(strResponse.Substring(88, 9)); objPCRelaxedLimitNotification.WeekOldTargetLoss = Convert.ToInt32(strResponse.Substring(97, 9)); objPCRelaxedLimitNotification.IsMonthLossBasisChanged = Convert.ToBoolean(strResponse.Substring(106, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetLoss = Convert.ToInt32(strResponse.Substring(107, 9)); objPCRelaxedLimitNotification.MonthOldTargetLoss = Convert.ToInt32(strResponse.Substring(116, 9)); objPCRelaxedLimitNotification.IsDayWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(125, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetWager = Convert.ToInt32(strResponse.Substring(126, 9)); objPCRelaxedLimitNotification.DayOldTargetWager = Convert.ToInt32(strResponse.Substring(135, 9)); objPCRelaxedLimitNotification.IsWeekWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(144, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetWager = Convert.ToInt32(strResponse.Substring(145, 9)); objPCRelaxedLimitNotification.WeekOldTargetWager = Convert.ToInt32(strResponse.Substring(154, 9)); objPCRelaxedLimitNotification.IsMonthWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(163, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetWager = Convert.ToInt32(strResponse.Substring(164, 9)); objPCRelaxedLimitNotification.MonthOldTargetWager = Convert.ToInt32(strResponse.Substring(182, 9)); objPCRelaxedLimitNotification.IsConsecutiveDaysChanged = Convert.ToBoolean(strResponse.Substring(183, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.NewConsecutiveDays = Convert.ToInt32(strResponse.Substring(185, 2)); objPCRelaxedLimitNotification.OldConsecutiveDays = Convert.ToInt32(strResponse.Substring(188, 2)); } else { objPCRelaxedLimitNotification.IsDayTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(48, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetTime = strResponse.Substring(49, 4); objPCRelaxedLimitNotification.DayOldTargetTime = strResponse.Substring(53, 4); objPCRelaxedLimitNotification.IsWeekTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(57, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetTime = strResponse.Substring(58, 2); objPCRelaxedLimitNotification.WeekOldTargetTime = strResponse.Substring(60, 2); objPCRelaxedLimitNotification.IsMonthTimeBasisChanged = Convert.ToBoolean(strResponse.Substring(62, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetTime = strResponse.Substring(63, 2); objPCRelaxedLimitNotification.MonthOldTargetTime = strResponse.Substring(65, 2); objPCRelaxedLimitNotification.IsDayLossBasisChanged = Convert.ToBoolean(strResponse.Substring(67, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetLoss = Convert.ToInt32(strResponse.Substring(68, 9)); objPCRelaxedLimitNotification.DayOldTargetLoss = Convert.ToInt32(strResponse.Substring(77, 9)); objPCRelaxedLimitNotification.IsWeekLossBasisChanged = Convert.ToBoolean(strResponse.Substring(86, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetLoss = Convert.ToInt32(strResponse.Substring(87, 9)); objPCRelaxedLimitNotification.WeekOldTargetLoss = Convert.ToInt32(strResponse.Substring(96, 9)); objPCRelaxedLimitNotification.IsMonthLossBasisChanged = Convert.ToBoolean(strResponse.Substring(105, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetLoss = Convert.ToInt32(strResponse.Substring(106, 9)); objPCRelaxedLimitNotification.MonthOldTargetLoss = Convert.ToInt32(strResponse.Substring(115, 9)); objPCRelaxedLimitNotification.IsDayWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(124, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.DayNewTargetWager = Convert.ToInt32(strResponse.Substring(125, 9)); objPCRelaxedLimitNotification.DayOldTargetWager = Convert.ToInt32(strResponse.Substring(134, 9)); objPCRelaxedLimitNotification.IsWeekWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(143, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.WeekNewTargetWager = Convert.ToInt32(strResponse.Substring(144, 9)); objPCRelaxedLimitNotification.WeekOldTargetWager = Convert.ToInt32(strResponse.Substring(153, 9)); objPCRelaxedLimitNotification.IsMonthWagerBasisChanged = Convert.ToBoolean(strResponse.Substring(162, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.MonthNewTargetWager = Convert.ToInt32(strResponse.Substring(163, 9)); objPCRelaxedLimitNotification.MonthOldTargetWager = Convert.ToInt32(strResponse.Substring(172, 9)); objPCRelaxedLimitNotification.IsConsecutiveDaysChanged = Convert.ToBoolean(strResponse.Substring(181, 1) == "Y" ? 1 : 0); objPCRelaxedLimitNotification.NewConsecutiveDays = Convert.ToInt32(strResponse.Substring(182, 2)); objPCRelaxedLimitNotification.OldConsecutiveDays = Convert.ToInt32(strResponse.Substring(184, 2)); } return(objFreeFormMsg.GetRelaxedLimitResponse(objPCRelaxedLimitNotification)); } catch (Exception ex) { ExceptionManager.Publish(ex); return(new byte[] { }); } }