public SiteControl(CSitePermitido sitec) { InitializeComponent(); this.sitec = sitec; lblSite.Text = this.sitec.site; btnEditar.Tag = btnExcluir.Tag = this.sitec.site; }
public static bool DeletSite(CSitePermitido site) { using (SQLiteConnection conn = new SQLiteConnection(path)) { using (SQLiteCommand comm = new SQLiteCommand("DELETE FROM Sites WHERE Id_site = @Id_Site", conn)) { comm.Parameters.AddWithValue("@Id_Site", site.id_site); conn.Open(); if (comm.ExecuteNonQuery() != 0) { return(true); } return(false); } } }