MoviminetosSUA filtro Resgistro patronal, Reporte Cancelaciones Ventas
This commit is contained in:
@@ -338,7 +338,7 @@ Public Class ClsNominas
|
||||
Return retorno
|
||||
|
||||
End Function
|
||||
Public Function SUAMovmientosAfiliatoriosGET(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean
|
||||
Public Function SUAMovmientosAfiliatoriosGET(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer, Optional CveRegistroPatronal As Integer = -1) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DTSet = New DataSet()
|
||||
DataAdapter("[PA_Nom_SUAMovmientosAfiliatoriosGET]", CommandType.StoredProcedure)
|
||||
@@ -347,6 +347,7 @@ Public Class ClsNominas
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
|
||||
.Add("@CveRegistroPatronal", SqlDbType.Int).Value = CveRegistroPatronal
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(DTSet)
|
||||
|
||||
@@ -5517,6 +5517,8 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/CatAutorizacionLimites.aspx".ToUpper(), 781)
|
||||
PaginaDict.Add("/Ventas/RepComisionesServec.aspx".ToUpper(), 782)
|
||||
PaginaDict.Add("/Ventas/RepComisionesServecDetalle.aspx".ToUpper(), 782)
|
||||
PaginaDict.Add("/Ventas/RepCancelacionesVentas.aspx".ToUpper(), 1325)
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -5391,6 +5391,30 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetRepCancelacionVentas(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveCliente As Integer, CveMotivoCancelacion As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepCancelacionesVentasGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveMotivoCancelacion", SqlDbType.Int).Value = CveMotivoCancelacion
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error obtener las ventas canceladas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#Region "C L I E N T E S V E N D E D O R E S S U B P R O Y E C T O S"
|
||||
|
||||
Public Function GetClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1">Tipo Período:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" CssClass="select2me" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Style="width: 100% !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 mediocol">del:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1">
|
||||
<div class="form-group input-iconright">
|
||||
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtRpdFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 mediocol">al:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1">
|
||||
<div class="form-group input-iconright">
|
||||
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="TxtRpdFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
@@ -56,7 +56,15 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 mediocol truncate">Registro Patronal:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlRegistroPatronal" runat="server" Width="100%" DataTextField="RegistroPatronal" CssClass="form-control input-sm select2me" DataValueField="CveRegistroPatronal" >
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4" style="text-align:right!important">
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,9 +27,33 @@ public partial class Nomina_MovimientosSUA : ClsPaginas
|
||||
{
|
||||
TxtRpdFechaInicio.Text = string.Format(" {0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).FirstDayOfMonth());
|
||||
TxtRpdFechaFin.Text = string.Format(" {0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth());
|
||||
CargaCombos();
|
||||
CargaTiposPeriodo();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaCombos()
|
||||
{
|
||||
|
||||
ClsRH ObjRH = new ClsRH();
|
||||
|
||||
|
||||
if (ObjRH.GetRegistrosPatronales(-1, UsuarioActual.CveEmpresa, -1))
|
||||
{
|
||||
DdlRegistroPatronal.DataSource = ObjRH.DtResultados;
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlRegistroPatronal.DataSource = null;
|
||||
}
|
||||
|
||||
ObjRH.Dispose();
|
||||
DdlRegistroPatronal.DataBind();
|
||||
|
||||
DdlRegistroPatronal.Items.Insert(0, new ListItem("Todos","-1"));
|
||||
|
||||
}
|
||||
|
||||
private void CargaTiposPeriodo()
|
||||
{
|
||||
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'");
|
||||
@@ -45,7 +69,8 @@ public partial class Nomina_MovimientosSUA : ClsPaginas
|
||||
{
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.SUAMovmientosAfiliatoriosGET(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDateTime(), TxtRpdFechaFin.Text.ToDateTime(), DdlTipoPeriodo.SelectedValue.ToEntero())
|
||||
|
||||
if (onom.SUAMovmientosAfiliatoriosGET(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDateTime(), TxtRpdFechaFin.Text.ToDateTime(), DdlTipoPeriodo.SelectedValue.ToEntero(), CveRegistroPatronal:DdlRegistroPatronal.SelectedValue.ToEntero())
|
||||
&& onom.DTSetResultados.Tables.Count > 3)
|
||||
{
|
||||
GVAsistencia.DataSource = onom.DTSetResultados.Tables[0];
|
||||
|
||||
142
Ventas/RepCancelacionesVentas.aspx
Normal file
142
Ventas/RepCancelacionesVentas.aspx
Normal file
@@ -0,0 +1,142 @@
|
||||
<%@ Page Title="Rep. Cancelación Ventas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCancelacionesVentas.aspx.vb" Inherits="Compras_RepCancelacionesVentas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dataTables_scrollHead {
|
||||
background-color: #95A5A6;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Rep. Cancelación Ventas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpdatePanel1" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server" Visible="false"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltros" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultarFiltros" OnClick="BtnConsultarFiltros_Click" runat="server" Text="Consultar" ValidationGroup="GrpFiltros" class="btn btn-primary" />
|
||||
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" style="max-width: 90px">Fecha Inicio:</div>
|
||||
<div class="col-md-1" style="max-width: 130px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFiltrosFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LBCalendarFiltrosFechaInicio" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFiltrosFechaInicio" runat="server" TargetControlID="TxtFiltrosFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaInicio" TargetControlID="TxtFiltrosFechaInicio" PopupButtonID="LBCalendarFiltrosFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFiltrosFechaInicio" runat="server" ControlToValidate="TxtFiltrosFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFiltros"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaInicio"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 75px">Fecha Fin:</div>
|
||||
<div class="col-md-1" style="max-width: 130px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFiltrosFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LBCalendarFiltrosFechaFin" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFiltrosFechaFin" runat="server" TargetControlID="TxtFiltrosFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaFin" TargetControlID="TxtFiltrosFechaFin" PopupButtonID="LBCalendarFiltrosFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFiltrosFechaFin" runat="server" ControlToValidate="TxtFiltrosFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFiltros"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaFin"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataValueField="CveSubProyecto" DataTextField="SubProyecto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Cliente:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" title="Motivo Cancelación">Mto. Cancel.</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMotivoCancelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="MotivoCancelacion" DataValueField="CveMotivoCancelacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD"
|
||||
DataKeyNames="CveCliente,Nombre,CveVenta,SerieFolio,Fecha,FechaCancelacion,CveSubProyecto,SubProyecto,CveMotivoCancelacion,MotivoCancelacionSAT,MotivoCancelacion,CveEstatusFactura"
|
||||
GridLines="None" data-sort="true">
|
||||
<Columns>
|
||||
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" Target="_blank" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField HeaderText="Cliente" DataTextField="Nombre" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" Target="_blank" ItemStyle-Width="20%" />
|
||||
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Fecha Cancelación" DataField="FechaCancelacion" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
|
||||
<asp:BoundField HeaderText="Motivo Cancelacion SAT" DataField="MotivoCancelacionSAT" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Motivo Cancelacion" DataField="MotivoCancelacion" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
124
Ventas/RepCancelacionesVentas.aspx.vb
Normal file
124
Ventas/RepCancelacionesVentas.aspx.vb
Normal file
@@ -0,0 +1,124 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Compras_RepCancelacionesVentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
'Private Property DTComplemntos As DataTable
|
||||
' Get
|
||||
' If ViewState("DTComplemntos") Is Nothing Then
|
||||
' Return New DataTable
|
||||
' Else
|
||||
' Return DirectCast(ViewState("DTComplemntos"), DataTable)
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' ViewState("DTComplemntos") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
InicializaValores()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
|
||||
TxtFiltrosFechaInicio.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
TxtFiltrosFechaFin.Text = Now.ToShortDateString
|
||||
|
||||
|
||||
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
Else
|
||||
DdlClientes.setEsWebService(False)
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DdlMotivoCancelacion.DataSource = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltraParametros("CveSATMotivoCancelacion IN (2,3)")
|
||||
DdlMotivoCancelacion.DataBind()
|
||||
|
||||
DdlMotivoCancelacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto)
|
||||
|
||||
GvDatos.Columns(4).HeaderText = LblSubProyecto.Text
|
||||
|
||||
|
||||
UpFiltros.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
|
||||
LnkExcel.Visible = False
|
||||
|
||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||
Dim FechaInicio = If(IsDate(TxtFiltrosFechaInicio.Text), TxtFiltrosFechaInicio.Text.ToDate, MinFecha)
|
||||
Dim FechaFin = If(IsDate(TxtFiltrosFechaFin.Text), TxtFiltrosFechaFin.Text.ToDate, MaxFecha)
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetRepCancelacionVentas(FechaInicio, FechaFin, DdlSubProyecto.SelectedValue.ToEntero, CveCliente, DdlMotivoCancelacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
LnkExcel.Visible = True
|
||||
End If
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpAcciones.Update()
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "IMPRESION"
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
|
||||
GeneraImpresion()
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraImpresion()
|
||||
|
||||
GvDatos.ExportToExcel2("RepCancelacionVentas.xlsx")
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
Reference in New Issue
Block a user