Ejemplo n.º 1
0
        protected void GrvActasSorting(object sender, GridViewSortEventArgs e)
        {
            var dt = HttpContext.Current.Session["dtActas"] as DataTable;

            if (dt != null)
            {
                dt.DefaultView.Sort = e.SortExpression + " " + GetSortDirection(e.SortExpression);
                GrvActas.DataSource = HttpContext.Current.Session["dtActas"];
                GrvActas.DataBind();
            }
        }
Ejemplo n.º 2
0
        protected void GrvActasPageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            var dt = HttpContext.Current.Session["dtActas"] as DataTable;

            if (dt != null)
            {
                GrvActas.PageIndex  = e.NewPageIndex;
                GrvActas.DataSource = dt;
                GrvActas.DataBind();
            }
        }
Ejemplo n.º 3
0
        // Method Cargues

        private void CargarActas()
        {
            DataTable tabla_sql   = new DataTable();
            String    sqlConsulta = "";

            try
            {
                //Consulta.
                sqlConsulta = " SELECT E.Id_Acta ,E.NumActa ,E.NomActa ,c.NomConvocatoria ,e.publicado " +
                              " FROM evaluacionacta e JOIN convocatoria c ON  id_convocatoria = codconvocatoria " +
                              " ORDER BY NumActa ";

                //Asignar resultados a variable DataTable.
                tabla_sql = consultas.ObtenerDataTable(sqlConsulta, "text");
                HttpContext.Current.Session["dtActas"] = tabla_sql;
                GrvActas.DataSource = tabla_sql;
                GrvActas.DataBind();
            }
            catch { }
        }