Medios de transporte
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
@@ -4111,6 +4112,32 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetMediosTransporte(CveOrigen As Integer, Estatus As Boolean, CveEmpresa As Integer, CveTipoNomina As Integer, CveSubProyecto As Integer, Tipo As Integer, GPO As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Agro_OrigenGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveOrigen", SqlDbType.Int).Value = CveOrigen
|
||||||
|
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveTipoNomina", SqlDbType.Int).Value = CveTipoNomina
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||||
|
.Add("@GPO", SqlDbType.Int).Value = GPO
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError($"Ocurrió un error al obtener los medios de transporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1141,7 +1141,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true"
|
||||||
|
DataTextField="Nombre" DataValueField="CveOrigen" ValidationGroup="GrpGuardar">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<%-- <asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Value="1" Text="Hermosillo"></asp:ListItem>
|
<asp:ListItem Value="1" Text="Hermosillo"></asp:ListItem>
|
||||||
<asp:ListItem Value="2" Text="Taxi-1"></asp:ListItem>
|
<asp:ListItem Value="2" Text="Taxi-1"></asp:ListItem>
|
||||||
@@ -1151,7 +1154,7 @@
|
|||||||
<asp:ListItem Value="7" Text="Taxi-5"></asp:ListItem>
|
<asp:ListItem Value="7" Text="Taxi-5"></asp:ListItem>
|
||||||
<asp:ListItem Value="6" Text="Taxi-6"></asp:ListItem>
|
<asp:ListItem Value="6" Text="Taxi-6"></asp:ListItem>
|
||||||
<asp:ListItem Value="8" Text="Costa"></asp:ListItem>
|
<asp:ListItem Value="8" Text="Costa"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>--%>
|
||||||
<asp:Label AssociatedControlID="DdlMedioTransporte" runat="server" Text="Medio transporte:"></asp:Label>
|
<asp:Label AssociatedControlID="DdlMedioTransporte" runat="server" Text="Medio transporte:"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Partial Class RH_CatPersonal
|
|||||||
CargaJornada()
|
CargaJornada()
|
||||||
CargaEstados()
|
CargaEstados()
|
||||||
CargaSatRiesgoPuesto()
|
CargaSatRiesgoPuesto()
|
||||||
|
CargaMedioTransporte()
|
||||||
LoadDefaultValues()
|
LoadDefaultValues()
|
||||||
|
|
||||||
|
|
||||||
@@ -288,6 +288,18 @@ Partial Class RH_CatPersonal
|
|||||||
'End If
|
'End If
|
||||||
UpSubProyecto.Update()
|
UpSubProyecto.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub CargaMedioTransporte()
|
||||||
|
Dim objgenerales As New ClsGenerales()
|
||||||
|
objgenerales.GetMediosTransporte(-1, True, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||||
|
DdlMedioTransporte.Items.Clear()
|
||||||
|
DdlMedioTransporte.DataSource = objgenerales.DtResultados
|
||||||
|
DdlMedioTransporte.DataBind()
|
||||||
|
'filtro por usuario subproyecto/sucursal vsh
|
||||||
|
'If UsuarioActual.CveEmpresa = 7 Then
|
||||||
|
' DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1).FiltraParametros($"CveSubProyecto = { UsuarioActual.CveSubProyecto }")
|
||||||
|
'End If
|
||||||
|
'UpSubProyecto.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaTipoCentroCosto()
|
Private Sub CargaTipoCentroCosto()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user