コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Listas = VentasBLL.ListarTodo();

                GridViewConsultaVenta.DataSource = Listas;
                GridViewConsultaVenta.DataBind();
            }
        }
コード例 #2
0
        private void BuscarSelecCombo()
        {
            Listas = null;

            if (DropDownListFiltro.SelectedIndex == 0)
            {
                Listas = VentasBLL.ListarTodo();
            }
            else if (DropDownListFiltro.SelectedIndex == 1)
            {
                if (TextBox1.Text == "")
                {
                    base.Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Debe de Insertar la descripcion');</script>");
                }
                else
                {
                    int Busqueda = Utilidades.TOINT(TextBox1.Text);
                    Listas = VentasBLL.GetListaVentaId(Busqueda);
                }
                GridViewConsultaVenta.DataSource = Listas;
                GridViewConsultaVenta.DataBind();
            }
            else if (DropDownListFiltro.SelectedIndex == 2)
            {
                if (TextBox1.Text == "")
                {
                    base.Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Debe de Insertar la descripcion');</script>");
                }
                else
                {
                    int Busqueda = Utilidades.TOINT(TextBox1.Text);
                    Listas = VentasBLL.GetListaVentaId(Busqueda);
                    GridViewConsultaVenta.DataSource = Listas;
                    GridViewConsultaVenta.DataBind();
                }
            }
        }