Esempio n. 1
0
        protected void btnConsultar_Click(object sender, EventArgs e)
        {
            string sDocumento;

            sDocumento = txtDocumento.Text;

            clsCliente oCliente = new clsCliente();

            oCliente.Documento = sDocumento;

            if (oCliente.Consultar())
            {
                txtNombre.Text          = oCliente.Nombre;
                txtPrimerApellido.Text  = oCliente.PrimerApellido;
                txtSegundoApellido.Text = oCliente.SegundoApellido;
                txtTelefono.Text        = oCliente.Telefono;
                txtEmail.Text           = oCliente.Email;
                lblError.Text           = "";
            }
            else
            {
                lblError.Text           = oCliente.Error;
                txtNombre.Text          = "";
                txtPrimerApellido.Text  = "";
                txtSegundoApellido.Text = "";
                txtTelefono.Text        = "";
                txtEmail.Text           = "";
            }
            oCliente = null;
        }
        protected void btnConsultar_Click(object sender, ImageClickEventArgs e)
        {
            string strDocumento = txtCliente.Text;

            clsCliente oCliente = new clsCliente();

            oCliente.Documento = strDocumento;

            if (oCliente.Consultar())
            {
                lblCliente.Text              = oCliente.NombreCompleto;
                lblCliente.Visible           = true;
                this.txtDescripcion.Visible  = true;
                this.ocultar.Visible         = true;
                this.txtFechaIngreso.Visible = true;
                this.txtFechaSalida.Visible  = true;
                cboCabaña.Visible            = true;
                cboEmpleado.Visible          = true;
                cboPromocion.Visible         = true;
                lblError.Text      = "";
                grdDetalle.Visible = true;
                LlenarGridFactura();
            }
            else
            {
                lblError.Text                = oCliente.Error;
                lblCliente.Text              = "";
                this.txtDescripcion.Visible  = false;
                this.txtFechaIngreso.Visible = false;
                this.txtFechaSalida.Visible  = false;
                cboCabaña.Visible            = false;
                cboEmpleado.Visible          = false;
                cboPromocion.Visible         = false;
                this.ocultar.Visible         = false;
            }
        }