Cambio para seleccionar todos los chk
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Reporte de Solicitudes de Anticipo
|
||||
@@ -120,13 +121,14 @@
|
||||
</div>
|
||||
<asp:GridView ID="GvSolicitudes" runat="server" GridLines="None" DataKeyNames="CveOrdenCompra,Folio, RazonSocial, ImporteSol, FolioMov, Importe, Nombre, CveEvento"
|
||||
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" data-footer="0" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros">
|
||||
EmptyDataText="No se encontraron registros" OnRowDataBound="GvSolicitudes_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAll" runat="server"/>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkOrdenCompra" runat="server"/>
|
||||
<asp:CheckBox ID="ChkOrdenCompra" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ord. Compra" ItemStyle-Width="10%">
|
||||
@@ -233,12 +235,10 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery('#C_datetimepicker').datetimepicker({
|
||||
timepicker: false,
|
||||
format: 'd.m.Y'
|
||||
});
|
||||
function SeleccionarTodos(chk) {
|
||||
$("#C_GvSolicitudes input:checkbox").attr("checked", chk.checked);
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
CargaProveedor();
|
||||
CargaUsuarios();
|
||||
CargaDatos();
|
||||
|
||||
}
|
||||
|
||||
private void CargaSubProyectos()
|
||||
@@ -155,11 +156,20 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
}
|
||||
protected void LnkCambiarFecha_Click(object sender, EventArgs e)
|
||||
{
|
||||
GvSolicitudes.Columns[0].Visible = true;
|
||||
LnkGuardar.Visible = true;
|
||||
LnkCambiarFecha.Visible = false;
|
||||
UPAcciones.Update();
|
||||
UPDatos.Update();
|
||||
if (GvSolicitudes.Rows.Count > 0)
|
||||
{
|
||||
GvSolicitudes.Columns[0].Visible = true;
|
||||
LnkGuardar.Visible = true;
|
||||
LnkCambiarFecha.Visible = false;
|
||||
GvSolicitudes.HeaderRow.FCCheckBox("ChkAll").Attributes.Add("onclick", "SeleccionarTodos(this);");
|
||||
UPAcciones.Update();
|
||||
UPDatos.Update();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No hay informacion cargada", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
}
|
||||
protected void LnkGuardar_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -284,4 +294,14 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
ImprimirbytesPDF(all, "RepSolicitudesAnticipo");
|
||||
|
||||
}
|
||||
|
||||
protected void GvSolicitudes_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
e.Row.FCCheckBox("ChkOrdenCompra").Attributes.Add("Class", "ChkOrdenCompra");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user