--Implementación de carga y descarga de pdfs
This commit is contained in:
@@ -420,7 +420,7 @@ Public Class ClsContratos
|
||||
Public Function UpdateContratos(CveContrato As Integer, NumeroContrato As String, DescripcionContrato As String, NumeroLicitacion As String, CveProveedor As Integer, CveCliente As Integer, CveProspecto As Integer, FechaInicial As DateTime, FechaFinal As DateTime,
|
||||
Ubicacion As String, Responsable As String, CveSubProyecto As Integer, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String, Geom As String,
|
||||
CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = -1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False,
|
||||
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing, Optional CantidadPasajeros As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Boolean
|
||||
@@ -450,8 +450,8 @@ Public Class ClsContratos
|
||||
.Add("@CveContratoPadre", SqlDbType.Int).Value = CveContratoPadre
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@EsPresupuestal", SqlDbType.Int).Value = EsPresupuestal
|
||||
.Add("@CveContratoTipo", SqlDbType.SmallInt).Value = CveContratoTipo
|
||||
.Add("@EsPresupuestal", SqlDbType.Bit).Value = EsPresupuestal
|
||||
.Add("@CveContratoTipo", SqlDbType.Int).Value = CveContratoTipo
|
||||
.Add("@ImporteMin", SqlDbType.Money).Value = Minimo
|
||||
.Add("@ImporteMax", SqlDbType.Money).Value = Maximo
|
||||
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
@@ -471,7 +471,7 @@ Public Class ClsContratos
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
.Add("@CveDireccionEnvio", SqlDbType.Int).Value = CveDireccionEnvio
|
||||
.Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0)
|
||||
.Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = AplicaImpuestosLocales
|
||||
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
||||
.Add("@FacturacionCicilica", SqlDbType.Bit).Value = FacturacionCicilica
|
||||
.Add("@FacturacionCiclicaAutomatico", SqlDbType.Bit).Value = FacturacionCiclicaAutomatico
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Folio</label>
|
||||
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text=""></asp:Label>
|
||||
<asp:Label runat="server" ID="LbCveSubProyecto" Visible="false"></asp:Label>
|
||||
</div>
|
||||
|
||||
@@ -273,16 +273,26 @@
|
||||
</div>
|
||||
|
||||
<div class="portlet-body rowpadding">
|
||||
<asp:LinkButton runat="server" ID="BtnDescargar" class="btn btn-warning" OnClick="DescargarArchivo"
|
||||
Visible="false"><i class='fa fa-download' ></i>Descargar</asp:LinkButton>
|
||||
<asp:TextBox Style="display: none" ID="TxtArchivo" ClientIDMode="Static" runat="server"
|
||||
Width="200px"></asp:TextBox>
|
||||
<asp:Label ID="LbArchivo" ClientIDMode="Static" runat="server" Visible="false"
|
||||
Width="200px"></asp:Label>
|
||||
<button type="button" class="btn btn-primary" runat="server" clientidmode="Static"
|
||||
id="Button1" data-toggle="modal" data-target="#ModalUpload" visible="true">
|
||||
<i class="fa fa-upload"
|
||||
aria-hidden="true"></i>Subir Archivo</button>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<asp:UpdatePanel ID="UPAFUL" runat="server" UpdateMode="Conditional">
|
||||
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton runat="server" ID="BtnDescargar" class="btn btn-warning" Visible="false"><i class='fa fa-download' aria-hidden='true'></i> Descargar</asp:LinkButton>
|
||||
<asp:TextBox Style="display: none" ID="TxtArchivo" ClientIDMode="Static" runat="server"
|
||||
Width="200px"></asp:TextBox>
|
||||
|
||||
<button type="button" class="btn btn-primary" runat="server" clientidmode="Static"
|
||||
id="Button1" data-toggle="modal" data-target="#ModalUpload" visible="true"><i class="fa fa-upload"
|
||||
aria-hidden="true"></i>Subir Archivo</button>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnDescargar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -400,7 +410,7 @@
|
||||
<div class="row">
|
||||
<%-- Datos del Boleto --%>
|
||||
<div class="col-md-8">
|
||||
<asp:Panel runat="server" ID="PnEditarViaje" Visible="false">
|
||||
<asp:Panel runat="server" ID="PnEditarViaje" Visible="true">
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4 bold">Ruta</label>
|
||||
<div class="col-md-8">
|
||||
@@ -851,9 +861,10 @@
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary"
|
||||
OnClick="GuardarArchivo" />
|
||||
<asp:Button ID="BtnGuardarArchivo" runat="server" ClientIDMode="Static" Text="Guardar"
|
||||
CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,14 @@ Partial Class RepContratoDetalle
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ArchivoUpdate As String
|
||||
Get
|
||||
Return ViewState("ArchivoUpdate").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ArchivoUpdate") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveContratoTipo As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveContratoTipo"), Integer)
|
||||
@@ -27,6 +35,14 @@ Partial Class RepContratoDetalle
|
||||
ViewState("CveContratoTipo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveContratoEstatus As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveContratoEstatus"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContratoEstatus") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveMasivo As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveMasivo"), Integer)
|
||||
@@ -88,6 +104,8 @@ Partial Class RepContratoDetalle
|
||||
CargaDatos()
|
||||
AsientoSeleccionado = ""
|
||||
CveViajePasajero = 0
|
||||
Session("FileExtension") = ""
|
||||
ArchivoUpdate = ""
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -95,7 +113,7 @@ Partial Class RepContratoDetalle
|
||||
'Lista Tipo AF
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTipoAF.DataBind()
|
||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
||||
DdlTipoAF.Items.Insert(0, New ListItem("-", "0"))
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
'Información General
|
||||
@@ -120,11 +138,14 @@ Partial Class RepContratoDetalle
|
||||
TxtDolares.Text = Contrato.Rows(0)("Importe").ToString
|
||||
TxtPesos.Text = Contrato.Rows(0)("ImporteMax").ToString
|
||||
TxtAnticipo.Text = Contrato.Rows(0)("ImporteMin").ToString
|
||||
If Not String.IsNullOrEmpty(Contrato.Rows(0)("Archivo").ToString) Then
|
||||
BtnDescargar.Visible = True
|
||||
LbArchivo.Text = Contrato.Rows(0)("Archivo").ToString
|
||||
LbArchivo.Visible = True
|
||||
CveContratoEstatus = Contrato.Rows(0)("CveContratosEstatus").ToString.ToEntero
|
||||
If Not IsDBNull(ObjContratos.Archivo) AndAlso ObjContratos.Archivo <> "" AndAlso ObjContratos.Archivo <> "-1" AndAlso ObjContratos.Archivo <> $"{ObjContratos.CveContrato}." Then
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
||||
'A2.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CONTRATO&CveEmpresa={0}&Archivo={1}", ObjContratos.CveEmpresa, ViewState("FUrl").ToString)))
|
||||
BtnDescargar.Visible = True
|
||||
Else
|
||||
BtnDescargar.Visible = False
|
||||
A1.Visible = True
|
||||
End If
|
||||
'Boletos Vendidos
|
||||
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
|
||||
@@ -144,12 +165,13 @@ Partial Class RepContratoDetalle
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
UpTabContainer.Update()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Información General"
|
||||
Protected Sub GuardarArchivo(sender As Object, e As EventArgs)
|
||||
Protected Sub BtnGuardarArchivo_Click1(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
@@ -165,7 +187,7 @@ Partial Class RepContratoDetalle
|
||||
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
|
||||
FileExtension = IO.Path.GetExtension($"{AppDomain.CurrentDomain.BaseDirectory}Temp\{fileItem.filename}").Replace(".", "")
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
Session("FileExtension") = FileExtension
|
||||
Dim tempArray() As String
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||
@@ -180,15 +202,18 @@ Partial Class RepContratoDetalle
|
||||
'ImgArchivo.Src = "/imagenes/accept.png"
|
||||
Next
|
||||
|
||||
UpTabContainer.Update()
|
||||
UPAFUL.Update()
|
||||
|
||||
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||
Button1.Visible = True
|
||||
A1.Visible = True
|
||||
If Not FileExtension = "-1" Then
|
||||
BtnDescargar.Visible = True
|
||||
End If
|
||||
UpdateContrato(sender, e)
|
||||
End Sub
|
||||
Protected Sub DescargarArchivo(sender As Object, e As EventArgs)
|
||||
Private Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
|
||||
DescargarArchivo()
|
||||
End Sub
|
||||
Private Sub DescargarArchivo()
|
||||
Dim File As New FileInfo(ViewState("FUrl").ToString)
|
||||
|
||||
If File.Exists Then 'set appropriate headers
|
||||
@@ -212,18 +237,25 @@ Partial Class RepContratoDetalle
|
||||
End If 'nothing in the URL as HTTP GET
|
||||
End Sub
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
Dim ArchivoUpdate As String = "-1"
|
||||
|
||||
If Session("FileExtension").ToString <> "" Then
|
||||
ArchivoUpdate = "." & Session("FileExtension").ToString
|
||||
Else
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
Try
|
||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, -1) Then
|
||||
'ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, LbArchivo.Text, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text)
|
||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", LbCveSubProyecto.Text.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus) Then
|
||||
Alert("Contrato actualizado correctamente")
|
||||
End If
|
||||
ObjContratos.Commit()
|
||||
|
||||
Catch ex As Exception
|
||||
Alert($"Ocurrió un ocurrió un error al actualizar su boleto", TipoMensaje.MsgError)
|
||||
Alert("Ocurrió un ocurrió un error al actualizar su boleto", TipoMensaje.MsgError)
|
||||
ObjContratos.RollBack()
|
||||
Finally
|
||||
Alert("Contrato actualizado correctamente")
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
@@ -270,7 +302,7 @@ Partial Class RepContratoDetalle
|
||||
AsientoSeleccionado = buttonID
|
||||
TxtAsiento.Text = buttonID.Substring(1)
|
||||
|
||||
UpBoletos.Update()
|
||||
UpTabContainer.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
End Sub
|
||||
Protected Sub UpdateBoleto(sender As Object, e As EventArgs)
|
||||
@@ -295,8 +327,12 @@ Partial Class RepContratoDetalle
|
||||
Finally
|
||||
Alert("Su asiento fue actualizado correctamente")
|
||||
ObjTransportes.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
End Try
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalEditar"))
|
||||
UpTabContainer.Update()
|
||||
UpPasajeros.Update()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub OnChangeRuta(sender As Object, e As EventArgs)
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
@@ -363,7 +399,6 @@ Partial Class RepContratoDetalle
|
||||
|
||||
End Sub
|
||||
Protected Sub CambiarBoleto(sender As Object, e As EventArgs)
|
||||
DdlRuta.ClearSelection()
|
||||
PnEditarViaje.Visible = True
|
||||
PnEditarUsuario.Visible = False
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
@@ -387,14 +422,15 @@ Partial Class RepContratoDetalle
|
||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, -1, CveEstatus:=-1, CveTipoContrato:=35) Then
|
||||
For Each row As DataRow In ObjContratos.DtResultados.Rows
|
||||
Dim fecha As DateTime = row("FechaInicial").ToString.ToDateTime
|
||||
' Asigna los valores de la columna deseada al ListItem
|
||||
'Asigna los valores de la columna deseada al ListItem
|
||||
Dim listItem As New ListItem(row("SubProyecto").ToString() + " - " + fecha.ToShortDateString + " - " + fecha.ToShortTimeString, row("CveContrato").ToString())
|
||||
' Agrega el ListItem al DropDownList
|
||||
'Agrega el ListItem al DropDownList
|
||||
DdlRuta.Items.Add(listItem)
|
||||
Next
|
||||
End If
|
||||
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje")
|
||||
ObjContratos.Dispose()
|
||||
UpTabContainer.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||
End Sub
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class ListadoViajes
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -24,6 +24,8 @@ Partial Class ListadoViajes
|
||||
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
|
||||
@@ -38,18 +40,7 @@ Partial Class ListadoViajes
|
||||
DdlRutas.DataBind()
|
||||
|
||||
Dim ObjRutas As New ClsTransportes()
|
||||
'If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||
|
||||
' If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
' DdlRutas.DataSource = ObjRutas.DtResultados
|
||||
' DdlRutas.DataBind()
|
||||
' DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||
' End If
|
||||
'End If
|
||||
'DdlRutas.DataSource = ObjRutas.DtResultados
|
||||
' DdlRutas.DataBind()
|
||||
' DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||
'Lista Destinos'
|
||||
If ObjRutas.GetDestinos() Then
|
||||
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
@@ -73,17 +64,12 @@ Partial Class ListadoViajes
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
GvContratos.DataBind()
|
||||
'If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=35) Then
|
||||
' GvContratos.DataSource = ObjContratos.DtResultados
|
||||
' GvContratos.DataBind()
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
Private Sub LBAgregarViaje_Click(sender As Object, e As EventArgs) Handles LBAgregarViaje.Click
|
||||
MostrarModal()
|
||||
End Sub
|
||||
|
||||
Public Sub MostrarModal()
|
||||
'Generar Folio
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||
@@ -104,7 +90,6 @@ Partial Class ListadoViajes
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||
End Sub
|
||||
|
||||
Protected Sub AddViaje(sender As Object, e As EventArgs)
|
||||
'Generador de Viajes Masivos
|
||||
Dim CveSubProyecto As Integer = DdlRutas.SelectedValue.ToEntero 'GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||
@@ -140,6 +125,7 @@ Partial Class ListadoViajes
|
||||
ObjContratos.Commit()
|
||||
End If
|
||||
'Actualizamos Folio
|
||||
ObjFolio.IniciaTransacSQL()
|
||||
If ObjFolio.UpdateFolioActual(CveSubProyecto, "Con", True, UsuarioActual.CveEmpresa) Then
|
||||
ObjFolio.Dispose()
|
||||
End If
|
||||
@@ -183,6 +169,7 @@ Partial Class ListadoViajes
|
||||
TxtFechaViaje.Text = ""
|
||||
'Actualizamos Folio
|
||||
Dim ObjFolios As New ClsGralFolios
|
||||
ObjFolios.IniciaTransacSQL()
|
||||
If ObjFolios.UpdateFolioActual(CveSubProyecto, "Con", True, UsuarioActual.CveEmpresa) Then
|
||||
ObjFolios.Dispose()
|
||||
End If
|
||||
@@ -192,7 +179,6 @@ Partial Class ListadoViajes
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ToggleMasivo(sender As Object, e As EventArgs)
|
||||
DivFechaMasivo.Visible = IsMasivo.Checked
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||
|
||||
Reference in New Issue
Block a user