1
Fork 0

added function to find if drive is going to be compressed

This commit is contained in:
Jake Howard 2015-01-04 14:35:19 +00:00
parent 4188d512ef
commit c526fd3268

View file

@ -151,6 +151,23 @@ namespace Saviour_Backup_System
return hash; 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() public static DataTable getAllDriveBackups()
{ {
DataTable table = new DataTable(); DataTable table = new DataTable();