public void modifier()
        {
            LocationEntities context = new LocationEntities();
            Client           clt     = context.Client.Find(labelid.Text);

            clt.Nom = textNom.Text;
            context.SaveChanges();
        }
Exemple #2
0
        private void btnDelete_Click_1(object sender, RoutedEventArgs e)
        {
            int    empId    = (dtclient.SelectedItem as Client).ID;
            Client employee = (from r in objEntities.Client where r.ID == empId select r).SingleOrDefault();

            objEntities.Client.Remove(employee);
            objEntities.SaveChanges();
            dtclient.ItemsSource = objEntities.Client.ToList();
        }
Exemple #3
0
        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();*/
        }