public LedgerManager AddDatabaseToLedger(LedgerRowModel rowModel)
 {
     LoadLedger();
     if (!_ledger.Contains(rowModel))
     {
         _ledger.Add(rowModel);
     }
     return(this);
 }
Esempio n. 2
0
        private void UpdateLedger()
        {
            FileInfo file           = new FileInfo(_localFullPath);
            var      settings       = SettingsLoader.LoadSettings();
            var      ledgerRowModel = new LedgerRowModel
            {
                UploadDateTime       = DateTime.Now,
                FileIdentifier       = FileIdGenerator.GetIdentifier(),
                FileName             = file.Name,
                LastDownloadDateTime = DateTime.MinValue,
                Username             = settings.FtpUsername
            };

            LedgerManager.GetManager().AddDatabaseToLedger(ledgerRowModel);
            LedgerManager.SaveLedger();
        }