-
This commit is contained in:
@@ -1,152 +0,0 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
|
||||
Public Class ClsDestinos
|
||||
Implements IDisposable
|
||||
|
||||
#Region "Campos"
|
||||
'SQL
|
||||
Private SqlConexion As SqlConnection
|
||||
Private SqlAdapter As SqlDataAdapter
|
||||
Private SqlCommand As SqlCommand
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private DSet As New DataSet
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
DtResultados = Data
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
Public Property CveDestino As Integer
|
||||
Public Property CveUsuario As Integer
|
||||
Public Property CveEmpresa As Integer
|
||||
Public Property Destino As String
|
||||
Public Property Estatus As Boolean
|
||||
Public Property EsNacional As Boolean
|
||||
Public Property FechaIng As DateTime
|
||||
#End Region
|
||||
|
||||
#Region "Funciones básicas"
|
||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||
|
||||
If TransaccionCompartida Is Nothing Then
|
||||
SqlConexion = New SqlConnection
|
||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
Else
|
||||
SqlConexion = TransaccionCompartida.Connection
|
||||
SqlTransacc = TransaccionCompartida
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
.Parameters.Clear()
|
||||
.CommandText = StrSQL
|
||||
.CommandType = TipoComando
|
||||
End With
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
|
||||
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
SqlAdapter.Fill(Data)
|
||||
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ConexionClose()
|
||||
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
CveConexion = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
Public Function IniciaTransacSQL() As SqlTransaction
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
End Function
|
||||
Public Sub RollBack()
|
||||
SqlTransacc.Rollback()
|
||||
End Sub
|
||||
Public Sub Commit()
|
||||
SqlTransacc.Commit()
|
||||
End Sub
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
If Not disposedValue Then
|
||||
If disposing Then
|
||||
If Not Data Is Nothing Then Data.Dispose() : Data = Nothing
|
||||
If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing
|
||||
If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing
|
||||
If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing
|
||||
If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing
|
||||
If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close()
|
||||
If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing
|
||||
|
||||
End If
|
||||
End If
|
||||
disposedValue = True
|
||||
End Sub
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
#End Region
|
||||
Public Function GetDestinos(Optional CveRuta As Integer = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Trans_DestinosGet")
|
||||
If CveRuta <> 0 Then
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
End With
|
||||
End If
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -9631,9 +9631,9 @@ Public Class ClsPaginas
|
||||
#End Region
|
||||
|
||||
#Region "Transportes"
|
||||
PaginaDict.Add("/Transportes/ListadoContratos.aspx".ToUpper(), 598)
|
||||
PaginaDict.Add("/Transportes/ListadoViajes.aspx".ToUpper(), 599)
|
||||
PaginaDict.Add("/Transportes/ListadoBoletos.aspx".ToUpper(), 600)
|
||||
PaginaDict.Add("/Transportes/RepContratos.aspx".ToUpper(), 598)
|
||||
PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599)
|
||||
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600)
|
||||
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601)
|
||||
#End Region
|
||||
'Antes de aquí.
|
||||
|
||||
@@ -241,7 +241,7 @@ Public Class ClsTransportes
|
||||
#End Region
|
||||
|
||||
#Region "Boletos"
|
||||
Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer) As Integer
|
||||
Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer, CveVendedor As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Trans_ViajesPasajerosAdd")
|
||||
@@ -259,6 +259,7 @@ Public Class ClsTransportes
|
||||
.Add("@Sexo", SqlDbType.Bit).Value = Sexo
|
||||
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
|
||||
End With
|
||||
|
||||
@@ -299,7 +300,7 @@ Public Class ClsTransportes
|
||||
Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional Estatus As Boolean = True, Optional Activar As Boolean = False) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Trans_ViajesPasajerosUpdate")
|
||||
DataAdapter("PA_Trans_ViajesPasajerosUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
@@ -336,6 +337,7 @@ Public Class ClsTransportes
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -217,6 +217,25 @@ Public Class ClsVentas
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function CGame_ManifiestoUpvta(cveVenta As Int32, cveUsuario As Int32, cveEmpresa As Int32, CveManifiesto As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_CGame_ManifiestoUpvta", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = cveVenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@CveManifiesto", SqlDbType.Int).Value = CveManifiesto
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = cveUsuario
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar venta manifiesto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function GetVentaTerminal(CveVentaTerminal As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_VentasGetTerminal")
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlAlmacen_SelectedIndexChanged" DataTextField="Almacen" AppendDataBoundItems="true" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="320px"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" DataTextField="Almacen" AppendDataBoundItems="true" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="320px"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAlmacen" runat="server" ControlToValidate="DdlAlmacen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacen" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -474,7 +474,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CargaPendientes()
|
||||
|
||||
CargaPermisos()
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True
|
||||
|
||||
Dim PermisoEspecialCambioFecha As Boolean = False
|
||||
If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True
|
||||
|
||||
@@ -591,9 +591,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
RecargaporAlmacenes()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub RecargaporAlmacenes()
|
||||
CveTipoAlmacen = -1
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="dvCa" style="width:100%;visibility:hidden;top:40px">
|
||||
<table id="dTable" class="correcto table Widthall "><tr>
|
||||
<table id="dTable" class="correcto table Widthall " runat="server"><tr>
|
||||
<td id="dvArt" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px;width:32.5%;"><b>Producto</b></td>
|
||||
<td id="dvCan" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:30%;border-style: solid;"><b>Cantidad</b></td>
|
||||
<td id="dvImp" runat="server" class="dataTables_scrollHead" style="text-align:center!important;width: 37.5%;font-size:14px;"><b>Importe</b></td>
|
||||
|
||||
@@ -3,6 +3,7 @@ Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports DocumentFormat.OpenXml.Office2013.Excel
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
@@ -101,13 +102,31 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Private Sub CargaPermisos()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
|
||||
If Not TienePermisoImportes Then
|
||||
GvM.Columns(0).HeaderStyle.Width = 268
|
||||
GvM.Columns(4).HeaderStyle.Width = 269
|
||||
GvM.Columns(6).HeaderStyle.Width = 133
|
||||
GvM.Columns(7).HeaderStyle.Width = 133
|
||||
GvM.Columns(8).HeaderStyle.Width = 133
|
||||
GvM.Columns(10).HeaderStyle.Width = 134
|
||||
GvM.CssClass = "table table-smallpadding table-striped table-hover ScrollAD"
|
||||
GvM.Width = 1074
|
||||
dvArt.Attributes.Add("style", "text-align:center!important; font-size:14px;width:537px;")
|
||||
dvCan.Attributes.Add("style", "text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:537px;border-style: solid;")
|
||||
dTable.Attributes.Add("class", "correcto table")
|
||||
dTable.Attributes.Add("style", "width:1074px;")
|
||||
End If
|
||||
|
||||
dvImp.Visible = TienePermisoImportes
|
||||
|
||||
GvM.Columns(11).Visible = TienePermisoImportes
|
||||
GvM.Columns(12).Visible = TienePermisoImportes
|
||||
GvM.Columns(13).Visible = TienePermisoImportes
|
||||
GvM.Columns(14).Visible = TienePermisoImportes
|
||||
GvM.Columns(15).Visible = TienePermisoImportes
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
GvM.Columns(9).Visible = True
|
||||
End If
|
||||
@@ -303,7 +322,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
|
||||
e.Row.CssClass = "Totales"
|
||||
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
|
||||
'e.Row.Cells(0).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("Codigo")}</a>"
|
||||
'e.Row.Cells(0).Text = $"<a Class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("Codigo")}</a>"
|
||||
e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={DdlPS.txtValue.Value}&CveMoneda={DdlMoneda.SelectedValue}&CveProveedor={DdlProveedor.txtValue.Value}&CveConcepto={DdlTipoMovimiento.SelectedValue}&FechaI={TxtFechaI.Text}&FechaF={TxtFechaF.Text}&CveAlmacen={Almacenes}&CvePersonal={DdlPersonal.SelectedValue}&Tipo={DdlMovs.SelectedValue.ToEntero}'>{e.Row.DataKey("PS")}</a>"
|
||||
'e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("PS")}</a>"
|
||||
|
||||
|
||||
@@ -67,14 +67,14 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
<%--<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
<contenttemplate>
|
||||
<li>
|
||||
<asp:HyperLink ID="LBListadoViajes" runat="server" NavigateUrl="ListadoViajes.aspx"
|
||||
Target="_blank"><i class='fa fa-road'></i>Viajes</asp:HyperLink>
|
||||
</li>
|
||||
</contenttemplate>
|
||||
</asp:Content>
|
||||
</asp:Content>--%>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ Partial Class Boletos
|
||||
|
||||
Try
|
||||
AsientoSeleccionado = AsientoSeleccionado.Replace("A", "")
|
||||
Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario)
|
||||
Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If retorno > 1 Then
|
||||
ObjTransporte.Commit()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ Page Language="VB" Title="Transportes V&A - Boletos" AutoEventWireup="false"
|
||||
MasterPageFile="~/Site.master" CodeFile="ListadoBoletos.aspx.vb"
|
||||
MasterPageFile="~/Site.master" CodeFile="RepBoletos.aspx.vb"
|
||||
Inherits="ListadoBoletos" EnableEventValidation="true" %>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -14,9 +14,9 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
<%--<asp:Content ID="Content1" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
</asp:Content>--%>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||
@@ -107,8 +107,6 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Partial Class ListadoBoletos
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If Request.QueryString("CveViaje") Is Nothing Then
|
||||
Response.Redirect("/Transportes/ListadoViajes.aspx")
|
||||
Response.Redirect("/Transportes/RepViajes.aspx")
|
||||
End If
|
||||
CveViaje = Request.QueryString("CveViaje").ToEntero
|
||||
Ruta = Request.QueryString("Ruta")
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="false" Title="Transportes V&A - Contratos" MasterPageFile="~/Site.master"
|
||||
CodeFile="ListadoContratos.aspx.vb"
|
||||
CodeFile="RepContratos.aspx.vb"
|
||||
Inherits="ListadoContratos" %>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -38,14 +38,14 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="LBListadoContratos" runat="server" NavigateUrl="ListadoContratos.aspx"
|
||||
<%-- <li>
|
||||
<asp:HyperLink ID="LBListadoContratos" runat="server" NavigateUrl="RepContratos.aspx"
|
||||
Target="_blank"><i class='fa fa-file'></i>Contratos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="LBListadoViajes" runat="server" NavigateUrl="ListadoViajes.aspx"
|
||||
<asp:HyperLink ID="LBListadoViajes" runat="server" NavigateUrl="RepViajes.aspx"
|
||||
Target="_blank"><i class='fa fa-road'></i>Viajes</asp:HyperLink>
|
||||
</li>
|
||||
</li>--%>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ Page Language="VB" Title="Transportes V&A - Viajes" AutoEventWireup="false" MasterPageFile="~/Site.master"
|
||||
CodeFile="ListadoViajes.aspx.vb"
|
||||
CodeFile="RepViajes.aspx.vb"
|
||||
Inherits="ListadoViajes" %>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -27,14 +27,14 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarViaje" runat="server"><i class='fa fa-plus'></i>Agregar viaje</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<%-- <li>
|
||||
<asp:HyperLink ID="LBListadoContratos" runat="server" NavigateUrl="ListadoContratos.aspx"
|
||||
Target="_blank"><i class='fa fa-file'></i>Contratos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="LBListadoViajes" runat="server" NavigateUrl="ListadoViajes.aspx"
|
||||
Target="_blank"><i class='fa fa-road'></i>Viajes</asp:HyperLink>
|
||||
</li>
|
||||
</li>--%>
|
||||
</contenttemplate>
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,6 +1,5 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class ListadoViajes
|
||||
@@ -70,8 +69,9 @@ Partial Class ListadoViajes
|
||||
End If
|
||||
End If
|
||||
ObjRutas.Dispose()
|
||||
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("Seleccione Chofer", ""))
|
||||
|
||||
@@ -254,7 +254,7 @@ Partial Class ListadoViajes
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveViaje As String = GvRow.DataKey("CveViaje")
|
||||
Dim Ruta As String = GvRow.DataKey("Ruta")
|
||||
Response.Redirect(String.Format("~/Transportes/ListadoBoletos.aspx?CveViaje={0}&Ruta={1}", CveViaje, Ruta))
|
||||
Response.Redirect(String.Format("~/Transportes/RepBoletos.aspx?CveViaje={0}&Ruta={1}", CveViaje, Ruta))
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -579,12 +579,18 @@
|
||||
<asp:Literal ID="LtlKm" runat="server" Text='<%# Eval("Kilometraje") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 39--%>
|
||||
<%-- 40--%>
|
||||
<asp:TemplateField HeaderText="TC" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTC" runat="server" Text='<%# Eval("TipoCambio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 41--%>
|
||||
<asp:TemplateField HeaderText="Descripción Venta" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcionVenta" runat="server" Text='<%# Eval("DescripcionVenta") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
@@ -732,6 +738,11 @@
|
||||
<td style="text-align: left;"> </td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkKilometraje" runat="server" Visible="False" Text=" Kilometraje" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"> </td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkDescripcionVenta" runat="server" Visible="true" Text=" Descripción Venta" /></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -705,6 +705,8 @@ Partial Class RepVentaDetalle
|
||||
|
||||
If ChkTC.Checked Then ListPersonalizada.Add("TC")
|
||||
|
||||
If ChkDescripcionVenta.Checked Then ListPersonalizada.Add("DescripcionVenta")
|
||||
|
||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
||||
'Alert("Personalizacion guardada")
|
||||
End If
|
||||
@@ -889,6 +891,9 @@ Partial Class RepVentaDetalle
|
||||
Case "Kilometraje"
|
||||
ChkKilometraje.Checked = True
|
||||
Exit Select
|
||||
Case "DescripcionVenta"
|
||||
ChkDescripcionVenta.Checked = True
|
||||
Exit Select
|
||||
Case Else
|
||||
Exit Select
|
||||
End Select
|
||||
@@ -947,6 +952,8 @@ Partial Class RepVentaDetalle
|
||||
GvDatos.Columns(38).Visible = ChkUsoCFDI.Checked
|
||||
GvDatos.Columns(39).Visible = ChkKilometraje.Checked
|
||||
GvDatos.Columns(40).Visible = ChkTC.Checked
|
||||
GvDatos.Columns(41).Visible = ChkDescripcionVenta.Checked
|
||||
|
||||
|
||||
Personalizo = 1
|
||||
If Personalizo = 1 Then
|
||||
|
||||
@@ -2678,8 +2678,7 @@ Partial Class Ventas
|
||||
Using ObjVentas As New ClsCGame()
|
||||
|
||||
If ObjVentas.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then
|
||||
'DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString())
|
||||
DdlSubProyectoDatos.SelectedValueExist("12629")
|
||||
DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString())
|
||||
End If
|
||||
|
||||
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveManifiesto").ToEntero()) Then
|
||||
@@ -10129,6 +10128,12 @@ Partial Class Ventas
|
||||
|
||||
If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||
|
||||
End If
|
||||
End If
|
||||
If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then
|
||||
|
||||
If ObjVentas.CGame_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveManifiesto").ToEntero()) Then
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -13184,6 +13189,23 @@ Partial Class Ventas
|
||||
Dim DescripcionVenta As String = ""
|
||||
If TxtDescripcionVenta.Text <> "" Then DescripcionVenta = TxtDescripcionVenta.Text
|
||||
|
||||
|
||||
Dim CveMedico As Integer = -1
|
||||
Dim CveProcedimiento As Integer = -1
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
If SeEstaFActurandoVentaMedica Then
|
||||
CveMedico = DdlMedicoObservaciones.SelectedValue.ToEntero
|
||||
CveProcedimiento = DdlProcedimientoObservaciones.SelectedValue.ToEntero
|
||||
Else
|
||||
CveMedico = DdlMedico.SelectedValue.ToEntero
|
||||
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
@@ -13201,7 +13223,7 @@ Partial Class Ventas
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then
|
||||
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
||||
@@ -32173,6 +32195,8 @@ Partial Class Ventas
|
||||
End Function
|
||||
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
||||
|
||||
|
||||
|
||||
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then
|
||||
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -32206,6 +32230,9 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso TipoDoctoNuevo = "Ing" Then
|
||||
SeEstaFActurandoVentaMedica = True
|
||||
End If
|
||||
|
||||
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
|
||||
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
||||
@@ -33649,6 +33676,11 @@ Partial Class Ventas
|
||||
DdlUsoCFDI.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
DdlMedicoObservaciones.Enabled = True
|
||||
DdlProcedimientoObservaciones.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(289) Then
|
||||
If LblSeTimbro.Text = "No" Then
|
||||
DdlUsoCFDI.Enabled = False
|
||||
@@ -33687,8 +33719,12 @@ Partial Class Ventas
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
DdlMedicoObservaciones.Enabled = True
|
||||
DdlProcedimientoObservaciones.Enabled = True
|
||||
|
||||
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim) Then
|
||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
|
||||
CveMedico:=DdlMedicoObservaciones.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimientoObservaciones.SelectedValue.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
@@ -35024,6 +35060,20 @@ Partial Class Ventas
|
||||
End Property
|
||||
|
||||
|
||||
Property SeEstaFActurandoVentaMedica As Boolean
|
||||
Get
|
||||
If ViewState("SeEstaFActurandoVentaMedica") Is Nothing Then
|
||||
ViewState("SeEstaFActurandoVentaMedica") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("SeEstaFActurandoVentaMedica").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("SeEstaFActurandoVentaMedica") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user