Compra B-11648 error en total almacen contra prepoliza,GDiaz - 2024.08.09
This commit is contained in:
@@ -221,7 +221,7 @@ Partial Class RepContratosCalendario
|
||||
|
||||
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim NumChoferes As Integer = If(chkSegundoChofer.Checked, 2, 1)
|
||||
|
||||
If NumChoferes = 2 AndAlso DdlChofer2.SelectedValue.ToEntero <= 0 Then
|
||||
@@ -230,6 +230,7 @@ Partial Class RepContratosCalendario
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
Dim DTAgendadados As New DataTable
|
||||
If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato) Then
|
||||
@@ -261,10 +262,30 @@ Partial Class RepContratosCalendario
|
||||
CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text.Trim, NumChoferes:=NumChoferes) Then
|
||||
RegistraScript("$('#ModalActualizar').modal('hide');")
|
||||
Alert("Actualizado Correctamente.")
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
If HidCveAF.Value.ToEntero <> DdlAF.SelectedValue.ToEntero Then
|
||||
Dim objGenerales = New ClsGenerales(ObjContratos.IniciaTransacSQL())
|
||||
|
||||
If Not objGenerales.AddHistorialBitacora(465, -1, -1, -1, -1, -1, -1, -1, DdlAF.SelectedItem.Text, HidCveAFDes.Value, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, TxtMotivoCambioUnidad.Text, "", "", CveContrato:=CveContrato) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
ObjContratos.RollBack()
|
||||
Else
|
||||
ObjContratos.Commit()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
UpTitulos.Update()
|
||||
CargaDatos()
|
||||
InicializaCalendar()
|
||||
@@ -299,6 +320,15 @@ Partial Class RepContratosCalendario
|
||||
|
||||
DdlAF.SelectedValueExist(GvRow.DataKey("CveAF"))
|
||||
|
||||
HidCveAF.Value = "-1"
|
||||
HidCveAFDes.Value = ""
|
||||
If GvRow.DataKey("CveAF").ToEntero > 0 Then
|
||||
HidCveAF.Value = GvRow.DataKey("CveAF").ToString
|
||||
HidCveAFDes.Value = DdlAF.SelectedItem.Text
|
||||
End If
|
||||
|
||||
TxtMotivoCambioUnidad.Text = ""
|
||||
DVMotivoCambioAF.Visible = False
|
||||
|
||||
|
||||
HypRemision.Text = GvRow.DataKey("RemisionSerieFolio")
|
||||
@@ -326,6 +356,9 @@ Partial Class RepContratosCalendario
|
||||
HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||
End If
|
||||
|
||||
TxtMotivoCambioUnidad.Text = ""
|
||||
DVMotivoCambioAF.Visible = False
|
||||
|
||||
DdlClientes.SelectedText = HidModClienteNombre.Value
|
||||
DdlClientes.SelectedValue = HidModCveCliente.Value
|
||||
|
||||
@@ -347,9 +380,10 @@ Partial Class RepContratosCalendario
|
||||
End If
|
||||
|
||||
CargaAFDdl(HidCveTipoAF.Value.ToEntero)
|
||||
|
||||
DdlAF.SelectedValueExist(HidCveAF.Value)
|
||||
|
||||
|
||||
HidCveAFDes.Value = DdlAF.SelectedItem.Text
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
@@ -452,4 +486,16 @@ Partial Class RepContratosCalendario
|
||||
CargaCronograma(DdlTipoVista.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlAF_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DVMotivoCambioAF.Visible = False
|
||||
|
||||
If HidCveAF.Value.ToEntero > 0 AndAlso DdlAF.SelectedValue.ToEntero <> HidCveAF.Value.ToEntero Then
|
||||
DVMotivoCambioAF.Visible = True
|
||||
End If
|
||||
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user