This commit is contained in:
2024-02-16 19:13:22 -07:00
14 changed files with 524 additions and 224 deletions

1
.gitignore vendored
View File

@@ -287,3 +287,4 @@ vwd.webinfo
/A/CatEstatusIE.aspx.vb
/A/a.aspx
/A/a.aspx.vb
/General/Report.rdlc

View File

@@ -124,8 +124,8 @@ Partial Class AF_CatAF
DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Private Sub CargaResponsable()
DdlResponsable.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
Dim DtPersonal = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
DdlResponsable.DataSource = DtPersonal
DdlResponsable.DataBind()
End Sub
Protected Sub DdlTipoActivo_SelectedIndexChanged(sender As Object, e As EventArgs)

View File

@@ -209,6 +209,18 @@ Partial Class Acumuladores_RepRecolecciones
End Sub
Private Sub BtnModalRecoleccionGuardar_Click(sender As Object, e As EventArgs) Handles BtnModalRecoleccionGuardar.Click
Dim Cantidad As Decimal = HdnCantidadRecoleccion.Value.ToDecimal
Dim CantidadDefinido As Decimal = 0
For Each gvr As GridViewRow In GvModalPSRecoleccion.Rows
CantidadDefinido += gvr.DataKey("Cantidad").ToDecimal
Next
If CantidadDefinido <> Cantidad Then
Alert("La cantidad definida no es la correcta", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim ObjInventario As New ClsInventarios
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
Dim ErrorMovInv As Boolean = False

View File

@@ -197,13 +197,19 @@ Public Class ClsContratos
#End Region
#Region " C O N T R A T O S "
Public Function GetContratosReporte(CveEmpresa As Integer, FechaInicial As DateTime, FechaFinal As DateTime) As Boolean
Public Function GetContratosReporte(CveEmpresa As Integer, FechaInicial As DateTime, FechaFinal As DateTime, CveCliente As Integer, Optional CveEstatus As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional CveTipoContrato As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosReporteGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaInicial", SqlDbType.DateTime).Value = FechaInicial
.Add("@FechaFinal", SqlDbType.DateTime).Value = FechaFinal
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
.Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try

View File

@@ -10832,7 +10832,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Transportes/RepContratos.aspx".ToUpper(), 598)
PaginaDict.Add("/Transportes/RepContratoDetalle.aspx".ToUpper(), 598)
PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599)
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 600)
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 599)
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 601)
PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603)
PaginaDict.Add("/Transportes/CatRutas.aspx".ToUpper(), 604)

View File

@@ -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,

View File

@@ -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>

View File

@@ -49,6 +49,18 @@
color: #fff;
}
.seleccionado {
display: inline-block;
width: 45px;
height: 45px;
background-color: #ff6a00;
border-radius: 10px !important;
margin: 5px;
cursor: pointer;
color: white;
text-align: center;
}
.btnChofer {
width: 45px;
height: 45px;
@@ -73,70 +85,7 @@
<ContentTemplate>
<%-- Datos de cliente y su viaje --%>
<div class="col-md-8">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-users font-green"></i>
<span class="caption-subject bold uppercase">Datos del Cliente </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body form">
<div class="form-group form-md-line-input input-iconright ">
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
ClientIDMode="Static"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= TxtNombre.ClientID.ToString()%>">Nombre:</label>
<i></i>
</div>
<div class="row ">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
<label for="<%= TxtVisa.ClientID.ToString()%>">Visa:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="RblSexo" CssClass="form-control" runat="server">
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
<asp:ListItem Text="Femenino" Value="0" />
</asp:DropDownList>
<label for="<%= RblSexo.ClientID.ToString()%>">Sexo:</label>
<i></i>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput"
ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright ">
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200"
ClientIDMode="Static"></asp:TextBox>
<label for="<%= TxtObservaciones.ClientID.ToString()%>">Observaciones:</label>
<i></i>
</div>
</div>
</div>
<div class="portlet light xspadding bordered ">
<div class="portlet-title">
<div class="caption font-yellow">
@@ -200,13 +149,98 @@
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold mx-1"></asp:Label>
<br />
<div class="text-center">
<asp:Button ID="BtnGuardar" Visible="False" OnClick="AddBoleto" runat="server" CssClass="btn btn-success "
Text="Comprar Boleto"
ValidationGroup="GrpGuardar"></asp:Button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-users font-green"></i>
<span class="caption-subject bold uppercase">Datos del Pasajero <asp:Label ID="LblNum" runat="server" Text='<%# Eval("Numero") %>'></asp:Label> </span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body form">
<div class="form-group form-md-line-input input-iconright ">
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
ClientIDMode="Static"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label >Nombre:</label>
<i></i>
</div>
<div class="row ">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
<label >Visa:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="RblSexo" CssClass="form-control" runat="server">
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
<asp:ListItem Text="Femenino" Value="0" />
</asp:DropDownList>
<label >Sexo:</label>
<i></i>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput"
ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label> Celular:</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright ">
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200"
ClientIDMode="Static"></asp:TextBox>
<label >Observaciones:</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright ">
<asp:Button ID="BtnAgregar" runat="server" Text="Agregar Pasajero" CssClass="btn btn-success " OnClick="BtnAgregar_Click" />
<i></i>
</div>
</div>
</div>
</div>
<div class="row">
<asp:GridView ID="GvB" runat="server" Width="100%" AutoGenerateColumns="false" CssClass="table table-advance table-hover" GridLines="None" DataKeyNames="Nombre,Visa,Asiento">
<Columns>
<asp:BoundField DataField="Nombre" HeaderText="Nombre" />
<asp:BoundField DataField="Visa" HeaderText="Visa" />
<asp:BoundField DataField="Asiento" HeaderText="Asiento" />
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="${0:N2}" />
</Columns>
</asp:GridView>
</div>
<div class="row">
<asp:Button ID="BtnGuardar" Visible="False" OnClick="FinalizarVenta" runat="server" CssClass="btn btn-success "
Text="Finalizar Compra"
ValidationGroup="GrpGuardar"></asp:Button>
</div>
</div>
<%-- Asientos --%>
<div class="col-md-4">

View File

@@ -1,10 +1,9 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports ADSNetLibrary.Helpers
Imports ADSNetLibrary.SIGAPI.Helpers
Imports Extensiones
Imports Extensiones.ModExtensiones
Imports Microsoft.Ajax.Utilities
Partial Class Boletos
Inherits ClsPaginas
@@ -42,6 +41,14 @@ Partial Class Boletos
ViewState("Contrato") = value
End Set
End Property
Private Property DtPasajeros As DataTable
Get
Return CType(ViewState("DtPasajeros"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtPasajeros") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -53,7 +60,7 @@ Partial Class Boletos
CveViaje = Request.QueryString("CveViaje").ToEntero
If CveViaje > 0 Then
CargaDatos()
InicializaCombos()
End If
End If
@@ -61,16 +68,61 @@ Partial Class Boletos
Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos
Dim ObjViaje As New ClsTransportes
If ObjContratos.GetContratos(CveViaje, UsuarioActual.CveEmpresa) Then
Contrato = ObjContratos.DtResultados
If ObjContratos.DtResultados IsNot Nothing AndAlso ObjContratos.DtResultados.Rows.Count > 0 Then
TxtRuta.Text = Contrato.Rows(0)("Ruta").ToString
TxtFecha.Text = Contrato.Rows(0)("FechaInicial").ToString.ToDate.ToShortDateString
DtPasajeros = New DataTable
DtPasajeros.Columns.Add("Numero", GetType(Integer))
DtPasajeros.Columns.Add("Nombre", GetType(String))
DtPasajeros.Columns.Add("Visa", GetType(String))
DtPasajeros.Columns.Add("Asiento", GetType(String))
DtPasajeros.Columns.Add("Importe", GetType(Decimal))
InicializaCombos()
'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 If
Else
ObjContratos.Dispose()
Response.Redirect($"~/Transportes/RepContratos.aspx")
End If
ObjContratos.Dispose()
ObjViaje.Dispose()
TxtRuta.Text = Contrato.Rows(0)("Ruta").ToString
TxtFecha.Text = Contrato.Rows(0)("FechaInicial").ToString
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()
@@ -80,7 +132,6 @@ Partial Class Boletos
Dim ObjDestinos As New ClsTransportes()
If Not ObjDestinos.GetDestinos(CveRuta:=CveRuta) Then
Else
If ObjDestinos.DtResultados.Rows.Count > 0 Then
DdlPartida.DataSource = ObjDestinos.DtResultados
@@ -136,7 +187,7 @@ Partial Class Boletos
linkButton.CssClass += " activo"
AsientoSeleccionado = buttonID
End Sub
Protected Sub AddBoleto(sender As Object, e As EventArgs)
Protected Sub FinalizarVenta(sender As Object, e As EventArgs)
If AsientoSeleccionado = "" Then
Alert("Se requiere seleccionar su asiento", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -147,17 +198,29 @@ Partial Class Boletos
Try
AsientoSeleccionado = AsientoSeleccionado.Replace("A", "")
If 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.CveVendedor) > 1 Then
Alert("Boleto generado correctamente")
ObjTransporte.Commit()
DdlPartida.SelectedValue = ""
DdlDestino.SelectedValue = ""
TxtNombre.Text = ""
TxtVisa.Text = ""
TxtCelular.Text = ""
TxtObservaciones.Text = ""
AsientoSeleccionado = ""
End If
For Each dr As DataRow In DtPasajeros.Rows 'gvr As GridViewRow In GvB.Rows
Dim Nombre, Visa, Celular, Obs, Asiento As String
Dim Sexo As Boolean = False
Dim Importe As Decimal = 0
Nombre = dr("Nombre").ToString
Visa = dr("Visa").ToString
Celular = dr("Celular").ToString
Obs = dr("Observaciones").ToString
Asiento = dr("Asiento").ToString
Importe = dr("Importe").ToString.ToDecimal
'.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text
If ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, Asiento.ToEntero, Nombre, Visa, Celular, Sexo, Obs, UsuarioActual.CveUsuario, UsuarioActual.CveVendedor) > 1 Then
Alert("Boleto generado correctamente")
ObjTransporte.Commit()
DdlPartida.SelectedValue = ""
DdlDestino.SelectedValue = ""
AsientoSeleccionado = ""
End If
Next
Catch ex As Exception
ObjTransporte.RollBack()
Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError)
@@ -176,4 +239,50 @@ Partial Class Boletos
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
CotizarTarifa(sender, e)
End Sub
Protected Sub BtnNumPasajeros_Click(sender As Object, e As EventArgs)
' GeneraPasajeros(TxtNumPasajeros.Text.ToEntero)
End Sub
Private Sub GeneraPasajeros(Cantidad As Integer)
DtPasajeros.Clear()
For i As Integer = 1 To Cantidad
Dim Dr1 As DataRow = DtPasajeros.NewRow
Dr1("Numero") = i
'asiento
DtPasajeros.Rows.Add(Dr1)
Next
GvB.DataSource = DtPasajeros
GvB.DataBind()
End Sub
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs)
If AsientoSeleccionado = "" Then
Alert("No se ha seleccionado el asiento.")
Exit Sub
End If
Dim Dr1 As DataRow = DtPasajeros.NewRow
Dr1("Asiento") = AsientoSeleccionado.Replace("A", "")
Dr1("Nombre") = TxtNombre.Text.Trim
Dr1("Visa") = TxtVisa.Text.Trim
'asiento
DtPasajeros.Rows.Add(Dr1)
AsientoSeleccionado = ""
GvB.DataSource = DtPasajeros
GvB.DataBind()
'identifico los asientos seleccionados para la venta
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
For Each dr As DataRow In DtPasajeros.Rows
Dim lnk As LinkButton = CType(cph.FindControl($"A{dr("Asiento")}"), LinkButton)
If lnk IsNot Nothing Then
lnk.Enabled = False
lnk.CssClass = "seleccionado"
lnk.ToolTip = dr("Nombre").ToString
End If
Next
End Sub
End Class

View File

@@ -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>

View File

@@ -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

View File

@@ -94,69 +94,62 @@
<%-- Filtro Visible - Consulta --%>
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="Button1" runat="server" Text="Consultar" class="btn btn-primary" />
<asp:Button ID="BtnConsultarListado" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultarListado_Click" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row" style="height: 32px;">
<%-- Fecha Inicial --%>
<label class="col-md-1 truncate">Fecha Inicial</label>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker "
data-date-format="dd/mm/yyyy"
style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control"
MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default "
Text="<i class='fa fa-calendar'></i>"
runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI"
Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left">
</ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI"
PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<div class="row">
<div class="col-md-1 truncate">
Fecha Inicio:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">
Fecha Fin:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<label class="col-md-1 ">Cliente:</label>
<div class="col-md-2">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesFiltro" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<label class="col-md-1 ">Estatus:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlEstatusConsulta" runat="server" Class="table-group-action-input form-control input-inline select2me"
DataTextField="ContratoEstatus" DataValueField="CveContratoEstatus"
AppendDataBoundItems="true" Width="200px">
</asp:DropDownList>
</div>
</div>
<%-- Fecha Final --%>
<label class="col-md-1 truncate">Fecha Fin</label>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker "
data-date-format="dd/mm/yyyy"
style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control"
MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default "
Text="<i class='fa fa-calendar'></i>"
runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF"
Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left">
</ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF"
PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<%-- Cliente --%>
<label class="col-md-1">Cliente</label>
<div class="col-md-2">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="86%"
data-metodo="getcliente"
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente"
CssStyle="width: 86%;"
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
</div>
<%-- Estatus --%>
<label class="col-md-1 ">Estatus:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlEstatus" data-text="Todos" AppendDataBoundItems="true"
DataTextField="ContratoEstatus" DataValueField="CveContratoEstatus" CssClass="form-control ddlFiltros input-sm select2me Widthall"
Style="width: 100%;" runat="server">
</asp:DropDownList>
</div>
</div>
</div>
</div>
<%-- Filtro Oculto --%>
@@ -256,16 +249,14 @@
<asp:TemplateField HeaderText="Estatus" ItemStyle-CssClass="bold">
<ItemTemplate>
<asp:Label ID="LtlContrato" runat="server" Text='<%# Eval("ContratoEstatus1") %>'>
<asp:Label ID="LtlContrato" runat="server" Text='<%# Eval("ContratoEstatus") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
<ItemTemplate>
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" CssClass="miGrid"
OnClick="UpdateModal" Text="Actualizar Contrato" />
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" OnClick="UpdateModal" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
@@ -362,8 +353,8 @@
<label class="col-md-4">Tipo Unidad</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlTipoAF" DataValueField="CveTipoActivoFijo"
DataTextField="TipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
Width="100%" Height="35px" runat="server" Enabled="false">
DataTextField="TipoActivoFijo" Class="form-control input-inline"
Width="100%" runat="server" Enabled="false">
</asp:DropDownList>
</div>
@@ -375,13 +366,7 @@
<asp:DropDownList ID="DdlAF" DataValueField="CveActivoFijo"
DataTextField="Descripcion" Class="table-group-action-input form-control input-inline select2me"
Width="100%" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAF" runat="server" ControlToValidate="DdlAF"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco"
TargetControlID="RFVAF" Width="400px">
</ajax:ValidatorCalloutExtender>
</asp:DropDownList>
</div>
</div>
@@ -391,29 +376,16 @@
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
Width="100%" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
TargetControlID="RFVChofer" Width="400px">
</ajax:ValidatorCalloutExtender>
</asp:DropDownList>
</div>
</div>
<div class="row my-1">
<label class="col-md-4">Chofer 2</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlChofer2" AppendDataBoundItems="true" DataValueField="CvePersonal"
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
Width="100%" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVChofer2" runat="server" ControlToValidate="DdlChofer2"
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer 2''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEChofer2" runat="server" HighlightCssClass="vco"
TargetControlID="RFVChofer2" Width="400px">
</ajax:ValidatorCalloutExtender>
</asp:DropDownList>
</div>
</div>

View File

@@ -28,41 +28,31 @@ Partial Class RepContratosCalendario
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("MM/dd/yyyy").Replace(" ", "T")
txtFechaF.Text = DateTime.Now.AddDays(7).ToString("MM/dd/yyyy").Replace(" ", "T")
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString
If Not IsPostBack Then
InicializaCombos()
InicializaCalendar()
CargaDatos()
End If
InicializaCalendar()
End Sub
Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos
GvContratos.HeaderStyle.ForeColor = Drawing.Color.Black
' GvContratos.HeaderStyle.ForeColor = Drawing.Color.Black
Dim CveCliente As Integer = DdlClientesFiltro.SelectedValue.ToEntero
If CveCliente = 0 Then CveCliente = -1
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=34) Then
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientesFiltro.SelectedValue.ToEntero, CveEstatus:=DdlEstatusConsulta.SelectedValue.ToEntero, CveTipoContrato:=34) Then
GvContratos.DataSource = ObjContratos.DtResultados
GvContratos.DataBind()
End If
DtAvance = ObjContratos.DtResultados
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
DdlEstatus.DataSource = ObjContratos.DtResultados
DdlEstatus.DataBind()
DdlEstatus.Items.Insert(0, New ListItem("-", ""))
DdlEstatusContrato.DataSource = ObjContratos.DtResultados
DdlEstatusContrato.DataBind()
DdlEstatusContrato.Items.Insert(0, New ListItem("-", ""))
End If
ObjContratos.Dispose()
End Sub
Private Sub InicializaCalendar()
@@ -92,9 +82,26 @@ Partial Class RepContratosCalendario
DdlChofer2.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
DdlChofer2.DataBind()
DdlChofer2.Items.Insert(0, New ListItem("-", ""))
DdlChoferConsulta.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
DdlChoferConsulta.DataBind()
DdlChoferConsulta.Items.Insert(0, New ListItem("-", ""))
DdlChoferFiltro.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
DdlChoferFiltro.DataBind()
DdlChoferFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
DdlTipoUnidad.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("MedidaVehicularClave IN (2,3)")
DdlTipoUnidad.DataBind()
DdlTipoUnidad.Items.Insert(0, New ListItem("Todos", "-1"))
DdlEstatusConsulta.DataSource = GlobalDTContratosEstatus(UsuarioActual.CveEmpresa)
DdlEstatusConsulta.DataBind()
DdlEstatusConsulta.Items.Insert(0, New ListItem("Todos", "-1"))
DdlEstatusContrato.DataSource = GlobalDTContratosEstatus(UsuarioActual.CveEmpresa)
DdlEstatusContrato.DataBind()
DdlEstatusContrato.Items.Insert(0, New ListItem("-", ""))
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
End Sub
@@ -133,21 +140,20 @@ Partial Class RepContratosCalendario
TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato")
TxtObservaciones.Text = GvRow.DataKey("Observaciones")
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy hh:mm:ss tt")
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy hh:mm:ss tt")
TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy hh:mm tt")
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy hh:mm tt")
'Requeridos
ViewState("Contrato") = GvRow.DataKey("CveContrato")
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
DdlChofer.SelectedValue = GvRow.DataKey("CveChofer")
DdlChofer2.SelectedValue = GvRow.DataKey("CveChofer2")
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))
DdlEstatusContrato.SelectedValue = GvRow.DataKey("CveContratosEstatus")
UpModal.Update()
RegistraScript("$('#ModalActualizar').modal('show');")
End Sub
Protected Sub Consultar(sender As Object, e As EventArgs)
End Sub
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
End Sub
@@ -172,4 +178,5 @@ Partial Class RepContratosCalendario
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
End Sub
End Class

View File

@@ -3503,6 +3503,7 @@ Partial Class ProductosyServicios
DVNomQuimico.Visible = True
DVNumCAS.Visible = True
ElseIf DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero = 5 Then ' 5 - Plaguicidas y fertilizantes
DVNombreIngredienteActivo.Visible = True
DVNumRegistroPlagCOFEPRIS.Visible = True
DVDatosFabricante.Visible = True
DVDatosFormulador.Visible = True
@@ -3534,21 +3535,21 @@ Partial Class ProductosyServicios
CamposStringCCP = CamposStringCCP + TxtDatosMaquilador.Text.Trim()
CamposStringCCP = CamposStringCCP + TxtUsoAutorizado.Text.Trim()
If CamposStringCCP.Length > 0 And (DdlMaterialPeligroso.SelectedValue.ToEntero <= 0 Or DdlEmbalaje.SelectedValue.ToEntero <= 0 Or TxtPesoKg.Text = "") Then
Alert("Para guardar los datos de carta porte los campos Material Peligroso, Embalaje, Peso en Kg son requeridos", TipoMensaje.MsgAdvertencia)
Respuesta = False
Else
'If CamposStringCCP.Length > 0 And (DdlMaterialPeligroso.SelectedValue.ToEntero <= 0 Or DdlEmbalaje.SelectedValue.ToEntero <= 0 Or TxtPesoKg.Text = "") Then
' Alert("Para guardar los datos de carta porte los campos Material Peligroso, Embalaje, Peso en Kg son requeridos", TipoMensaje.MsgAdvertencia)
' Respuesta = False
'Else
'If DdlMaterialPeligroso.SelectedValue.ToEntero > 0 And DdlEmbalaje.SelectedValue.ToEntero > 0 And DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero > 0 And CamposStringCCP.Length > 0 Then
Dim ObjPS As New ClsProductosServicios(transaccionSQL)
'If DdlMaterialPeligroso.SelectedValue.ToEntero > 0 And DdlEmbalaje.SelectedValue.ToEntero > 0 And DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero > 0 And CamposStringCCP.Length > 0 Then
Dim ObjPS As New ClsProductosServicios(transaccionSQL)
If Not ObjPS.AddUpdateProductosServiciosComplementos(CvePS, TxtPesoKg.Text.ToDecimal, DdlMaterialPeligroso.SelectedValue.ToEntero, DdlEmbalaje.SelectedValue.ToEntero, TxtDimensiones.Text, DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero,
TxtNombreIngredienteActivo.Text.Trim, TxtNomQuimico.Text.Trim, TxtDenominacionGenerica.Text.Trim, TxtDenominacionDistintiva.Text.Trim, TxtFabricante.Text.Trim, DdlClaveFormaFarmaceutica.SelectedValue.ToEntero, DdlCondicionesEspTransporte.SelectedValue.ToEntero,
TxtRegistroSanitarioAutorizacion.Text.Trim, TxtPermisoImportacion.Text.Trim, TxtFolioImportacionVUCEM.Text.Trim, TxtNumCAS.Text.Trim, TxtRazonSocialEmpImportacion.Text, TxtNumRegistroPlagCOFEPRIS.Text.Trim, TxtDatosFabricante.Text.Trim,
TxtDatosFormulador.Text.Trim, TxtDatosMaquilador.Text.Trim, TxtUsoAutorizado.Text, DdlTipoMateria.SelectedValue.ToEntero) Then
Respuesta = False
End If
' End If
End If
' End If
'End If
Return Respuesta