public void LoadClients(Base.Controls.CustomListView objCustomListView,string strSearch) { DataSet objDataSet = new DataSet(); string strInfosClient = ""; Cursor.Current = Cursors.WaitCursor; objCustomListView.Template = (int)Classes.clsProperties.TemplateListView.Clients; objCustomListView.BeginUpdate(); if (strSearch == string.Empty) objDataSet = clsData.GetAllClients(); else objDataSet = clsData.GetAllClientsBySearch(strSearch); if (clsData.IsEnregInDataSet(objDataSet)) { foreach (DataRow objRow in objDataSet.Tables["Table"].Rows) { strInfosClient = this.GetInfosClient(objRow["STR_RAISON_SOCIALE_CLIENT"].ToString(),objRow["STR_NOM_CLIENT"].ToString(),objRow["STR_PRENOM_CLIENT"].ToString()); objCustomListView.InsertNewLine(this.InitItemClient(int.Parse(objRow["INT_ID_CLIENT"].ToString()), strInfosClient, objRow["STR_TELEPHONE_CLIENT"].ToString(), objRow["STR_CODE_POSTAL_CLIENT"].ToString(), objRow["STR_VILLE_CLIENT"].ToString())); } } objCustomListView.EndUpdate(); Cursor.Current = Cursors.Default; objDataSet = null; }