-- mejora en instancia
This commit is contained in:
@@ -230,8 +230,7 @@ Partial Class RepContratosCalendario
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
Dim objGenerales As New ClsGenerales(ObjContratos.IniciaTransacSQL())
|
||||
Dim DTAgendadados As New DataTable
|
||||
If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato) Then
|
||||
|
||||
@@ -248,13 +247,14 @@ Partial Class RepContratosCalendario
|
||||
DTAgendadados.Dispose()
|
||||
ObjContratos.Dispose()
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If HidCveAF.Value.ToEntero <> DdlAF.SelectedValue.ToEntero Then
|
||||
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 ObjContratos.UpdateContratos(CveContrato, TxtFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", DdlSubProyectoModal.SelectedValue.ToEntero,
|
||||
-1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34,
|
||||
@@ -266,25 +266,14 @@ Partial Class RepContratosCalendario
|
||||
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()
|
||||
|
||||
objGenerales.Dispose()
|
||||
|
||||
UpTitulos.Update()
|
||||
CargaDatos()
|
||||
|
||||
Reference in New Issue
Block a user