Exemplo n.º 1
0
        protected void BuscarButton_Click(object sender, EventArgs e)
        {
            DbVentana cone  = new DbVentana();
            Usuario   usu   = new Usuario();
            DataTable dt    = new DataTable();
            string    Text  = "";
            string    orden = "";

            if (string.IsNullOrWhiteSpace(BuscarTextBox.Text) && UsuarioDropDownList.Text != "Todos los Usuarios")
            {
                Utilitarios.ShowToastr(this, "Error Campo Incorrecto", "Mensaje", "error");
            }
            else
            {
                if (UsuarioDropDownList.Text == "Nombre")
                {
                    Text  = "Where Nombre = ";
                    orden = BuscarTextBox.Text;
                }
                else if (UsuarioDropDownList.Text == "Todos los Usuarios")
                {
                    Text  = "--";
                    orden = "--";
                }
                else if (UsuarioDropDownList.Text == "Nombre de Usuario")
                {
                    Text  = " where UserName = "******"Id")
                {
                    Text  = " where UsuariosId = ";
                    orden = BuscarTextBox.Text;
                }

                DataSet ds = cone.GetData(usu.Listado("*", Text, orden));

                Repeater.DataSource = ds;
                Repeater.DataBind();
                // UsuarioImagen.Visible = false;
            }
        }