diff --git a/Acarreos/CatChoferes.aspx.vb b/Acarreos/CatChoferes.aspx.vb
index 33eb8925e..251fd78bb 100644
--- a/Acarreos/CatChoferes.aspx.vb
+++ b/Acarreos/CatChoferes.aspx.vb
@@ -47,12 +47,12 @@ Partial Class Acarreos_CatChoferes
Dim Estatus = 0
If ChkEstatus.Checked Then Estatus = 1
If HdnModalidad.Value = "A" Then
- If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue) Then
+ If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtDomicilio.Text.Trim, TxtTelefono.Text.Trim, TxtCiudad.Text.Trim, TxtLicencia.Text.Trim) Then
CargaDatos()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HdnModalidad.Value = "U" Then
- If ObjAcar.UpdateChofer(HdnID.Value, TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue) Then
+ If ObjAcar.UpdateChofer(HdnID.Value, TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtDomicilio.Text.Trim, TxtTelefono.Text.Trim, TxtCiudad.Text.Trim, TxtLicencia.Text.Trim) Then
CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If
@@ -71,6 +71,11 @@ Partial Class Acarreos_CatChoferes
BtnAgregarChofer.Text = "Actualizar"
myModalLabel.InnerText = "Actualizar Chofer"
TxtChofer.Text = GvRow.DataKey("Chofer")
+ TxtIdentificacion.Text = GvRow.DataKey("Identificacion")
+ TxtDomicilio.Text = GvRow.DataKey("Domicilio")
+ TxtTelefono.Text = GvRow.DataKey("Telefono")
+ TxtCiudad.Text = GvRow.DataKey("Ciudad")
+ TxtLicencia.Text = GvRow.DataKey("Licencia")
DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
divEstatus.Visible = True
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
@@ -84,6 +89,11 @@ Partial Class Acarreos_CatChoferes
BtnAgregarChofer.Text = "Agregar"
myModalLabel.InnerText = "Agregar Chofer"
TxtChofer.Text = ""
+ TxtIdentificacion.Text = ""
+ TxtDomicilio.Text = ""
+ TxtTelefono.Text = ""
+ TxtCiudad.Text = ""
+ TxtLicencia.Text = ""
ChkEstatus.Checked = True
divEstatus.Visible = False
UpAddChofer.Update()
diff --git a/App_Code/ClsAcarreos.vb b/App_Code/ClsAcarreos.vb
index c85f93087..e039cb589 100644
--- a/App_Code/ClsAcarreos.vb
+++ b/App_Code/ClsAcarreos.vb
@@ -109,7 +109,7 @@ Public Class ClsAcarreos
#Region "Choferes"
- Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer) As Boolean
+ Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Acar_ChoferesAdd")
With SqlAdapter.SelectCommand.Parameters
@@ -117,6 +117,11 @@ Public Class ClsAcarreos
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista
+ .Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion
+ .Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio
+ .Add("@Telefono", SqlDbType.VarChar).Value = Telefono
+ .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
+ .Add("@Licencia", SqlDbType.VarChar).Value = Licencia
End With
Try
SqlAdapter.Fill(Data)
@@ -128,7 +133,7 @@ Public Class ClsAcarreos
Return Retorno
End Function
- Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer) As Boolean
+ Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Acar_ChoferesUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -138,7 +143,11 @@ Public Class ClsAcarreos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista
-
+ .Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion
+ .Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio
+ .Add("@Telefono", SqlDbType.VarChar).Value = Telefono
+ .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
+ .Add("@Licencia", SqlDbType.VarChar).Value = Licencia
End With
Try
SqlAdapter.Fill(Data)
diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx
index 234eb59d3..0dc78ba79 100644
--- a/Inventarios/TraspasoAlmacen.aspx
+++ b/Inventarios/TraspasoAlmacen.aspx
@@ -172,14 +172,14 @@
-
-
-
-
+
+
+
+
@@ -256,7 +256,8 @@
-
+
+
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index 7dc7cd4a5..9a928c671 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -377,7 +377,7 @@ Partial Class Inventarios_TraspasoAlmacen
'Llena Choferes
Dim ObjAcar As New ClsAcarreos()
- If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1, -1) Then
+ If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1) Then
DldChofer.DataSource = ObjAcar.DtResultados
DldChofer.DataBind()
End If
@@ -2408,5 +2408,19 @@ Partial Class Inventarios_TraspasoAlmacen
#End Region
+ Protected Sub DldChofer_SelectedIndexChanged(sender As Object, e As EventArgs)
+ Dim ObjAcar As New ClsAcarreos()
+ If ObjAcar.GetChofer(DldChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, -1) Then
+ Dim dr As DataRow = ObjAcar.DtResultados.Rows(0)
+ If dr IsNot Nothing Then
+ TxtIdentificacion.Text = dr("Identificacion").ToString
+ TxtDomicilio.Text = dr("Domicilio").ToString
+ TxtTelefono.Text = dr("Telefono").ToString
+ TxtCiudad.Text = dr("Ciudad").ToString
+ TxtLicencia.Text = dr("Licencia").ToString
+ End If
+ End If
+ ObjAcar.Dispose()
+ End Sub
End Class