コード例 #1
0
ファイル: ParseCcStmt.cs プロジェクト: rrix/ledger-pkg
        public static int Main(string[] args)
        {
            StreamReader reader    = new StreamReader(args[0]);
            string       firstLine = reader.ReadLine();

            string CardAccount = args[1];
            string BankAccount = args[2];

            IStatementConverter converter;

            if (firstLine.StartsWith("POSTING DATE"))
            {
                converter = new ConvertGoldMasterCardStatement();
            }
            else
            {
                converter = new ConvertMastercardStatement();
            }

            reader = new StreamReader(args[0]);
            List <Posting> posts = converter.ConvertRecords(reader.BaseStream);

            PrintPostings printer = new PrintPostings();

            printer.Print(CardAccount, BankAccount, posts);

            return(0);
        }
コード例 #2
0
ファイル: ParseCcStmt.cs プロジェクト: gpoul/ledger
    public static int Main(string[] args)
    {
      StreamReader reader = new StreamReader(args[0]);
      string firstLine = reader.ReadLine();

      string CardAccount = args[1];
      string BankAccount = args[2];

      IStatementConverter converter;

      if (firstLine.StartsWith("POSTING DATE")) {
	converter = new ConvertGoldMasterCardStatement();
      } else {
	converter = new ConvertMastercardStatement();
      }

      reader = new StreamReader(args[0]);
      List<Posting> posts = converter.ConvertRecords(reader.BaseStream);

      PrintPostings printer = new PrintPostings();
      printer.Print(CardAccount, BankAccount, posts);

      return 0;
    }