public void StoreAidRow(int acqNumber, int recNumber, int aidLen, byte[] aid, int appType, int appNameLength, byte[] appName, byte[] appVer1, byte[] appVer2, byte[] appVer3, int country, int currency, int exponent, byte[] merchantId, int mcc, byte[] terminalId, byte[] capabilities, byte[] additionalCapabilities, int type, byte[] tacDefault, byte[] tacDenial, byte[] tacOnline, int floorLimit, byte tcc, bool ctlsZeroAm, int ctlsMode, int crlsTrxLimit, int ctlsFloorLimit, int ctlsCvmLimit, byte[] ctlsAppVer, int tdolLen, byte[] tdol, int ddolLen, byte[] ddol) { AidEntry entry = new AidEntry { AcquirerNumber = acqNumber, RecordIndex = recNumber, Aid = Encoding.ASCII.GetString(aid, 0, aidLen * 2), ApplicationType = appType, ApplicationName = Encoding.ASCII.GetString(appName, 0, appNameLength), AppVersion1 = Encoding.ASCII.GetString(appVer1, 0, 4), AppVersion2 = Encoding.ASCII.GetString(appVer2, 0, 4), AppVersion3 = Encoding.ASCII.GetString(appVer3, 0, 4), CountryCode = country, Currency = currency, CurrencyExponent = exponent, MerchantId = Encoding.ASCII.GetString(merchantId, 0, 15), Mcc = mcc, TerminalId = Encoding.ASCII.GetString(terminalId, 0, 8), TerminalCapabilities = Encoding.ASCII.GetString(capabilities, 0, 6), AdditionalTerminalCapabilities = Encoding.ASCII.GetString(additionalCapabilities, 0, 10), TerminalType = type, DefaultTac = Encoding.ASCII.GetString(tacDefault, 0, 10), DenialTac = Encoding.ASCII.GetString(tacDenial, 0, 10), OnlineTac = Encoding.ASCII.GetString(tacOnline, 0, 10), FloorLimit = floorLimit, Tcc = Convert.ToString(tcc), CtlsZeroAm = ctlsZeroAm, CtlsMode = ctlsMode, CtlsTransactionLimit = crlsTrxLimit, CtlsFloorLimit = ctlsFloorLimit, CtlsCvmLimit = ctlsCvmLimit, CtlsApplicationVersion = Encoding.ASCII.GetString(ctlsAppVer, 0, 4), Tdol = Encoding.ASCII.GetString(tdol, 0, tdolLen), Ddol = Encoding.ASCII.GetString(ddol, 0, ddolLen) }; db.Insert(entry); }
public Aid(AidEntry e) { IsAid = true; AcquirerNumber = e.AcquirerNumber; RecordIndex = e.RecordIndex; AidNumber = GetBytes(e.Aid, 32, out AidLength); AidLength /= 2; ApplicationType = e.ApplicationType; ApplicationName = GetBytes(e.ApplicationName, 16, out ApplicationNameLength); AppVersion1 = GetBytes(e.AppVersion1, 4); AppVersion2 = GetBytes(e.AppVersion2, 4); AppVersion3 = GetBytes(e.AppVersion3, 4); CountryCode = e.CountryCode; Currency = e.Currency; CurrencyExponent = e.CurrencyExponent; MerchantId = GetHexBytes("", 15); Mcc = e.Mcc; TerminalId = GetBytes(e.TerminalId, 8); TerminalCapabilities = GetBytes(e.TerminalCapabilities, 6); AdditionalTerminalCapabilities = GetBytes(e.AdditionalTerminalCapabilities, 10); TerminalType = e.TerminalType; DefaultTac = GetBytes(e.DefaultTac, 10); DenialTac = GetBytes(e.DenialTac, 10); OnlineTac = GetBytes(e.OnlineTac, 10); FloorLimit = e.FloorLimit; Tcc = Convert.ToByte(e.Tcc[0]); CtlsZeroAm = e.CtlsZeroAm; CtlsMode = e.CtlsMode; CtlsTransactionLimit = e.CtlsTransactionLimit; CtlsFloorLimit = e.CtlsFloorLimit; CtlsCvmLimit = e.CtlsCvmLimit; CtlsApplicationVersion = GetBytes(e.CtlsApplicationVersion, 4); Tdol = GetBytes(e.Tdol, 40, out TdolLength); Ddol = GetBytes(e.Ddol, 40, out DdolLength); }