3 Contratos VYA impresion de PDF solo sale un regitro y XLS marca error, 2 En Inicio Vtas sin enviar correo, poner un envíar masivo check all y boton en viar
This commit is contained in:
File diff suppressed because it is too large
Load Diff
19
Inicio.aspx
19
Inicio.aspx
@@ -1187,6 +1187,15 @@
|
||||
</div>
|
||||
<asp:GridView ID="GvVentasEmail" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-heighterror="800" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Seleccionar">
|
||||
<HeaderTemplate>
|
||||
<input type="checkbox" id="chkSelectAll" onclick="toggleCheckboxes()" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkSelect" runat="server" CssClass="chkItem" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField HeaderText="Serie-Folio" ItemStyle-Width="15%" DataNavigateUrlFields="CveVenta" DataTextField="SerieFolio" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" Target="_blank" />
|
||||
<asp:BoundField DataField="Fecha" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
|
||||
@@ -1196,6 +1205,7 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button runat="server" Text="Enviar Seleccionados" CssClass="btn btn-primary" ID="BtnEnviarVentasSinCorreo" />
|
||||
<button data-dismiss="modal" class="btn btn-default">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -2167,6 +2177,15 @@
|
||||
}
|
||||
|
||||
|
||||
function toggleCheckboxes() {
|
||||
var isChecked = $('#chkSelectAll').prop('checked');
|
||||
|
||||
// Buscar solo los elementos INPUT de tipo CHECKBOX dentro del GridView
|
||||
$('#<%= GvVentasEmail.ClientID %> input[type="checkbox"][id*=chkSelect]').each(function () {
|
||||
$(this).prop('checked', isChecked);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<%-- TERMINA FULL CALENDAR --%>
|
||||
|
||||
@@ -18,11 +18,24 @@ Partial Class ListadoContratos
|
||||
ViewState("DtAvanceDocumento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
#Region "Carga Página"
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
DtDatos = New DataTable
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
||||
txtFechaF.Text = DateTime.Now.AddDays(1).ToShortDateString
|
||||
InicializaCombos()
|
||||
@@ -63,6 +76,7 @@ Partial Class ListadoContratos
|
||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, DdlCliente.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, CveSubProyecto:=DdlCentroCostos.SelectedValue.ToEntero, CveTipoAF:=DdlTipoUnidad.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero,
|
||||
FechaInicioIngreso:=txtFechaI.Text.ToDate, FechaFinIngreso:=txtFechaF.Text.ToDate) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
DtDatos = ObjContratos.DtResultados.Copy
|
||||
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
@@ -265,15 +279,19 @@ Partial Class ListadoContratos
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
'GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
ImprimeReporte("Excel")
|
||||
End Sub
|
||||
Protected Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||
ImprimeReporte("PDF")
|
||||
End Sub
|
||||
Private Sub ImprimeReporte(Formato As String)
|
||||
'Dim ObjContratos As New ClsContratos
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
Dim Imagen As New IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim Cliente As String = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim dt As DataTable = ObjContratos.DtResultados
|
||||
|
||||
Dim params As New List(Of ReportParameter) From {
|
||||
New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa),
|
||||
New ReportParameter("FechaInicio", "-1"),
|
||||
@@ -283,11 +301,11 @@ Partial Class ListadoContratos
|
||||
New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString),
|
||||
New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))
|
||||
}
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepContratos.rdlc", dt, params, NombreArchivo:="Reporte Contratos")
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepContratos.rdlc", DtDatos, params, NombreArchivo:="Reporte Contratos", Formato:=Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
End Sub
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
|
||||
Reference in New Issue
Block a user