/// <summary> /// Delete the specified aircraft from the LogBook. /// </summary> /// <param name='aircraft'> /// The aircraft to delete from the LogBook. /// </param> public static bool Delete(Aircraft aircraft) { if (!CanDelete(aircraft)) { return(false); } PhotoManager.Delete(aircraft.TailNumber); return(sqlitedb.Delete <Aircraft> (aircraft) > 0); }
/// <summary> /// Delete the specified aircraft from the LogBook. /// </summary> /// <param name="aircraft">The aircraft to delete from the LogBook.</param> public static bool Delete(Aircraft aircraft) { if (!CanDelete(aircraft)) { return(false); } if (sqlitedb.Delete <Aircraft> (aircraft.Id) > 0) { PhotoManager.Delete(aircraft.TailNumber); OnAircraftDeleted(aircraft); return(true); } return(false); }