public void Delete(bool DeleteFile)
{
if (this.ID != "")
{
db.ExecuteCommand("delete from images where img_id = " + this.ID);
if (DeleteFile)
{
try
{
if (System.IO.File.Exists(db.DataDirectory + this.Path))
{
System.IO.File.Delete(db.DataDirectory + this.Path);
}
}
catch (Exception E) { }
}
}
}