Exemplo n.º 1
0
        private void FrmDatosClientes_Load(object sender, EventArgs e)
        {
            ObjConsul = new Consultas();
            try
            {
                if (comprobarvista == 1)
                {
                    lbltitulo.Text = "Consulta de Datos.";
                    //gbDatosCliente.Visible = false;
                    gbBuscar.Visible = true;

                    ObjConsul.BoolCrearDateTableConsultaCliente(dgvDatosUsuario, "Select tbCliente.IDENTIFICACION, tbCliente.NOMBRES, tbCliente.APELLIDOS, tbCliente.EMAIL,TbCliente.RAZONSOCIAL,tbcliente.DIRECCION,tbCliente.IDCLIENTE from tbCliente;");
                    dgvDatosUsuario.Columns[4].Visible = false;
                    dgvDatosUsuario.Columns[5].Visible = false;
                    dgvDatosUsuario.Columns[6].Visible = false;
                    //this.Size = new Size(804, 540);
                    lbltitulo.Left = (this.Width - lbltitulo.Width) / 2;
                    TxtConsulta.Focus();
                    btnSalir.Enabled = true;
                    verificar        = true;
                }
                else
                {
                    gbBuscar.Visible = false;
                    //ObjConsul.BoolLlenarComboBox(cbPais, "Select TbPais.IDPAIS as ID, TbPais.NOMBRE AS Texto from TbPais");
                    //gbDatosCliente.Visible = true;
                    //gbDatosCliente.Location = new Point(35, 60);
                    this.Size      = new Size(550, 620);
                    lbltitulo.Left = (this.Width - lbltitulo.Width) / 2;
                    //txtIdentificacion.Focus();
                    btnSalir.Enabled = false;
                    verificar        = false;
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 2
0
        //private bool verificartelefonos()
        //{
        //if (txtTelefono.Text!="" && txtCell.Text!="")
        //{
        //    return true;
        //}
        //else
        //{
        //    if (txtCell.Text!="")
        //    {
        //        return true;
        //    }
        //    else
        //    {
        //        if (txtTelefono.Text!="")
        //        {
        //            return true;
        //        }
        //        else
        //        {
        //            txtTelefono.Focus();
        //            return false;
        //        }
        //    }
        //}
        //}

        private void TxtConsulta_TextChanged(object sender, EventArgs e)
        {
            //List<string> ListaClientes = ObjConsul.DatosCliente(TxtConsulta.Text);
            ObjConsul = new Consultas();
            ObjConsul.BoolCrearDateTableConsultaCliente(dgvDatosUsuario, "Select tbCliente.IDENTIFICACION, tbCliente.NOMBRES, tbCliente.APELLIDOS, tbCliente.EMAIL, tbCliente.RAZONSOCIAL, tbCliente.DIRECCION,tbCliente.IDCLIENTE from tbCliente where IDENTIFICACION like '%" + TxtConsulta.Text + "%' or NOMBRES like '%" + TxtConsulta.Text + "%' or APELLIDOS like '%" + TxtConsulta.Text + "%';");
        }