Beispiel #1
0
        private void CargaGrilla()
        {
            int    idCarta   = ddlCarta.SelectedValue != "S" ? Convert.ToInt32(ddlCarta.SelectedValue) : 0;
            int    idTipo    = ddlTipo.SelectedValue != "S" ? Convert.ToInt32(ddlTipo.SelectedValue) : 0;
            int    idSubTipo = this.ddlSubTipo.SelectedValue != "S" ? Convert.ToInt32(ddlSubTipo.SelectedValue) : 0;
            double?precio    = null;

            precio        = txtPrecio.Text != "" ? Convert.ToDouble(txtPrecio.Text):precio;
            gv.DataSource = ProductoController.GetCondetalleConCarta(idCarta, idTipo, idSubTipo, precio, txtDescri.Text);
            gv.DataBind();
            this.divPrueba.Visible = false;
        }
Beispiel #2
0
        private void CargaGrilla()
        {
            //   int idCarta = ddlCarta.SelectedValue != "S" ? Convert.ToInt32(ddlCarta.SelectedValue) : 0;
            int idTipo    = ddlTipo.SelectedValue != "S" ? Convert.ToInt32(ddlTipo.SelectedValue) : 0;
            int idSubTipo = this.ddlSubTipo.SelectedValue != "S" ? Convert.ToInt32(ddlSubTipo.SelectedValue) : 0;


            if (ViewState["SortDirection"].ToString() == "desc")
            {
                gv.DataSource = ProductoController.GetCondetalleConCarta(0, idTipo, idSubTipo, null).OrderByDescending(s => s.idCarta).ToList();
            }
            else
            {
                gv.DataSource = ProductoController.GetCondetalleConCarta(0, idTipo, idSubTipo, null).OrderBy(s => s.idCarta).ToList();
                ViewState["SortDirection"] = "asc";
            }

            gv.DataBind();
            divPrueba.Visible = false;
        }