private void CargaClientes() { oEnsamble = new WCF_Ensamble.Hersan_EnsambleClient(); try { lstClientes.ValueMember = "Id"; lstClientes.DisplayMember = "Nombre"; lstClientes.DataSource = oEnsamble.ABC_ClientesAgente_Combo(0); } catch (Exception ex) { throw ex; } finally { oEnsamble = null; } }
private void cboAgentes_SelectedIndexChanged(object sender, EventArgs e) { oEnsamble = new WCF_Ensamble.Hersan_EnsambleClient(); try { if (cboAgentes.SelectedValue != null) { gvDatos.DataSource = null; oList = oEnsamble.ABC_ClientesAgente_Combo(int.Parse(cboAgentes.SelectedValue.ToString())); gvDatos.DataSource = oList; } } catch (Exception ex) { RadMessageBox.Show("Ocurrió un error al seleccionar el agente\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error); } finally { oEnsamble = null; } }