//*capadatos private void cmbCliente_SelectedIndexChanged(object sender, EventArgs e) { selectedC = (Cliente)cmbCliente.SelectedItem; lblTotal.Text = ""; actualizarDetalle(); }
private void listClientes_SelectedIndexChanged(object sender, EventArgs e) { var selectedItems = listClientes.SelectedItems; if (selectedItems.Count > 0) { selectedC = lc.ElementAt(selectedItems[0].Index); txtId.Text = selectedC.Id; txtNombre.Text = selectedC.Nombre; txtApellido.Text = selectedC.Apellido; txtEmail.Text = selectedC.Email; txtTelefono.Text = selectedC.Telefono; cmbEstado.Text = selectedC.Estado; cmbTipo.Text = selectedC.TipoCliente; txtMillas.Text = selectedC.Millas.ToString(); } }