public void CreateClient(Base.Controls.CustomListView objCustomListView, string strSearch) { Clients.frmFicheClient frmNewClient = new Clients.frmFicheClient((int)Classes.clsProperties.TypeChargementFicheClient.Create, null); if (frmNewClient.ShowDialog() == DialogResult.OK) this.LoadClients(objCustomListView, strSearch); frmNewClient.Dispose(); }
public void UpdateClient(Base.Controls.CustomListView objCustomListView, string strSearch) { Clients.ObjetClient objClient = new Clients.ObjetClient(); Clients.ListViewItemClient objListViewItemClient = new Clients.ListViewItemClient(); if (objCustomListView.SelectedItems.Count > 0) { objListViewItemClient = (Clients.ListViewItemClient)objCustomListView.SelectedItems[0]; objClient.IdClient = objListViewItemClient.IdClient; Clients.frmFicheClient frmFicheClient = new Clients.frmFicheClient((int)Classes.clsProperties.TypeChargementFicheClient.Update, objClient); if (frmFicheClient.ShowDialog() == DialogResult.OK) this.LoadClients(objCustomListView, strSearch); frmFicheClient.Dispose(); } }