public void modifier() { LocationEntities context = new LocationEntities(); Client clt = context.Client.Find(labelid.Text); clt.Nom = textNom.Text; context.SaveChanges(); }
public void supprimer(int idClient) { LocationEntities context = new LocationEntities(); Client clt = context.Client.Find(idClient); context.Client.Remove(clt); context.SaveChanges(); //this.mlDataGridView1.Rows.RemoveAt(this.mlDataGridView1.SelectedRows[0].Index); //ds.Tables("user").Rows.RemoveAt(DataGridView1.CurrentRow.Index) /* * dataGrid.Items.Clear(); * * dataGrid.Items.Refresh();*/ }