private void BtnBuscarCliente_Click(object sender, EventArgs e) { if ((int)cbotipoId.SelectedValue == (int)Enums.TipoId.Fisica) { tbPersonasTribunalS cliente = clienteInst.GetClienteByIdTribunal(mskidentificacion.Text); if (cliente != null) { txtapellido1.Text = cliente.APELLIDO1.Trim(); txtapellido2.Text = cliente.APELLIDO2.Trim(); txtnombre.Text = cliente.NOMBRE.Trim(); if (int.Parse(cliente.SEXO.Trim()) == 1) { rbtmasc.Checked = true; } else { rbtfem.Checked = true; } cboProvincia.SelectedValue = cliente.CODIGOPOSTAL.Substring(0, 1); int canton = int.Parse(cliente.CODIGOPOSTAL.Substring(1, 2)); cboCanton.SelectedValue = canton.ToString().PadRight(2, ' '); cboCanton.Refresh(); int distrito = int.Parse(cliente.CODIGOPOSTAL.Substring(3, 3)); cboDistrito.SelectedValue = distrito.ToString().PadRight(2, ' ');; } } }
private void btnBuscarCliente_Click(object sender, EventArgs e) { if ((int)cboTipId.SelectedValue == (int)Enums.TipoId.Fisica) { tbPersonasTribunalS cliente = clienteInst.GetClienteByIdTribunal(mskId.Text); if (cliente != null) { txtApellido1.Text = cliente.APELLIDO1.Trim(); txtApellido2.Text = cliente.APELLIDO2.Trim(); txtNombre.Text = cliente.NOMBRE.Trim(); if (int.Parse(cliente.SEXO.Trim()) == 1) { rbtMasc.Checked = true; } else { rbtFem.Checked = true; } } } }