public override ScannedFiles GetFiles() { FileYetToProcessDbManager dbManager = new FileYetToProcessDbManager(); dbManager.DatabaseType = DatabaseType; return(dbManager.Get(2)); }
/// <summary> /// <b>Description:</b> /// Accepts file system as parameter, this will save file information to database /// of only file which was failed to delete. Since, saving could be to different /// table other than next iteration or deleted files, this will help to build /// report for those files where were failed to delete. /// </summary> /// <param name="file"></param> public override bool SaveFile(ScannedFile file) { FileYetToProcessDbManager dbManager = new FileYetToProcessDbManager(); dbManager.DatabaseType = DatabaseType; dbManager.SaveToCSVFile = SaveToCSVFile; dbManager.Save(file, 2); return(true); }
protected override void SaveToSQLDb(ScannedFile file) { FilesDeletedTableAdapter filesDeletedTableAdapter = new FilesDeletedTableAdapter(); ApplicationSettings appSettings = new ApplicationSettings(); filesDeletedTableAdapter.Connection.ConnectionString = appSettings.getDbConnectionString(); filesDeletedTableAdapter.Insert(file.Filename, file.Filepath, DateTime.Now, String.Empty, "SYSTEM", file.LastAccessTime, file.LastWriteTime, file.Filesize); if (file.doUpdateRequireOnRescan) { FileYetToProcessDbManager yetToProcess = new FileYetToProcessDbManager(); yetToProcess.Update(file, 0, "deleted on " + DateTime.Now.ToString()); } }