-
This commit is contained in:
@@ -423,7 +423,7 @@ Public Class ClsContratos
|
|||||||
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.0, 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 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 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 CveRuta As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Boolean
|
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
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Con_ContratosUpdate")
|
DataAdapter("PA_Con_ContratosUpdate")
|
||||||
@@ -484,7 +484,6 @@ Public Class ClsContratos
|
|||||||
.Add("@CveChofer2", SqlDbType.Int).Value = CveChofer2
|
.Add("@CveChofer2", SqlDbType.Int).Value = CveChofer2
|
||||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||||
.Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros
|
.Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros
|
||||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
|
||||||
.Add("@CvePartida", SqlDbType.Int).Value = CvePartida
|
.Add("@CvePartida", SqlDbType.Int).Value = CvePartida
|
||||||
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||||
.Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo
|
.Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #45b6af;
|
color: #45b6af;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight:bold;
|
font-weight: bold;
|
||||||
border-radius:5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disponible:hover, .disponible.activo {
|
.disponible:hover, .disponible.activo {
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
border: 2px solid #F3565D;
|
border: 2px solid #F3565D;
|
||||||
background-color: #F3565D;
|
background-color: #F3565D;
|
||||||
margin: .1px;
|
margin: .1px;
|
||||||
cursor:no-drop;
|
cursor: no-drop;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight:bold;
|
font-weight: bold;
|
||||||
border-radius:5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nodisponible:hover {
|
.nodisponible:hover {
|
||||||
@@ -89,14 +89,15 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel runat="server" ID="UpTabContainer">
|
<asp:UpdatePanel runat="server" ID="UpTabContainer" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<%-- Pestañas --%>
|
||||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||||
<%-- Información General --%>
|
<%-- Información General --%>
|
||||||
<ajax:TabPanel runat="server" HeaderText="Información General" CssClass="tabBodyOverride">
|
<ajax:TabPanel runat="server" HeaderText="Información General" CssClass="tabBodyOverride">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<%-- Datos del Contrato --%>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<%-- Datos del Contrato --%>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<div class="portlet light bordered">
|
<div class="portlet light bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
@@ -114,6 +115,7 @@
|
|||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-4 bold text-primary">Folio</label>
|
<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="Folio"></asp:Label>
|
||||||
|
<asp:Label runat="server" ID="LbCveSubProyecto" Visible="false"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
@@ -246,8 +248,45 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center; padding-top: 20px;">
|
||||||
|
<asp:Button runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar"
|
||||||
|
CssClass="btn btn-primary" OnClick="UpdateContrato" />
|
||||||
|
<asp:Button runat="server" Text="Eliminar" CssClass="btn btn-danger"
|
||||||
|
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de eliminar el contrato?(Si es contrato masivo, se eliminarán todos)"
|
||||||
|
data-btn-ok-label="si" OnClick="EliminarContrato" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<%-- Contrato Digitalizado --%>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<div class="portlet light bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript;" data-idchekbox="C_chkexpand1" class=" collapse" data-original-title=""
|
||||||
|
title=""></a><span class="hidden">
|
||||||
|
<input id="C_chkexpand1" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||||
|
</div>
|
||||||
|
<div class="caption uppercase" style="position: relative;">
|
||||||
|
<i class="fa fa-info-circle"></i>Contrato Digitalizado
|
||||||
|
</div>
|
||||||
|
</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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
@@ -341,7 +380,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
<%-- Modal Editar Boleto --%>
|
<%-- Modal Editar Boleto --%>
|
||||||
@@ -789,6 +827,39 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<%--Modal subir archivo--%>
|
||||||
|
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Subir Archivo</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary"
|
||||||
|
OnClick="GuardarArchivo" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.IO
|
||||||
Imports ADSNetLibrary.Helpers
|
Imports ADSNetLibrary.Helpers
|
||||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
@@ -18,6 +19,22 @@ Partial Class RepContratoDetalle
|
|||||||
ViewState("CveContrato") = value
|
ViewState("CveContrato") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property CveContratoTipo As Integer
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("CveContratoTipo"), Integer)
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveContratoTipo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property CveMasivo As Integer
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("CveMasivo"), Integer)
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveMasivo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property CveViajePasajero As Integer
|
Private Property CveViajePasajero As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("CveViajePasajero"), Integer)
|
Return CType(ViewState("CveViajePasajero"), Integer)
|
||||||
@@ -60,6 +77,7 @@ Partial Class RepContratoDetalle
|
|||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
#Region "Carga Página"
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Request("CveContrato") Is Nothing Then
|
If Request("CveContrato") Is Nothing Then
|
||||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||||
@@ -85,8 +103,11 @@ Partial Class RepContratoDetalle
|
|||||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
Contrato = ObjContratos.DtResultados
|
Contrato = ObjContratos.DtResultados
|
||||||
If Contrato IsNot Nothing AndAlso Contrato.Rows.Count > 0 Then
|
If Contrato IsNot Nothing AndAlso Contrato.Rows.Count > 0 Then
|
||||||
|
CveContratoTipo = Contrato.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||||
SubProyecto = Contrato.Rows(0)("SubProyecto").ToString
|
SubProyecto = Contrato.Rows(0)("SubProyecto").ToString
|
||||||
|
CveMasivo = Contrato.Rows(0)("CveMasivo").ToString.ToEntero
|
||||||
LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString
|
LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString
|
||||||
|
LbCveSubProyecto.Text = Contrato.Rows(0)("CveSubProyecto").ToString
|
||||||
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
|
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
|
||||||
DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString
|
DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString
|
||||||
TxtDescripcion.Text = Contrato.Rows(0)("DescripcionContrato").ToString
|
TxtDescripcion.Text = Contrato.Rows(0)("DescripcionContrato").ToString
|
||||||
@@ -99,6 +120,12 @@ Partial Class RepContratoDetalle
|
|||||||
TxtDolares.Text = Contrato.Rows(0)("Importe").ToString
|
TxtDolares.Text = Contrato.Rows(0)("Importe").ToString
|
||||||
TxtPesos.Text = Contrato.Rows(0)("ImporteMax").ToString
|
TxtPesos.Text = Contrato.Rows(0)("ImporteMax").ToString
|
||||||
TxtAnticipo.Text = Contrato.Rows(0)("ImporteMin").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
|
||||||
|
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "CONTRATOS", ObjContratos.Archivo)
|
||||||
|
End If
|
||||||
'Boletos Vendidos
|
'Boletos Vendidos
|
||||||
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
|
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
|
||||||
TabBoletos.Visible = True
|
TabBoletos.Visible = True
|
||||||
@@ -117,73 +144,133 @@ Partial Class RepContratoDetalle
|
|||||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||||
End If
|
End If
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
#End Region
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
|
||||||
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
#Region "Información General"
|
||||||
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
Protected Sub GuardarArchivo(sender As Object, e As EventArgs)
|
||||||
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
Dim FileExtension As String = "-1"
|
||||||
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||||
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
Dim Filename As String = ""
|
||||||
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
Dim folderContratosPath As String = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos")
|
||||||
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
|
||||||
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
If Not Directory.Exists(folderContratosPath) Then
|
||||||
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
Directory.CreateDirectory(folderContratosPath)
|
||||||
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
End If
|
||||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
|
||||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
If Not Directory.Exists(Path.Combine(folderContratosPath, "Temp")) Then
|
||||||
Dim Estatus As Boolean = Not LbEstatus.Text.ToBool
|
Directory.CreateDirectory(Path.Combine(folderContratosPath, "Temp"))
|
||||||
Dim ObjTransportes As New ClsTransportes
|
End If
|
||||||
|
|
||||||
|
For Each fileItem As Archivo In Filesgral
|
||||||
|
|
||||||
|
FileExtension = IO.Path.GetExtension($"{AppDomain.CurrentDomain.BaseDirectory}Temp\{fileItem.filename}").Replace(".", "")
|
||||||
|
Session("FileExtension") = FileExtension
|
||||||
|
Dim tempArray() As String
|
||||||
|
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||||
|
|
||||||
|
|
||||||
|
ViewState("extencion") = FileExtension
|
||||||
|
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", fileItem.filename)
|
||||||
|
|
||||||
|
File.Move(fileItem.FileUrl, ViewState("FUrl").ToString)
|
||||||
|
TxtArchivo.Text = tempArray(1)
|
||||||
|
' imgFileOk.Visible = True
|
||||||
|
'ImgArchivo.Src = "/imagenes/accept.png"
|
||||||
|
Next
|
||||||
|
|
||||||
|
UpTabContainer.Update()
|
||||||
|
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||||
|
Button1.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)
|
||||||
|
Dim File As New FileInfo(ViewState("FUrl").ToString)
|
||||||
|
|
||||||
|
If File.Exists Then 'set appropriate headers
|
||||||
|
Response.Clear()
|
||||||
|
Response.ClearHeaders()
|
||||||
|
Response.ClearContent()
|
||||||
|
Response.AddHeader("Content-Disposition", "attachment; filename=" & LbFolio.Text & ".pdf")
|
||||||
|
Response.AddHeader("Content-Length", File.Length.ToString())
|
||||||
|
'Response.ContentType = "text/plain"
|
||||||
|
Response.ContentType = "application/octet-stream"
|
||||||
|
Response.Flush()
|
||||||
|
' Response.TransmitFile(File.FullName)
|
||||||
|
Response.WriteFile(File.FullName)
|
||||||
|
Response.End()
|
||||||
|
'if file does not exist
|
||||||
|
|
||||||
|
Alert("Descargado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
||||||
|
|
||||||
|
End If 'nothing in the URL as HTTP GET
|
||||||
|
End Sub
|
||||||
|
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||||
|
Dim ObjContratos As New ClsContratos
|
||||||
Try
|
Try
|
||||||
ObjTransportes.IniciaTransacSQL()
|
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
|
||||||
|
Alert("Contrato actualizado correctamente")
|
||||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, CveContrato, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, LbNombre.Text, LbVisa.Text, LbCelular.Text, LbObservacion.Text, Estatus, UsuarioActual.CveUsuario, LbSexo.Text.ToBool) Then
|
|
||||||
Alert($"El boleto ha modificado el estatus de su boleto correctamente.")
|
|
||||||
|
|
||||||
ObjTransportes.Commit()
|
|
||||||
End If
|
End If
|
||||||
|
ObjContratos.Commit()
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ObjTransportes.RollBack()
|
Alert($"Ocurrió un ocurrió un error al actualizar su boleto", TipoMensaje.MsgError)
|
||||||
Alert($"No se pudo cambiar el estatus del boleto", TipoMensaje.MsgError)
|
ObjContratos.RollBack()
|
||||||
Finally
|
Finally
|
||||||
ObjTransportes.Dispose()
|
Alert("Contrato actualizado correctamente")
|
||||||
|
ObjContratos.Dispose()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub CambiarBoleto(sender As Object, e As EventArgs)
|
Protected Sub EliminarContrato(sender As Object, e As EventArgs)
|
||||||
DdlRuta.ClearSelection()
|
|
||||||
PnEditarViaje.Visible = True
|
|
||||||
PnEditarUsuario.Visible = False
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
|
||||||
|
|
||||||
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
|
||||||
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
|
||||||
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
|
||||||
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
|
||||||
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
|
||||||
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
|
||||||
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
|
||||||
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
|
||||||
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
|
||||||
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
|
||||||
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
|
||||||
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
|
||||||
|
|
||||||
'Seleccionamos la ruta que tiene el usuario actual
|
|
||||||
DdlRuta.ClearSelection()
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, -1, CveEstatus:=-1, CveTipoContrato:=35) Then
|
If (CveContratoTipo = 35) Then
|
||||||
For Each row As DataRow In ObjContratos.DtResultados.Rows
|
If CveMasivo <> 0 Then
|
||||||
Dim fecha As DateTime = row("FechaInicial").ToString.ToDateTime
|
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa, CveMasivo:=CveMasivo) Then
|
||||||
' Asigna los valores de la columna deseada al ListItem
|
Alert("Viajes masivos eliminados correctamente")
|
||||||
Dim listItem As New ListItem(row("SubProyecto").ToString() + " - " + fecha.ToShortDateString + " - " + fecha.ToShortTimeString, row("CveContrato").ToString())
|
ObjContratos.Dispose()
|
||||||
' Agrega el ListItem al DropDownList
|
Response.Redirect("RepViajes.aspx")
|
||||||
DdlRuta.Items.Add(listItem)
|
End If
|
||||||
Next
|
Else
|
||||||
|
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
|
Alert("Viaje eliminado correctamente")
|
||||||
|
ObjContratos.Dispose()
|
||||||
|
Response.Redirect("RepViajes.aspx")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If ObjContratos.RemoveContrato(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
|
Alert("Contrato eliminado correctamente")
|
||||||
|
ObjContratos.Dispose()
|
||||||
|
Response.Redirect("RepContratos.aspx")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje")
|
|
||||||
ObjContratos.Dispose()
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Boletos"
|
||||||
|
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
|
||||||
|
'Limpiamos la selección anterior
|
||||||
|
If AsientoSeleccionado <> "" Then
|
||||||
|
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||||
|
Dim lnk As LinkButton = CType(cph.FindControl(AsientoSeleccionado), LinkButton)
|
||||||
|
lnk.CssClass = "disponible"
|
||||||
|
End If
|
||||||
|
'Seleccionamos un asiento
|
||||||
|
Dim linkButton As LinkButton = DirectCast(sender, LinkButton)
|
||||||
|
Dim buttonID As String = linkButton.ID
|
||||||
|
linkButton.CssClass += " activo"
|
||||||
|
AsientoSeleccionado = buttonID
|
||||||
|
TxtAsiento.Text = buttonID.Substring(1)
|
||||||
|
|
||||||
|
UpBoletos.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub UpdateBoleto(sender As Object, e As EventArgs)
|
Protected Sub UpdateBoleto(sender As Object, e As EventArgs)
|
||||||
@@ -211,26 +298,6 @@ Partial Class RepContratoDetalle
|
|||||||
CargaDatos()
|
CargaDatos()
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub EditarBoleto(sender As Object, e As EventArgs)
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
|
|
||||||
'Limpiamos la selección anterior
|
|
||||||
If AsientoSeleccionado <> "" Then
|
|
||||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
|
||||||
Dim lnk As LinkButton = CType(cph.FindControl(AsientoSeleccionado), LinkButton)
|
|
||||||
lnk.CssClass = "disponible"
|
|
||||||
End If
|
|
||||||
'Seleccionamos un asiento
|
|
||||||
Dim linkButton As LinkButton = DirectCast(sender, LinkButton)
|
|
||||||
Dim buttonID As String = linkButton.ID
|
|
||||||
linkButton.CssClass += " activo"
|
|
||||||
AsientoSeleccionado = buttonID
|
|
||||||
TxtAsiento.Text = buttonID.Substring(1)
|
|
||||||
|
|
||||||
UpBoletos.Update()
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
|
||||||
End Sub
|
|
||||||
Protected Sub OnChangeRuta(sender As Object, e As EventArgs)
|
Protected Sub OnChangeRuta(sender As Object, e As EventArgs)
|
||||||
Dim ObjTransportes As New ClsTransportes
|
Dim ObjTransportes As New ClsTransportes
|
||||||
|
|
||||||
@@ -292,6 +359,79 @@ Partial Class RepContratoDetalle
|
|||||||
'Empresas/188/Formatos/Boleto.mrt
|
'Empresas/188/Formatos/Boleto.mrt
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub EditarBoleto(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
||||||
|
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
||||||
|
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
||||||
|
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
||||||
|
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||||
|
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||||
|
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||||
|
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||||
|
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||||
|
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||||
|
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||||
|
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||||
|
|
||||||
|
'Seleccionamos la ruta que tiene el usuario actual
|
||||||
|
DdlRuta.ClearSelection()
|
||||||
|
Dim ObjContratos As New ClsContratos
|
||||||
|
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
|
||||||
|
Dim listItem As New ListItem(row("SubProyecto").ToString() + " - " + fecha.ToShortDateString + " - " + fecha.ToShortTimeString, row("CveContrato").ToString())
|
||||||
|
' Agrega el ListItem al DropDownList
|
||||||
|
DdlRuta.Items.Add(listItem)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
DdlRuta.SelectedValue = GvRow.DataKey("CveViaje")
|
||||||
|
ObjContratos.Dispose()
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalEditar"))
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
CveViajePasajero = GvRow.DataKey("CveViajePasajero").ToEntero
|
||||||
|
LbPartida.Text = GvRow.DataKey("Partida").ToString()
|
||||||
|
LbDestino.Text = GvRow.DataKey("Destino").ToString()
|
||||||
|
LbImporte.Text = Convert.ToDecimal(GvRow.DataKey("Importe")).ToString("C")
|
||||||
|
LbNombre.Text = GvRow.DataKey("Nombre").ToString()
|
||||||
|
LbVisa.Text = GvRow.DataKey("Visa").ToString()
|
||||||
|
LbCelular.Text = GvRow.DataKey("Celular").ToString()
|
||||||
|
LbSexo.Text = GvRow.DataKey("Sexo").ToString()
|
||||||
|
LbObservacion.Text = GvRow.DataKey("Observacion").ToString()
|
||||||
|
LbEstatus.Text = GvRow.DataKey("Estatus").ToString()
|
||||||
|
LbCreado.Text = GvRow.DataKey("FechaIng").ToString()
|
||||||
|
TxtAsiento.Text = GvRow.DataKey("Asiento").ToString()
|
||||||
|
Dim Estatus As Boolean = Not LbEstatus.Text.ToBool
|
||||||
|
Dim ObjTransportes As New ClsTransportes
|
||||||
|
Try
|
||||||
|
ObjTransportes.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero, CveContrato, UsuarioActual.CveVendedor, LbImporte.Text.ToDecimal, TxtAsiento.Text.ToEntero, LbNombre.Text, LbVisa.Text, LbCelular.Text, LbObservacion.Text, Estatus, UsuarioActual.CveUsuario, LbSexo.Text.ToBool) Then
|
||||||
|
Alert($"El boleto ha modificado el estatus de su boleto correctamente.")
|
||||||
|
|
||||||
|
ObjTransportes.Commit()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
ObjTransportes.RollBack()
|
||||||
|
Alert($"No se pudo cambiar el estatus del boleto", TipoMensaje.MsgError)
|
||||||
|
Finally
|
||||||
|
ObjTransportes.Dispose()
|
||||||
|
CargaDatos()
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -243,7 +243,8 @@
|
|||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-4">Cliente</label>
|
<label class="col-md-4">Cliente</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<ADS:Dropdownlost CssClassDdl="select2me form-control" ID="DdlClientes" Width="86%" data-metodo="getcliente"
|
<ADS:Dropdownlost CssClassDdl="select2me form-control" ID="DdlClientes" Width="86%"
|
||||||
|
data-metodo="getcliente"
|
||||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;"
|
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;"
|
||||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||||
<asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%"
|
<asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%"
|
||||||
@@ -371,7 +372,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-4">Moneda</label>
|
<label class="col-md-4">Moneda</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
@@ -388,13 +388,21 @@
|
|||||||
</ajax:ValidatorCalloutExtender>
|
</ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Archivo</label>
|
||||||
|
<asp:Label ID="LbArchivo" runat="server" CssClass="col-md-8" Text=""></asp:Label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:Button ID="BtnGuardar" OnClick="AddContrato" runat="server" CssClass="btn btn-primary"
|
<asp:Button ID="BtnGuardar" OnClick="AddContrato" runat="server" CssClass="btn btn-primary"
|
||||||
Text="Agregar"
|
Text="Agregar"
|
||||||
ValidationGroup="GrpGuardar"></asp:Button>
|
ValidationGroup="GrpGuardar"></asp:Button>
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
<button type="button" class="btn btn-secondary" runat="server" clientidmode="Static"
|
||||||
|
id="BtnArchivo" data-toggle="modal" data-target="#ModalUpload" visible="true"><i class="fa fa-upload"
|
||||||
|
aria-hidden="true"></i>Subir Archivo</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -434,7 +442,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<%--MODAL UPLOAD--%>
|
||||||
|
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Subir Archivo</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary"
|
||||||
|
OnClick="GuardarArchivo" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Extensiones.ModExtensiones
|
Imports Extensiones.ModExtensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
@@ -18,6 +19,8 @@ Partial Class ListadoContratos
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
#Region "Carga Página"
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
||||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString
|
txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString
|
||||||
@@ -71,6 +74,8 @@ Partial Class ListadoContratos
|
|||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
Protected Sub MostrarModal()
|
Protected Sub MostrarModal()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -84,6 +89,15 @@ Partial Class ListadoContratos
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Agregamos Contrato
|
||||||
|
Dim ObjContratos As New ClsContratos
|
||||||
|
ObjContratos.IniciaTransacSQL()
|
||||||
|
If 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) > 0 Then
|
||||||
|
ObjContratos.Commit()
|
||||||
|
Alert("Agregado Correctamente.")
|
||||||
|
End If
|
||||||
|
ObjContratos.Dispose()
|
||||||
|
|
||||||
'Aumentamos Folio
|
'Aumentamos Folio
|
||||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||||
Dim ObjFolios As New ClsGralFolios
|
Dim ObjFolios As New ClsGralFolios
|
||||||
@@ -91,15 +105,6 @@ Partial Class ListadoContratos
|
|||||||
ObjFolios.Dispose()
|
ObjFolios.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Agregamos Contrato
|
|
||||||
Dim ObjContratos As New ClsContratos
|
|
||||||
ObjContratos.IniciaTransacSQL()
|
|
||||||
If 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, "", "", -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) > 0 Then
|
|
||||||
ObjContratos.Commit()
|
|
||||||
Alert("Agregado Correctamente.")
|
|
||||||
End If
|
|
||||||
ObjContratos.Dispose()
|
|
||||||
|
|
||||||
'Reiniciamos modal
|
'Reiniciamos modal
|
||||||
TxtDescripcion.Text = ""
|
TxtDescripcion.Text = ""
|
||||||
TxtFechaSalida.Text = ""
|
TxtFechaSalida.Text = ""
|
||||||
@@ -112,10 +117,11 @@ Partial Class ListadoContratos
|
|||||||
TxtPesos.Text = ""
|
TxtPesos.Text = ""
|
||||||
TxtAnticipo.Text = ""
|
TxtAnticipo.Text = ""
|
||||||
TxtCantidadPasajeros.Text = ""
|
TxtCantidadPasajeros.Text = ""
|
||||||
|
LbArchivo.Text = ""
|
||||||
|
|
||||||
UpModal.Update()
|
UpModal.Update()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
RegistraScript("$('#ModalAgregar').modal('hide')", "hidemodal1")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||||
@@ -153,4 +159,35 @@ Partial Class ListadoContratos
|
|||||||
GvContratos.Columns(8).Visible = ChkUnidad.Checked
|
GvContratos.Columns(8).Visible = ChkUnidad.Checked
|
||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub GuardarArchivo(sender As Object, e As EventArgs)
|
||||||
|
Dim FileExtension As String = "-1"
|
||||||
|
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||||
|
Dim Filename As String = ""
|
||||||
|
Dim folderContratosPath As String = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos")
|
||||||
|
|
||||||
|
If Not Directory.Exists(folderContratosPath) Then
|
||||||
|
Directory.CreateDirectory(folderContratosPath)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not Directory.Exists(Path.Combine(folderContratosPath, "Temp")) Then
|
||||||
|
Directory.CreateDirectory(Path.Combine(folderContratosPath, "Temp"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each fileItem As Archivo In Filesgral
|
||||||
|
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())
|
||||||
|
|
||||||
|
|
||||||
|
ViewState("extencion") = FileExtension
|
||||||
|
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", fileItem.filename)
|
||||||
|
|
||||||
|
File.Move(fileItem.FileUrl, ViewState("FUrl").ToString)
|
||||||
|
LbArchivo.Text = fileItem.filenameO
|
||||||
|
Next
|
||||||
|
|
||||||
|
UpModal.Update()
|
||||||
|
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user