/// <summary> /// Llenar la grilla de documentos. /// </summary> private void ValidarGrupo() { if (usuario.CodGrupo == Constantes.CONST_Interventor) { } try { consultas.Parameters = null; consultas.Parameters = new[] { new SqlParameter { ParameterName = "@CodActividad", Value = CodActividad }, new SqlParameter { ParameterName = "@Mes", Value = Mes } }; var dtDocumentos = consultas.ObtenerDataTable("MD_Consultar_Documento"); HttpContext.Current.Session["dtDocumentos"] = dtDocumentos; GrvDocumentos.DataSource = dtDocumentos; GrvDocumentos.DataBind(); } catch (Exception ex) { throw new Exception(ex.Message); } }
protected void GrvDocumentosPageIndexChanging(object sender, GridViewPageEventArgs e) { CodNomina = Convert.ToString(HttpContext.Current.Session["CodNomina"] ?? "0"); Mes = Convert.ToInt32(HttpContext.Current.Session["MesDeLaNomina"] ?? 0); GrvDocumentos.PageIndex = e.NewPageIndex; GrvDocumentos.DataSource = HttpContext.Current.Session["dtDocumentos"]; GrvDocumentos.DataBind(); }
/// <summary> /// GRVs the documentos sorting. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="GridViewSortEventArgs"/> instance containing the event data.</param> protected void GrvDocumentosSorting(object sender, GridViewSortEventArgs e) { var dt = HttpContext.Current.Session["dtEmpresas"] as DataTable; if (dt != null) { dt.DefaultView.Sort = e.SortExpression + " " + GetSortDirection(e.SortExpression); GrvDocumentos.DataSource = HttpContext.Current.Session["dtDocumentos"]; GrvDocumentos.DataBind(); } }
protected void GrvDocumentosSorting(object sender, GridViewSortEventArgs e) { var dt = HttpContext.Current.Session["dtEmpresas"] as DataTable; if (dt != null) { CodNomina = Convert.ToString(HttpContext.Current.Session["CodNomina"] ?? "0"); Mes = Convert.ToInt32(HttpContext.Current.Session["MesDeLaNomina"] ?? 0); dt.DefaultView.Sort = e.SortExpression + " " + GetSortDirection(e.SortExpression); GrvDocumentos.DataSource = HttpContext.Current.Session["dtDocumentos"]; GrvDocumentos.DataBind(); } }
/// <summary> /// Llenar la grilla de documentos. /// </summary> private void ValidarGrupo() { if (usuario.CodGrupo == Constantes.CONST_Interventor) { } try { var txtSQl = "Select id_acta, NomActa, FechaActa, Fecha, url from ConvocatoriaActa Where CodConvocatoria = " + Session["IdConvocatoria"].ToString(); txtSQl += " And Borrado = 0"; var dt = consultas.ObtenerDataTable(txtSQl, "text"); HttpContext.Current.Session["dtDocumentos"] = dt; GrvDocumentos.DataSource = dt; GrvDocumentos.DataBind(); } catch (Exception ex) { throw new Exception(ex.Message); } }
/// <summary> /// PaginaciĆ³n de la grilla. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void GrvDocumentosPageIndexChanging(object sender, GridViewPageEventArgs e) { GrvDocumentos.PageIndex = e.NewPageIndex; GrvDocumentos.DataSource = HttpContext.Current.Session["dtDocumentos"]; GrvDocumentos.DataBind(); }