Ejemplo n.º 1
0
        private void SeleccionarCliente()
        {
            if (dgvCliente.CurrentRow != null)
            {
                try
                {
                    cliente = new PERt02_cliente()
                    {
                        id_cliente     = long.Parse(dgvCliente.Rows[dgvCliente.CurrentRow.Index].Cells["ID"].Value.ToString()),
                        cod_cliente    = dgvCliente.Rows[dgvCliente.CurrentRow.Index].Cells["CODIGO"].Value.ToString(),
                        txt_pri_nom    = dgvCliente.Rows[dgvCliente.CurrentRow.Index].Cells["CLIENTE"].Value.ToString(),
                        nro_doc        = dgvCliente.Rows[dgvCliente.CurrentRow.Index].Cells["NRO_DOC"].Value.ToString(),
                        nro_ruc        = dgvCliente.Rows[dgvCliente.CurrentRow.Index].Cells["RUC"].Value.ToString(),
                        txt_direccion1 = dgvCliente.Rows[dgvCliente.CurrentRow.Index].Cells["DIREC1"].Value.ToString(),
                        txt_direccion2 = dgvCliente.Rows[dgvCliente.CurrentRow.Index].Cells["DIREC2"].Value.ToString()
                    };
                    codTipoSujeto = cboTipoSujeto.SelectedValue?.ToString();

                    Hide();
                    Close();
                }
                catch (Exception e)
                {
                    MessageBox.Show("Excepción al seleccionar el cliente. EXC: " + e.Message, "Mensaje Eagle");
                }
            }
        }
Ejemplo n.º 2
0
 private void SetCliente(PERt02_cliente cliente, string codTipoSujeto)
 {
     idCliente             = cliente.id_cliente;
     this.codTipoSujeto    = codTipoSujeto;
     txtNombreCliente.Text = cliente.txt_pri_nom;
     txtNroDoc.Text        = cliente.nro_doc;
     txtRuc.Text           = cliente.nro_ruc;
     txtDirec.Text         = PersonHelper.GetDireccion(cliente.txt_direccion1, cliente.txt_direccion2);
 }