This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-12-22 20:41:01 -07:00
parent c552e42836
commit 00b4e9f602
4 changed files with 70 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
@@ -56,6 +57,25 @@ public partial class Documentacion_TableroMaterialidadDetalle : ClsPaginas
if (edoc.TableroMaterialidadDetalleGET(UsuarioActual.CveEmpresa, (anio = Txtanio.Text.ToEntero()), (mes = ddlMes.SelectedValue.ToEntero()), CveCliente) && edoc.DSResultados.Tables.Count > 0)
{
GVData.DataSource = edoc.DSResultados.Tables[0];
int CurrentColumn = 4;
BoundField bf;
foreach (DataRow item in edoc.DSResultados.Tables[1].Rows)
{
GVData.Columns[CurrentColumn].Visible = true;
bf = (BoundField)GVData.Columns[CurrentColumn];
bf.DataField = string.Format("V_{0}", item["CvePeriodo"]);
bf.HeaderText = string.Format("({0:dd/MM/yyyy}-{1:dd/MM/yyyy})", item["FechaInicio"], item["FechaFin"]);
bf.Visible = true;
//Alert(string.Format("{0}-{1}", item["FechaInicio"], item["FechaFin"]));
CurrentColumn = CurrentColumn + 1;
}
for (int i = CurrentColumn; i < GVData.Columns.Count; i++)
{
GVData.Columns[i].Visible = false;
bf = (BoundField)GVData.Columns[i];
bf.DataField = "";
bf.HeaderText = "";
}
GVData.DataBind();
}