protected void dgvDatos_PageIndexChanging(object sender, GridViewPageEventArgs e) { Site1 oMaster = (Site1)this.Master; System.Web.UI.WebControls.SortDirection oDireccion = (System.Web.UI.WebControls.SortDirection)ViewState["direccionsorting"]; var result = (IQueryable<MedDAL.DAL.tipos>)Session["resultadoquery"]; DataTable dt = MedNeg.Utilidades.DataSetLinqOperators.CopyToDataTable(result); DataView dv = new DataView(dt); dgvDatos.DataSource = oMaster.Paging(e, ViewState["sortexpression"] == null ? "Nombre" : ViewState["sortexpression"].ToString(), dv, ref dgvDatos, ref oDireccion); ViewState["direccionsorting"] = oDireccion; dgvDatos.DataBind(); }
protected void grvInvFsArticulos_PageIndexChanging(object sender, GridViewPageEventArgs e) { Site1 oMaster = (Site1)this.Master; System.Web.UI.WebControls.SortDirection oDireccion = (System.Web.UI.WebControls.SortDirection)ViewState["direccionsorting"]; var result = (IQueryable <MedNeg.Inventarios.Producto>)Session["resultadoquery2"]; DataTable dt = MedNeg.Utilidades.DataSetLinqOperators.CopyToDataTable(result); DataView dv = new DataView(dt); grvInvFsArticulos.DataSource = oMaster.Paging(e, "codigo", dv, ref grvInvFsArticulos, ref oDireccion); ViewState["direccionsorting"] = oDireccion; grvInvFsArticulos.DataBind(); }