Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -287,3 +287,4 @@ vwd.webinfo
|
||||
/A/CatEstatusIE.aspx.vb
|
||||
/A/a.aspx
|
||||
/A/a.aspx.vb
|
||||
/General/Report.rdlc
|
||||
|
||||
@@ -3,7 +3,9 @@ Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports CrystalDecisions.[Shared].Json
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Ajax.Utilities
|
||||
Imports Profact.TimbraCFDI40
|
||||
|
||||
|
||||
@@ -2053,17 +2055,25 @@ Public Class ClsRH
|
||||
|
||||
.Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo
|
||||
|
||||
.Add("@ErrorMostrarADS", SqlDbType.VarChar).Direction = ParameterDirection.Output
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
End With
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
_CvePersonal = SqlAdapter.SelectCommand.Parameters("@RETURN_VALUE").Value.ToString.ToEntero
|
||||
SqlAdapter.SelectCommand.ExecuteNonQuery()
|
||||
|
||||
'SqlAdapter.Fill(Data)
|
||||
_CvePersonal = SqlAdapter.SelectCommand.Parameters("@RETURN_VALUE").Value.ToString().ToEntero()
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
'dbo.Vw_Val_Nom_Curps
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Dim ErrorMostrarADS As String = trygetparameter("@ErrorMostrarADS")
|
||||
|
||||
'dbo.Vw_Val_Nom_Curps
|
||||
If Not (ErrorMostrarADS.IsNullOrWhiteSpace()) Then
|
||||
Alert(ErrorMostrarADS, TipoMensaje.MsgAdvertencia)
|
||||
ElseIf Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("El nuevo personal no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
|
||||
ElseIf Ex1.Message.Contains("Chk_RH_PersonalSalarioIMSS") Then
|
||||
Alert("El nuevo personal no se guardo debido a que se presento un problema al calcular el salario", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2077,11 +2087,26 @@ Public Class ClsRH
|
||||
Me.OnError("Ocurrió un error al guardar el nuevo personal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el nuevo personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Dim ErrorMostrarADS As String = trygetparameter("@ErrorMostrarADS")
|
||||
|
||||
If Not (ErrorMostrarADS.IsNullOrWhiteSpace()) Then
|
||||
Alert(ErrorMostrarADS, TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
OnError("Ocurrió un error al guardar el nuevo personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Function trygetparameter(parametername As String) As String
|
||||
Try
|
||||
Return SqlAdapter.SelectCommand.Parameters(parametername).Value.ToString()
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function UpdatePersonal(Codigo As String, APaterno As String, AMaterno As String, Nombres As String, Correo As String, FechaIngreso As Date, CveTipoPeriodo As Integer, NumeroSS As String, SeInscribioSS As Boolean, SalarioDiarioPago As Double, SalarioDiario As Double, SDI As Double,
|
||||
SalarioDiarioSS As Double, Bono As Double, NumDiasAguinaldo As Integer, PorPrimaVacacional As Double, CveMetodoPago As Integer, FechaInicioContrato As Date, FechaFinContrato As String,
|
||||
|
||||
@@ -91,7 +91,12 @@
|
||||
<asp:HyperLink ID="HplNombreCompleto" runat="server" Text='<%# Eval("NombreCompleto") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Fin">
|
||||
<asp:TemplateField HeaderText="Fecha Alta">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Baja">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -107,7 +107,22 @@ Partial Class Boletos
|
||||
ObjContratos.Dispose()
|
||||
ObjViaje.Dispose()
|
||||
|
||||
Dim ObjViaje As New ClsTransportes
|
||||
|
||||
'Boletos Vendidos
|
||||
Dim dt As DataTable
|
||||
If ObjViaje.GetViajesPasajeros(CveViaje, Estatus:=1) Then 'Poner párametro para estatus y cancelado de viajes
|
||||
dt = ObjViaje.DtResultados
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
For Each dr As DataRow In dt.Rows
|
||||
Dim lnk As LinkButton = CType(cph.FindControl($"A{dr("Asiento")}"), LinkButton)
|
||||
If lnk IsNot Nothing Then
|
||||
lnk.Enabled = False
|
||||
lnk.CssClass = "nodisponible"
|
||||
lnk.ToolTip = dr("Nombre").ToString
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub InicializaCombos()
|
||||
|
||||
@@ -184,9 +184,76 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%-- Boletos --%>
|
||||
<ajax:TabPanel runat="server" HeaderText="Boletos" CssClass="row" Visible="false" ID="TabBoletos">
|
||||
<ajax:TabPanel runat="server" HeaderText="Boletos" CssClass="row" Visible="false"
|
||||
ID="TabBoletos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvViajesPasajeros" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveViajePasajero,Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe,FechaIng, Agencia, TelefonoAgencia">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="No. Asiento">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAsiento" runat="server" Text='<%# Eval("Asiento") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Visa">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVisa" runat="server" Text='<%# Eval("Visa") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sexo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSexo" runat="server" Text='<%# If(Eval("Sexo").ToString = "True", "Masculino", "Femenino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Cancelado") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Partida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:n}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />
|
||||
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
|
||||
data-btn-ok-label="si" OnClick="BtnCancelar_Click" />
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
||||
OnClick="ImprimirBoleto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
@@ -4,6 +4,8 @@ Imports System.Data
|
||||
Imports ADSNetLibrary.Helpers
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
|
||||
Partial Class RepContratoDetalle
|
||||
@@ -42,6 +44,7 @@ Partial Class RepContratoDetalle
|
||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
'Información General
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
Contrato = ObjContratos.DtResultados
|
||||
@@ -49,9 +52,6 @@ Partial Class RepContratoDetalle
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
End If
|
||||
|
||||
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
|
||||
TabBoletos.Visible = True
|
||||
End If
|
||||
|
||||
LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString
|
||||
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
|
||||
@@ -66,10 +66,71 @@ Partial Class RepContratoDetalle
|
||||
TxtDolares.Text = Contrato.Rows(0)("Importe").ToString
|
||||
TxtPesos.Text = Contrato.Rows(0)("ImporteMax").ToString
|
||||
TxtAnticipo.Text = Contrato.Rows(0)("ImporteMin").ToString
|
||||
'Boletos Vendidos
|
||||
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
|
||||
TabBoletos.Visible = True
|
||||
End If
|
||||
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
If ObjTransportes.GetViajesPasajeros(CveContrato) Then
|
||||
GvViajesPasajeros.DataSource = ObjTransportes.DtResultados
|
||||
GvViajesPasajeros.DataBind()
|
||||
ObjTransportes.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveViajePasajero As String = GvRow.DataKey("CveViajePasajero")
|
||||
Dim Estatus As String = GvRow.DataKey("Estatus")
|
||||
Dim cambiarEstatus As Boolean = Not Estatus.ToBool
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
Try
|
||||
If ObjTransportes.UpdateViajesPasajeros(CveViajePasajero.ToEntero, Activar:=cambiarEstatus, Estatus:=cambiarEstatus) Then
|
||||
If Not cambiarEstatus Then
|
||||
Alert($"El boleto ha sido cancelado correctamente.")
|
||||
Else
|
||||
Alert($"El boleto ha sido reactivado correctamente.")
|
||||
End If
|
||||
End If
|
||||
ObjTransportes.Commit()
|
||||
Catch ex As Exception
|
||||
ObjTransportes.RollBack()
|
||||
Alert($"No se pudo cambiar el estatus del boleto {ex}", TipoMensaje.MsgError)
|
||||
Finally
|
||||
ObjTransportes.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Protected Sub ImprimirBoleto(sender As Object, e As EventArgs)
|
||||
Dim dtResult As New DataTable()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Fecha As Date = GvRow.DataKey("FechaIng").ToDate
|
||||
Dim Importe As Decimal = GvRow.DataKey("Importe").ToDecimal
|
||||
|
||||
Dim params As New List(Of ReportParameter) From {
|
||||
New ReportParameter("Ruta", GvRow.DataKey("Ruta")),
|
||||
New ReportParameter("Origen", GvRow.DataKey("Partida")),
|
||||
New ReportParameter("Destino", GvRow.DataKey("Destino")),
|
||||
New ReportParameter("FechaSalida", Fecha.ToShortDateString()),
|
||||
New ReportParameter("HoraSalida", Fecha.ToString("HH:mm")),
|
||||
New ReportParameter("Nombre", GvRow.DataKey("Nombre")),
|
||||
New ReportParameter("Visa", GvRow.DataKey("Visa")),
|
||||
New ReportParameter("Celular", GvRow.DataKey("Celular")),
|
||||
New ReportParameter("Importe", Math.Round(Importe, 1).ToString),
|
||||
New ReportParameter("TipoBoleto", "Tipo Boleto"),
|
||||
New ReportParameter("Agencia", GvRow.DataKey("Agencia")),
|
||||
New ReportParameter("TelefonoAgencia", GvRow.DataKey("TelefonoAgencia")),
|
||||
New ReportParameter("Asiento", GvRow.DataKey("Asiento"))
|
||||
}
|
||||
|
||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Boleto.mrt", dtResult, params, NombreArchivo:="Boleto")
|
||||
'Empresas/Grales/Formatos/EntradaSalida.mrt
|
||||
'Empresas/188/Formatos/Boleto.mrt
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user