added function to find if drive is going to be compressed
This commit is contained in:
parent
4188d512ef
commit
c526fd3268
1 changed files with 17 additions and 0 deletions
|
@ -151,6 +151,23 @@ namespace Saviour_Backup_System
|
|||
return hash;
|
||||
}
|
||||
|
||||
public static bool isCompression(string id)
|
||||
{
|
||||
conn.Open();
|
||||
bool compression = false;
|
||||
cmd.CommandText = "SELECT Compression FROM Recordset WHERE Drive_ID Like ?;";
|
||||
cmd.Parameters.Add(new SqlCeParameter("Drive ID", SqlDbType.NText));
|
||||
cmd.Parameters["Drive ID"].Value = id;
|
||||
SqlCeDataReader reader = cmd.ExecuteReader();
|
||||
while (reader.Read()) {
|
||||
compression = reader.GetBoolean(0);
|
||||
}
|
||||
cmd.Parameters.Clear();
|
||||
reader.Close();
|
||||
conn.Close();
|
||||
return compression;
|
||||
}
|
||||
|
||||
public static DataTable getAllDriveBackups()
|
||||
{
|
||||
DataTable table = new DataTable();
|
||||
|
|
Reference in a new issue