--Agregar pasajeros y timer
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
background-color: #ff6a00;
|
||||
background-color: #C49F47;
|
||||
border-radius: 10px !important;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
@@ -85,46 +85,56 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel">
|
||||
<ContentTemplate>
|
||||
<%-- Boleto --%>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-9">
|
||||
<%-- Datos del Cliente --%>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-users font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Pasajero
|
||||
<asp:Label ID="LblNum" runat="server" Text='<%# Eval("Numero") %>'></asp:Label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<div class="row">
|
||||
<div class="caption font-green col-md-8">
|
||||
<i class="fa fa-users font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Pasajero
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<asp:UpdatePanel runat="server" ID="UpTimer" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="lblTiempo" runat="server" Text="00:00:00"></asp:Label></p>
|
||||
<asp:Timer ID="timerActualizar" runat="server" Interval="1000" OnTick="TimerActualizar_Tick" Enabled="False">
|
||||
</asp:Timer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
|
||||
ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
|
||||
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label>Nombre:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconrigh">
|
||||
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
|
||||
ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
|
||||
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label>Nombre:</label>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<label>Visa:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -136,6 +146,7 @@
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
@@ -225,7 +236,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<%-- Botón para Agregar Pasajero(Oculto) --%>
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<div class="form-group form-md-line-input input-iconright text-right">
|
||||
<asp:Button ID="BtnAgregarPasajero" runat="server" CssClass="btn btn-success" Visible="false"
|
||||
Text="Agregar Pasajeros" OnClick="AgregarPasajero" />
|
||||
</div>
|
||||
@@ -237,6 +248,9 @@
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Nombre" HeaderText="Nombre" />
|
||||
<asp:BoundField DataField="Visa" HeaderText="Visa" />
|
||||
<asp:BoundField DataField="Sexo" HeaderText="Sexo" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Celular" HeaderText="Celular" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Asiento" HeaderText="Asiento" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Partida" HeaderText="Partida" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Destino" HeaderText="Destino" ItemStyle-HorizontalAlign="Center" />
|
||||
@@ -247,18 +261,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<%--OnClick="FinalizarVenta"--%>
|
||||
<div class="row">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-2">
|
||||
<asp:Button ID="BtnGuardar" Visible="False" runat="server" CssClass="btn btn-success "
|
||||
Text="Finalizar Compra"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
</div>
|
||||
<div class="col-md-5"></div>
|
||||
<div class="form-group form-md-line-input input-iconright text-right">
|
||||
<asp:Button ID="BtnGuardar" runat="server" CssClass="btn btn-primary" Visible="false"
|
||||
Text="Finalizar Compra" OnClick="FinalizarVenta" />
|
||||
</div>
|
||||
</div>
|
||||
<%-- Asientos --%>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<table>
|
||||
<tbody>
|
||||
@@ -516,6 +525,18 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
var tiempoTranscurrido = 0;
|
||||
function actualizarTiempo() {
|
||||
tiempoTranscurrido++;
|
||||
var horas = Math.floor(tiempoTranscurrido / 3600);
|
||||
var minutos = Math.floor((tiempoTranscurrido % 3600) / 60);
|
||||
var segundos = tiempoTranscurrido % 60;
|
||||
|
||||
var tiempoFormateado = (horas < 10 ? "0" : "") + horas + " : " + (minutos < 10 ? "0" : "") + minutos + " : " + (segundos < 10 ? "0" : "") + segundos + " s";
|
||||
document.getElementById('<%= lblTiempo.ClientID %>').innerText = tiempoFormateado;
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports ADSNetLibrary.Helpers
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class Boletos
|
||||
Inherits ClsPaginas
|
||||
#Region "Propiedades"
|
||||
@@ -79,13 +79,16 @@ Partial Class Boletos
|
||||
DtPasajeros.Columns.Add("Numero", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Nombre", GetType(String))
|
||||
DtPasajeros.Columns.Add("Visa", GetType(String))
|
||||
DtPasajeros.Columns.Add("Sexo", GetType(String))
|
||||
DtPasajeros.Columns.Add("CveSexo", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Celular", GetType(String))
|
||||
DtPasajeros.Columns.Add("Observaciones", GetType(String))
|
||||
DtPasajeros.Columns.Add("Partida", GetType(String))
|
||||
DtPasajeros.Columns.Add("Destino", GetType(String))
|
||||
DtPasajeros.Columns.Add("CveDestinoOrigen", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("CveDestinoFinal", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Asiento", GetType(String))
|
||||
DtPasajeros.Columns.Add("Celular", GetType(String))
|
||||
DtPasajeros.Columns.Add("Importe", GetType(Decimal))
|
||||
DtPasajeros.Columns.Add("Observaciones", GetType(String))
|
||||
|
||||
InicializaCombos()
|
||||
|
||||
'Boletos Vendidos
|
||||
@@ -156,10 +159,10 @@ Partial Class Boletos
|
||||
ViewState("Importe") = 0
|
||||
BtnAgregarPasajero.Visible = False
|
||||
LbCostos.Visible = False
|
||||
Alert("No se encontro una tarifa para esta ruta", TipoMensaje.MsgAdvertencia)
|
||||
Alert("No se encontro una tarifa para estos destinos", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Alert("No se encontro una tarifa para esta ruta", TipoMensaje.MsgAdvertencia)
|
||||
Alert("No se encontro una tarifa para estos destinos", TipoMensaje.MsgAdvertencia)
|
||||
ObjDestinos.RollBack()
|
||||
Finally
|
||||
ObjDestinos.Dispose()
|
||||
@@ -182,94 +185,96 @@ Partial Class Boletos
|
||||
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
'Protected Sub FinalizarVenta(sender As Object, e As EventArgs)
|
||||
|
||||
' Dim SbAlert As New StringBuilder()
|
||||
' Dim Retorno As New Modelos.Factura.MMensajeFactura()
|
||||
Protected Sub FinalizarVenta(sender As Object, e As EventArgs)
|
||||
|
||||
' Dim ObjTransporte As New ClsTransportes()
|
||||
' ObjTransporte.IniciaTransacSQL()
|
||||
Dim SbAlert As New StringBuilder()
|
||||
Dim Retorno As New Modelos.Factura.MMensajeFactura()
|
||||
|
||||
' Dim TieneError As Boolean = False
|
||||
Dim ObjTransporte As New ClsTransportes()
|
||||
ObjTransporte.IniciaTransacSQL()
|
||||
|
||||
' Try
|
||||
' For Each dr As DataRow In DtPasajeros.Rows 'gvr As GridViewRow In GvB.Rows
|
||||
' Dim Nombre, Visa, Celular, Obs, Asiento As String
|
||||
' Dim Sexo As Boolean = False
|
||||
' Dim Importe As Decimal = 0
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
' Nombre = dr("Nombre").ToString
|
||||
' Visa = dr("Visa").ToString
|
||||
' Celular = dr("Celular").ToString
|
||||
' Obs = dr("Observaciones").ToString
|
||||
' Asiento = dr("Asiento").ToString
|
||||
' Importe = dr("Importe").ToString.ToDecimal
|
||||
Try
|
||||
For Each dr As DataRow In DtPasajeros.Rows
|
||||
Dim Nombre, Visa, Celular, Obs, Asiento As String
|
||||
Dim Sexo As Boolean
|
||||
Dim Importe As Decimal = 0
|
||||
Dim CveDestinoOrigen, CveDestinoFinal As Integer
|
||||
|
||||
' '.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text
|
||||
' If Not ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, Asiento.ToEntero, Nombre, Visa, Celular, Sexo, Obs, UsuarioActual.CveUsuario, UsuarioActual.CveVendedor) > 1 Then
|
||||
' TieneError = True
|
||||
' SbAlert.Append("Ocurrió un error al generar el viaje")
|
||||
' End If
|
||||
' Next
|
||||
CveDestinoOrigen = dr("CveDestinoOrigen").ToString.ToEntero
|
||||
CveDestinoFinal = dr("CveDestinoFinal").ToString.ToEntero
|
||||
Importe = dr("Importe").ToString.ToDecimal
|
||||
Asiento = dr("Asiento").ToString
|
||||
Nombre = dr("Nombre").ToString
|
||||
Visa = dr("Visa").ToString
|
||||
Celular = dr("Celular").ToString
|
||||
Sexo = dr("CveSexo").ToString.ToBool
|
||||
Obs = dr("Observaciones").ToString
|
||||
|
||||
' If Not TieneError Then
|
||||
' Retorno = CrearRemision(ObjTransporte)
|
||||
' End If
|
||||
If ObjTransporte.AddViajesPasajeros(CveViaje, CveDestinoOrigen, CveDestinoFinal, Importe, Asiento.ToEntero, Nombre, Visa, Celular, Sexo, Obs, UsuarioActual.CveUsuario, UsuarioActual.CveVendedor) > 1 Then
|
||||
ObjTransporte.Commit()
|
||||
End If
|
||||
Next
|
||||
DtPasajeros.Clear()
|
||||
|
||||
' If Retorno IsNot Nothing Then
|
||||
' TieneError = Retorno.TieneError
|
||||
If Not TieneError Then
|
||||
Retorno = CrearRemision(ObjTransporte)
|
||||
End If
|
||||
|
||||
' If Not TieneError Then
|
||||
' If Retorno.CveVenta > 0 AndAlso Not Retorno.TieneError Then
|
||||
' SbAlert.AppendFormat("{0}", Retorno.Mensajes(Retorno.Mensajes.Count - 1))
|
||||
' Else
|
||||
' TieneError = True
|
||||
' SbAlert.Append("Ocurrió un error al generar la factura")
|
||||
' End If
|
||||
If Retorno IsNot Nothing Then
|
||||
TieneError = Retorno.TieneError
|
||||
|
||||
' If Retorno.Mensajes IsNot Nothing AndAlso Retorno.Mensajes.Count > 0 Then
|
||||
' For Each Mensaje As String In Retorno.Mensajes
|
||||
' SbAlert.AppendFormat("{0} <br/>", Mensaje)
|
||||
' Next
|
||||
' Else
|
||||
' TieneError = True
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' TieneError = True
|
||||
' SbAlert.Append("Ocurrió un error al generar la factura")
|
||||
' End If
|
||||
If Not TieneError Then
|
||||
If Retorno.CveVenta > 0 AndAlso Not Retorno.TieneError Then
|
||||
SbAlert.AppendFormat("{0}", Retorno.Mensajes(Retorno.Mensajes.Count - 1))
|
||||
Else
|
||||
TieneError = True
|
||||
SbAlert.Append("Ocurrió un error al generar la factura")
|
||||
End If
|
||||
|
||||
' If SbAlert.Length = 0 Then
|
||||
' SbAlert.Append("Ocurrió un error al generar la factura")
|
||||
' End If
|
||||
If Retorno.Mensajes IsNot Nothing AndAlso Retorno.Mensajes.Count > 0 Then
|
||||
For Each Mensaje As String In Retorno.Mensajes
|
||||
SbAlert.AppendFormat("{0} <br/>", Mensaje)
|
||||
Next
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
TieneError = True
|
||||
SbAlert.Append("Ocurrió un error al generar la factura")
|
||||
End If
|
||||
|
||||
' Catch ex As Exception
|
||||
' TieneError = True
|
||||
' SbAlert.Append("Ocurrió un error al generar la factura." + ex.ToString())
|
||||
' GuardaLog(ex.ToString())
|
||||
' Finally
|
||||
' If TieneError Then
|
||||
' ObjTransporte.RollBack()
|
||||
' ObjTransporte.Dispose()
|
||||
' Else
|
||||
' SbAlert.Append("El boleto se genero correctamente")
|
||||
' ObjTransporte.Commit()
|
||||
' ObjTransporte.Dispose()
|
||||
If SbAlert.Length = 0 Then
|
||||
SbAlert.Append("Ocurrió un error al generar la factura")
|
||||
End If
|
||||
|
||||
' DdlPartida.SelectedValueExist("-1")
|
||||
' DdlDestino.SelectedValueExist("-1")
|
||||
' AsientoSeleccionado = ""
|
||||
' CargaDatos()
|
||||
' End If
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
SbAlert.Append("Ocurrió un error al generar la factura." + ex.ToString())
|
||||
GuardaLog(ex.ToString())
|
||||
Finally
|
||||
If TieneError Then
|
||||
ObjTransporte.RollBack()
|
||||
ObjTransporte.Dispose()
|
||||
Else
|
||||
SbAlert.Append("El boleto se genero correctamente")
|
||||
ObjTransporte.Dispose()
|
||||
|
||||
' Alert(SbAlert.ToString(), If(TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), ShowCloseButton:=False)
|
||||
DdlPartida.SelectedValueExist("-1")
|
||||
DdlDestino.SelectedValueExist("-1")
|
||||
AsientoSeleccionado = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
' UpPanel.Update()
|
||||
' End Try
|
||||
Alert(SbAlert.ToString(), If(TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), ShowCloseButton:=False)
|
||||
|
||||
'End Sub
|
||||
End Try
|
||||
UpPanel.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPartida.SelectedIndexChanged
|
||||
CotizarTarifa()
|
||||
@@ -279,10 +284,6 @@ Partial Class Boletos
|
||||
CotizarTarifa()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnNumPasajeros_Click(sender As Object, e As EventArgs)
|
||||
' GeneraPasajeros(TxtNumPasajeros.Text.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraPasajeros(Cantidad As Integer)
|
||||
DtPasajeros.Clear()
|
||||
For i As Integer = 1 To Cantidad
|
||||
@@ -306,18 +307,27 @@ Partial Class Boletos
|
||||
Alert("No hay un importe asignado.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Dr1 As DataRow = DtPasajeros.NewRow
|
||||
Dr1("Asiento") = AsientoSeleccionado.Replace("A", "")
|
||||
Dr1("Nombre") = TxtNombre.Text.Trim
|
||||
Dr1("Visa") = TxtVisa.Text.Trim
|
||||
Dr1("Sexo") = RblSexo.SelectedItem
|
||||
Dr1("CveSexo") = RblSexo.SelectedValue.ToBool
|
||||
Dr1("Celular") = TxtCelular.Text.Trim
|
||||
Dr1("Observaciones") = TxtObservaciones.Text.Trim
|
||||
Dr1("Partida") = DdlPartida.SelectedItem
|
||||
Dr1("Destino") = DdlDestino.SelectedItem
|
||||
Dr1("CveDestinoOrigen") = DdlPartida.SelectedValue.ToEntero
|
||||
Dr1("CveDestinoFinal") = DdlDestino.SelectedValue.ToEntero
|
||||
Dr1("Importe") = Me.Importe
|
||||
Dr1("Partida") = DdlPartida.SelectedTextExist
|
||||
Dr1("Destino") = DdlPartida.Text
|
||||
'asiento
|
||||
'Reiniciamos Datos'
|
||||
DtPasajeros.Rows.Add(Dr1)
|
||||
AsientoSeleccionado = ""
|
||||
|
||||
TxtNombre.Text = ""
|
||||
TxtVisa.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
GvB.DataSource = DtPasajeros
|
||||
GvB.DataBind()
|
||||
|
||||
@@ -331,55 +341,60 @@ Partial Class Boletos
|
||||
lnk.ToolTip = dr("Nombre").ToString
|
||||
End If
|
||||
Next
|
||||
|
||||
BtnGuardar.Visible = True
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
|
||||
'Private Function CrearRemision(ByRef objTrans As ClsTransportes) As Modelos.Factura.MMensajeFactura
|
||||
' Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
Private Function CrearRemision(ByRef objTrans As ClsTransportes) As Modelos.Factura.MMensajeFactura
|
||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
|
||||
' Dim CveCliente As Integer = 1154164
|
||||
' Dim CveMoneda As Integer = 2
|
||||
' Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero()
|
||||
Dim CveCliente As Integer = 1154164
|
||||
Dim CveMoneda As Integer = 2
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero()
|
||||
|
||||
' If CveCliente <= 0 Then
|
||||
' Retorno.Mensajes.Add("No se pudo cargar el cliente")
|
||||
' Return Retorno
|
||||
' End If
|
||||
If CveCliente <= 0 Then
|
||||
Retorno.Mensajes.Add("No se pudo cargar el cliente")
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
' If CveSubProyecto <= 0 Then
|
||||
' Retorno.Mensajes.Add("No se pudo cargar el subproyecto")
|
||||
' Return Retorno
|
||||
' End If
|
||||
If CveSubProyecto <= 0 Then
|
||||
Retorno.Mensajes.Add("No se pudo cargar el subproyecto")
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
' Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda, "Rem")
|
||||
Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda, "Rem")
|
||||
|
||||
' Dim CvePSBoleto As Integer = 912720
|
||||
Dim CvePSBoleto As Integer = 912720
|
||||
|
||||
' For Each Dr As DataRow In DtPasajeros.Rows
|
||||
' Dim Obs = Dr("Nombre").ToString
|
||||
' Dim Importe = Dr("Importe").ToString.ToDecimal()
|
||||
' If Importe <= 0 Then
|
||||
' Retorno.Mensajes.Add("El importe debe ser mayor a 0")
|
||||
' Return Retorno
|
||||
' End If
|
||||
For Each Dr As DataRow In DtPasajeros.Rows
|
||||
Dim Obs = Dr("Nombre").ToString
|
||||
Dim Importe = Dr("Importe").ToString.ToDecimal()
|
||||
If Importe <= 0 Then
|
||||
Retorno.Mensajes.Add("El importe debe ser mayor a 0")
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
' ObjFactura.AgregarPS(CvePSBoleto, 1, Importe, 0, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=0)
|
||||
' Next
|
||||
ObjFactura.AgregarPS(CvePSBoleto, 1, Importe, 0, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=0)
|
||||
Next
|
||||
|
||||
' ObjFactura.CalculaTotales()
|
||||
ObjFactura.CalculaTotales()
|
||||
|
||||
' Try
|
||||
' Retorno = ObjFactura.EmitirFactura(False, Transac:=objTrans.IniciaTransacSQL())
|
||||
' Catch ex As Exception
|
||||
' Retorno = Nothing
|
||||
' GuardaLog(ex.ToString())
|
||||
' End Try
|
||||
Try
|
||||
Retorno = ObjFactura.EmitirFactura(False, Transac:=objTrans.IniciaTransacSQL())
|
||||
Catch ex As Exception
|
||||
Retorno = Nothing
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
|
||||
' If ObjFactura IsNot Nothing Then
|
||||
' ObjFactura.Dispose()
|
||||
' End If
|
||||
If ObjFactura IsNot Nothing Then
|
||||
ObjFactura.Dispose()
|
||||
End If
|
||||
|
||||
' Return Retorno
|
||||
'End Function
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Protected Sub TimerActualizar_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles timerActualizar.Tick
|
||||
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "ActualizarTiempo", "actualizarTiempo();", True)
|
||||
UpTimer.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -127,7 +127,7 @@ Partial Class ListadoViajes
|
||||
End If
|
||||
'Agregamos contrato
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, fecha, fecha, "", "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CveRuta:=DdlRutas.Text.ToEntero, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero, CveMasivo:=CveMasivo) > 0 Then
|
||||
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, fecha, fecha, "", "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CveRuta:=DdlRutas.Text.ToEntero, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero, CveMasivo:=CveMasivo, CveVendedor:=UsuarioActual.CveVendedor) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
End If
|
||||
'Actualizamos Folio
|
||||
|
||||
Reference in New Issue
Block a user