OS guardar en historial el cambio de técnico
This commit is contained in:
@@ -1728,7 +1728,7 @@ Public Class ClsOS
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateOrdenesServiciosAsignadas(CveOSDetalle As Integer, CveUsuario As Integer, FechaCita As Date, HoraCita As DateTime, CveEmpresa As Integer) As Boolean
|
||||
Public Function UpdateOrdenesServiciosAsignadas(CveOSDetalle As Integer, CveUsuarioAtendio As Integer, FechaCita As Date, HoraCita As DateTime, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OS_OrdenesServiciosAsignadasUpdate")
|
||||
|
||||
@@ -1737,6 +1737,7 @@ Public Class ClsOS
|
||||
.Add("@FechaCita", SqlDbType.Date).Value = FechaCita
|
||||
.Add("@HoraCita", SqlDbType.DateTime).Value = HoraCita
|
||||
.Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle
|
||||
.Add("@CveUsuarioAtendio", SqlDbType.Int).Value = CveUsuarioAtendio
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
|
||||
|
||||
@@ -3594,13 +3594,10 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
<<<<<<< HEAD
|
||||
CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
||||
CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
||||
|
||||
CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
||||
CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion)
|
||||
>>>>>>> GDiaz 2024.05.21
|
||||
|
||||
|
||||
LbAgregar.Enabled = True
|
||||
UpPSS.Update()
|
||||
@@ -3647,11 +3644,7 @@ Partial Class Compras_Compras
|
||||
PorcentajeProntoPago = ObjProveedor.PorcentajeProntoPago
|
||||
End If
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
|
||||
>>>>>>> GDiaz 2024.05.21
|
||||
Else
|
||||
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -3659,9 +3652,6 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> GDiaz 2024.05.21
|
||||
If UsuarioActual.Empresa.Funcionalidad(560) = "1" Then
|
||||
If ObjProveedor.GetProveedoresEvaluacionPediente(Me.CveProveedor, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProveedor.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -1866,7 +1866,7 @@ Partial Class OS_OrdenesServicios
|
||||
GvHistorial.DataSource = Nothing
|
||||
End If
|
||||
GvHistorial.DataBind()
|
||||
ObjGral.Dispose()
|
||||
UpHistorial.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -3536,24 +3536,40 @@ Partial Class OS_OrdenesServicios
|
||||
End Class
|
||||
Protected Sub LnkActualizarUsaurioAtendio_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjOs As New ClsOS
|
||||
Dim ProcesoOk As Boolean = True
|
||||
|
||||
|
||||
If DdlUsuarioAtendio.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim ObjOS As New ClsOS
|
||||
ObjOS.IniciaTransacSQL()
|
||||
|
||||
Dim ProcesoOk As Boolean = True
|
||||
|
||||
For Each GvRow As GridViewRow In GvPS.Rows
|
||||
If Not ObjOs.UpdateOrdenesServiciosAsignadas(GvRow.DataKey("CveOSDetalle").ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, MinFecha, DateTime.Parse(MinFecha.ToShortDateString), UsuarioActual.CveEmpresa) Then
|
||||
If Not ObjOS.UpdateOrdenesServiciosAsignadas(GvRow.DataKey("CveOSDetalle").ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, MinFecha, DateTime.Parse(MinFecha.ToShortDateString), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
ProcesoOk = False
|
||||
Alert($"Se presento un error al actualizar el técnico.")
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If ProcesoOk Then
|
||||
Alert($"Técnico actualizado correctamenrte a {DdlUsuarioAtendio.SelectedItem.Text}.")
|
||||
ObjOS.Commit()
|
||||
Else
|
||||
ObjOS.RollBack()
|
||||
End If
|
||||
|
||||
ObjOS.Dispose()
|
||||
|
||||
If ProcesoOk Then
|
||||
Alert($"Se presento un error al actualizar el técnico.")
|
||||
CargaHistorial()
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Debe de seleccionar un ténico para actualziar", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjOs.Dispose()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user