Exemple #1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            if (txtDni.Text != "")
            {
                List <Usuario> dniLocal = negocioUS.BuscarDni(Convert.ToInt32(txtDni.Text));

                if (dniLocal.Count > 0)
                {
                    txtNombre.Text        = dniLocal[0].Nombre;
                    txtApellido.Text      = dniLocal[0].Apellido;
                    txtEmail.Text         = dniLocal[0].Email;
                    txtDireccion.Text     = dniLocal[0].Direccion;
                    txtCP.Text            = dniLocal[0].Codigo_Postal;
                    txtCiudad.Text        = dniLocal[0].Ciudad;
                    IDlab.Text            = dniLocal[0].Id.ToString();
                    Session["encontrado"] = true;
                }
            }
        }