예제 #1
0
        private void btnBuscarCliente_Click(object sender, EventArgs e)
        {
            string numero  = txtNroDoc.Text;
            int    tipoDoc = (int)(cmbTipoDoc.SelectedValue);

            Cliente cli = new Cliente();

            cli = AD_VariosXFede.ObtenerIdClienteXDocumento(numero, tipoDoc);

            txtNombre.Text   = cli.NombreCliente;
            txtApellido.Text = cli.ApellidoCliente;
        }
예제 #2
0
        private void grdClientes_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int indice = e.RowIndex;

            if (indice >= 0)
            {
                btnActualizar.Enabled     = true;
                btnEliminar.Enabled       = true;
                btnAgregarCliente.Enabled = false;
                cmbTipoDoc.Enabled        = false;
                txtNroDoc.Enabled         = false;


                DataGridViewRow filaSeleccionada = grdClientes.Rows[indice];
                string          nroDoc           = filaSeleccionada.Cells["nroDoc"].Value.ToString();
                int             tipoDoc          = int.Parse(filaSeleccionada.Cells["tipoDoc"].Value.ToString());

                Cliente c = AD_VariosXFede.ObtenerIdClienteXDocumento(nroDoc, tipoDoc);

                LimpiarCampos();
                CargarCampos(c);
            }
        }