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

@@ -241,7 +241,6 @@
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<asp:LinkButton ID="LnkCargarZip" CssClass="btn btn-success" OnClick="LnkCargarZip_Click" runat="server">Procesar</asp:LinkButton>
</div> </div>
</div> </div>
</div> </div>
@@ -249,6 +248,10 @@
<div> <div>
<asp:TextBox ID="Anexoxmlpdf" CssClass="ADSdropzone hidden" data-maxfilesize="500" data-maxFile="1" Text="" runat="server"></asp:TextBox> <asp:TextBox ID="Anexoxmlpdf" CssClass="ADSdropzone hidden" data-maxfilesize="500" data-maxFile="1" Text="" runat="server"></asp:TextBox>
</div> </div>
<div class="text-center">
<asp:LinkButton ID="LnkCargarZip" CssClass="btn btn-success" OnClick="LnkCargarZip_Click" runat="server">Procesar</asp:LinkButton>
</div>
</div> </div>
</div> </div>
<div class="portlet light smmallpadding bordered guardardiv"> <div class="portlet light smmallpadding bordered guardardiv">
@@ -262,7 +265,6 @@
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<asp:LinkButton ID="LnkProcesarDoctos" CssClass="btn btn-success" OnClick="LnkProcesarDoctos_Click" runat="server">Guardar</asp:LinkButton>
</div> </div>
</div> </div>
</div> </div>
@@ -438,6 +440,9 @@
</ajax:TabPanel> </ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
<div class="text-center">
<asp:LinkButton ID="LnkProcesarDoctos" CssClass="btn btn-success" OnClick="LnkProcesarDoctos_Click" runat="server">Guardar</asp:LinkButton>
</div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>

View File

@@ -383,11 +383,15 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
GvPeriodo.DataBind(); GvPeriodo.DataBind();
} }
} }
Upxmlpdf.Update();
} }
} }
protected void LnkProcesarDoctos_Click(object sender, EventArgs e) protected void LnkProcesarDoctos_Click(object sender, EventArgs e)
{ {
procesararchivo(xmlobject, string.Format("{0}{1}", anio, mes).ToEntero(), true);
procesararchivo(xmlobject, string.Format("{0}{1}", anio, mes).ToEntero(), false);
} }
protected void GVmaterialidadDoctos_RowDataBound(object sender, GridViewRowEventArgs e) protected void GVmaterialidadDoctos_RowDataBound(object sender, GridViewRowEventArgs e)
{ {
@@ -413,11 +417,12 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
e.Row.CssClass = "danger"; e.Row.CssClass = "danger";
toolTip = string.Format("{0}{1}No se encontro el personal", toolTip, (toolTip.Length > 0 ? " " : "")); toolTip = string.Format("{0}{1}No se encontro el personal", toolTip, (toolTip.Length > 0 ? " " : ""));
} }
/*
if (CvePeriodo <= 0) if (CvePeriodo <= 0)
{ {
e.Row.CssClass = "danger"; e.Row.CssClass = "danger";
toolTip = string.Format("{0}{1}No se encontro el periodo", toolTip, (toolTip.Length > 0 ? " " : "")); toolTip = string.Format("{0}{1}No se encontro el periodo", toolTip, (toolTip.Length > 0 ? " " : ""));
} }*/
e.Row.ToolTip = toolTip; e.Row.ToolTip = toolTip;
} }

View File

@@ -92,16 +92,49 @@
<asp:Label ID="lblnombreCompleto" runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label> <asp:Label ID="lblnombreCompleto" runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="XML"> <asp:TemplateField HeaderText="XML" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lbldocsXML" runat="server" Text='<%# Eval("docsXML")%>'> </asp:Label> <asp:Label ID="lbldocsXML" runat="server" Text='<%# Eval("docsXML")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="PDF"> <asp:TemplateField HeaderText="PDF" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lbldocsPDF" runat="server" Text='<%# Eval("docsPDF")%>'> </asp:Label> <asp:Label ID="lbldocsPDF" runat="server" Text='<%# Eval("docsPDF")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
<asp:BoundField Visible="false" ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using System.Web.UI; 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) 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]; 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(); GVData.DataBind();
} }