This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user