Example #1
0
        public List <string> GetAllImagesGUID()
        {
            string        sql          = "Select LockedFileName From tblFiles";
            dbController  db           = new dbController();
            DataTable     FileNamesTbl = db.getQueryList(sql);
            List <string> files        = new List <string>();

            foreach (DataRow row in FileNamesTbl.Rows)
            {
                files.Add(row["LockedFileName"].ToString());
            }

            return(files);
        }
Example #2
0
        public static void DeleteOldFiles()
        {
            dbController   db    = new dbController();
            string         sql   = "Select LockedFileName From tblFiles Where Status = 0";
            DataTable      tbl   = db.getQueryList(sql);
            FileController fileC = new FileController();

            foreach (DataRow row in tbl.Rows)
            {
                string FilePathToDelete = fileC.VaultFolderPath() + row["LockedFileName"].ToString();
                File.Delete(FilePathToDelete);
            }

            sql = "Delete From tblFiles Where Status = 0";
            db.getQueryScaller(sql);
        }