コード例 #1
0
        public void modifier()
        {
            LocationEntities context = new LocationEntities();
            Client           clt     = context.Client.Find(labelid.Text);

            clt.Nom = textNom.Text;
            context.SaveChanges();
        }
コード例 #2
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();*/
        }