private void btnBuscar_Click(object sender, EventArgs e)
        {
            frmConsultarCliente f = new frmConsultarCliente();
            f.ShowDialog();
            oCliente = f.e;
            txtIdentificacion.Text = Convert.ToString(oCliente.Identificacion);
            cbxTipoPersona.SelectedItem = oDatCliente.getDescripcionSegunIdTipoPersona(oCliente.IdTipoPersona);
            txtNombre.Text = oCliente.Nombre;
            txtApellido.Text = oCliente.Apellido;
            cbxFechaNacimiento.Text = Convert.ToString(oCliente.FechaNacimiento);
            cbxGenero.SelectedItem = oCliente.Genero;
            cbxTipoIdentificacion.SelectedItem = oDatCliente.getDescripcionSegunIdTipoIdentificacion(oCliente.TipoIdentificacion);
            txtDireccion.Text = oCliente.Direccion;
            txtTelefono.Text = Convert.ToString(oCliente.Telefono);
            txtMail.Text = Convert.ToString(oCliente.Mail);

            if (oCliente.idEstado == 1)
            {
                cbxEstado.SelectedItem = "Activa";
            }
            else
            {
                cbxEstado.SelectedItem = "Inactiva";
            }

            oCliente.idEmpresa = 1;
        }
Example #2
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            frmConsultarCliente f = new frmConsultarCliente();

            f.ShowDialog();
            oCliente = f.e;
            txtIdentificacion.Text      = Convert.ToString(oCliente.Identificacion);
            cbxTipoPersona.SelectedItem = oDatCliente.getDescripcionSegunIdTipoPersona(oCliente.IdTipoPersona);
            txtNombre.Text                     = oCliente.Nombre;
            txtApellido.Text                   = oCliente.Apellido;
            cbxFechaNacimiento.Text            = Convert.ToString(oCliente.FechaNacimiento);
            cbxGenero.SelectedItem             = oCliente.Genero;
            cbxTipoIdentificacion.SelectedItem = oDatCliente.getDescripcionSegunIdTipoIdentificacion(oCliente.TipoIdentificacion);
            txtDireccion.Text                  = oCliente.Direccion;
            txtTelefono.Text                   = Convert.ToString(oCliente.Telefono);
            txtMail.Text = Convert.ToString(oCliente.Mail);

            if (oCliente.idEstado == 1)
            {
                cbxEstado.SelectedItem = "Activa";
            }
            else
            {
                cbxEstado.SelectedItem = "Inactiva";
            }

            oCliente.idEmpresa = 1;
        }
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            frmConsultarCliente f = new frmConsultarCliente();
            f.ShowDialog();
            oCliente = f.e;

            if (oCliente.IdPersona == 0)
            {
                borrar();
            }
            else
            {
                txtCodigo.Text = Convert.ToString(oCliente.IdPersona);
                txtIdentificacion.Text = oCliente.Identificacion;
                cbxTipoPersona.EditValue = oDatCliente.getDescripcionSegunIdTipoPersona(oCliente.IdTipoPersona);
                txtNombre.Text = oCliente.Nombre;
                txtApellido.Text = oCliente.Apellido;
                cbxFechaNacimiento.Text = Convert.ToString(oCliente.FechaNacimiento.ToShortDateString());
                cbxGenero.SelectedItem = oCliente.Genero;
                cbxTipoIdentificacion.EditValue = oDatCliente.getDescripcionSegunIdTipoIdentificacion(oCliente.TipoIdentificacion);
                txtDireccion.Text = oCliente.Direccion;
                txtTelefono.Text = oCliente.Telefono;
                txtMail.Text = Convert.ToString(oCliente.Mail);

                if (oCliente.idEstado == 1)
                {
                    cbxEstado.SelectedItem = "Activo";
                }
                else if (oCliente.idEstado == 2)
                {
                    cbxEstado.SelectedItem = "Inactivo";
                }

                oCliente.idEmpresa = 1;

                btnGuardar.Enabled = false;
                btnModificar.Enabled = true;
                btnEliminar.Enabled = true;
            }
        }
 private void btnBuscarCliente_Click(object sender, EventArgs e)
 {
     frmConsultarCliente f = new frmConsultarCliente();
     f.ShowDialog();
     oCliente = f.e;
     txtPropietario.Text = oCliente.Nombre+" "+oCliente.Apellido;
 }