示例#1
0
        private void PopulateInvoices(FileInfo[] invoices)
        {
            List <IInvoice> output = new List <IInvoice>();

            foreach (FileInfo file in invoices)
            {
                output.Add(AnalyserTools.GetInvoiceModel(file));
            }
            _invoices = output.ToArray();
        }
示例#2
0
        public void OrganiseFiles()
        {
            var irt = InvoiceRenamingTargets();

            CreateInvoiceDirectory();
            foreach (FileInfo invoice in irt)
            {
                var date    = AnalyserTools.GetDate(invoice);
                var TaxYear = AnalyserTools.IdentifyTaxYear(date);

                WorkingInvoiceDirectory.CreateSubdirectory(TaxYear);

                MoveFile(invoice, date, TaxYear, 0);
            }
        }