TransactionING GetFromLine(string line) { var items = line.Split(';'); _items = items; int count = items.Length; if (count != ITEMS_COUNT) { return(null); } TransactionING transaction = new TransactionING { TransactionDate = GetDate(items[0]), BookingDate = GetDate(items[1]), CounterPartData = GetStr(items[2]), AccountNumber = GetAccountNumber(items[4]), Title = GetStr(items[3]), Details = GetStr(items[6]), TransactionNumber = items[7], Amount = ParseTools.ParseDecimal(items[8]), Currency = items[9], BlockAmount = ParseTools.ParseDecimal(items[10]), Currency2 = items[11], CurrencyAmount = ParseTools.ParseDecimal(items[12]), Currency3 = items[13], AccountName = items[14] }; return(transaction); }
TransactionItem GetFromLine(string line) { if (line.IsNull()) { return(null); } string[] splited = line.Split(';'); TransactionItem item = new TransactionItem() { DataOperacji = GetDate(splited[0]), Typ = ParseTools.ParseInt(splited[1]), Tytul = splited[2], Kwota = ParseTools.ParseDecimal(splited[3]), Notatka = splited[4], PodKategoria = splited[5], Kategoria = splited[6], NazwaKonta = splited[7] }; return(item); }