las columnas ahora se muestran con checkbox en el filtro

This commit is contained in:
Antonio Gonzalez
2020-11-17 16:13:01 -07:00
parent ac689171c2
commit d521c65d59
2 changed files with 35 additions and 6 deletions

View File

@@ -58,7 +58,19 @@
</div>
</div>
<div class="portlet-body">
<div class="row" style="margin-left: 0px;">
<div class="row" >
<label class="col-sm-1 truncate" style="text-align: right">Mostrar Lote:</label>
<div class="col-md-1 form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkMostrarLote" CssClass="chksino" Style="margin-top: -2px; background-color: #fff; line-height: 15px" data-size="small" runat="server" Text=" " OnCheckedChanged="ChkMostrarColumnas" AutoPostBack="true" />
</div>
<label class="col-sm-1" style="text-align: right">Mostrar Fecha:</label>
<div class="col-md-1 form-group form-md-line-input input-iconright" >
<asp:CheckBox ID="ChkMostrarFecha" CssClass="chksino" Style="margin-top: -2px; background-color: #fff; line-height: 15px" data-size="small" runat="server" Text=" " OnCheckedChanged="ChkMostrarColumnas" AutoPostBack="true" />
</div>
<label class="col-sm-1" style="text-align: right">Mostrar Sección:</label>
<div class="col-md-1 form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkMostrarSeccion" Checked="true" CssClass="chksino" Style="margin-top: -2px; background-color: #fff; line-height: 15px" data-size="small" Text=" " runat="server" OnCheckedChanged="ChkMostrarColumnas" AutoPostBack="true" />
</div>
</div>
</div>
</div>
@@ -84,23 +96,23 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<asp:CheckBox ID="ChkLote" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<asp:TextBox runat="server" ID="TxtLote" Text='<%# Eval("Lote").ToString()%>' CssClass="form-control input-sm" ClientIDMode="Static" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<asp:CheckBox ID="ChkEditCaducidad" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 113px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad", "{0:d}").ToString()%>' CssClass="form-control input-sm" ClientIDMode="Static" />
@@ -114,7 +126,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:CheckBox ID="Chk" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
</ItemTemplate>

View File

@@ -533,4 +533,21 @@ Partial Class Inventarios_AjustesSeccionAlmacen
' row.FCTextBox("TxtCantidad").Text = ExistenciaBackup
'End If
End Sub
Protected Sub ChkMostrarColumnas(sender As Object, e As EventArgs)
'Mostrar Lote
GvD.Columns(7).Visible = ChkMostrarLote.Checked
GvD.Columns(8).Visible = ChkMostrarLote.Checked
'Mostrar Caducidad
GvD.Columns(9).Visible = ChkMostrarFecha.Checked
GvD.Columns(10).Visible = ChkMostrarFecha.Checked
'Mostrar Sección
GvD.Columns(11).Visible = ChkMostrarSeccion.Checked
GvD.Columns(12).Visible = ChkMostrarSeccion.Checked
UppD.Update()
End Sub
End Class