private void Oui_Click(object sender, RoutedEventArgs e) { using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient()) { client.SupprimerBienImmobilier("3"); //objID.ToString() } this.Close(); }
protected void TaskGridView_RowDeleting(object sender, GridViewDeleteEventArgs e) { using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient()) { List <ServiceAgence.BienImmobilierBase> mList = (List <ServiceAgence.BienImmobilierBase>)Session["TaskTable"]; GridViewRow row = gvResultats.Rows[e.RowIndex]; ServiceAgence.BienImmobilierBase mBI = mList[row.DataItemIndex]; client.SupprimerBienImmobilier(mBI.Id.ToString()); mList.Remove(mBI); BindData(); } }
/// <summary> /// Supprime dans la base /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button_Delete(object sender, RoutedEventArgs e) { ServiceAgence.BienImmobilierBase SelectedBien = (ServiceAgence.BienImmobilierBase)listBox.SelectedItem; if (SelectedBien != null) { Console.WriteLine("Item select :" + SelectedBien.Id); using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient()) { client.Open(); client.SupprimerBienImmobilier(SelectedBien.Id.ToString()); client.Close(); } ListeBienImmo.Remove(selectedItem); } }
protected void gvDisplay_RowDeleting(object sender, GridViewDeleteEventArgs e) { GridViewRow r = gvDisplay.Rows[e.RowIndex]; Label id = (r.FindControl("lblId") as Label); using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient()) { client.Open(); client.SupprimerBienImmobilier(id.Text); client.Close(); } gvDisplay.EditIndex = -1; BindData(); }
private void Supression_click(object sender, RoutedEventArgs e) { if (((ServiceAgence.BienImmobilierBase)mListBox.SelectedItem) == null) { this.Bien = null; return; } int mId = ((ServiceAgence.BienImmobilierBase)mListBox.SelectedItem).Id; using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient()) { client.SupprimerBienImmobilier(mId.ToString()); int selected_index = mListBox.SelectedIndex; if (selected_index != -1) { liste.RemoveAt(selected_index); } } }
protected void DeleteBien(object sender, EventArgs e) { using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient()) { client.SupprimerBienImmobilier(Request.QueryString["id"]); } }
private void Supression_click(object sender, RoutedEventArgs e) { if (((ServiceAgence.BienImmobilierBase)mListBox.SelectedItem) == null) { this.Bien = null; return; } int mId = ((ServiceAgence.BienImmobilierBase)mListBox.SelectedItem).Id; using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient()) { client.SupprimerBienImmobilier(mId.ToString()); int selected_index = mListBox.SelectedIndex; if (selected_index != -1) liste.RemoveAt(selected_index); } }
protected void TaskGridView_RowDeleting(object sender, GridViewDeleteEventArgs e) { using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient()) { List<ServiceAgence.BienImmobilierBase> mList = (List<ServiceAgence.BienImmobilierBase>)Session["TaskTable"]; GridViewRow row = gvResultats.Rows[e.RowIndex]; ServiceAgence.BienImmobilierBase mBI = mList[row.DataItemIndex]; client.SupprimerBienImmobilier(mBI.Id.ToString()); mList.Remove(mBI); BindData(); } }