From ee7e2c7fe828d0c978afd876366f29d3bb00bd8f Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 21 Feb 2023 15:39:25 -0700 Subject: [PATCH] -- actualizar GlobaldtAF --- AF/AF.aspx.vb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index be04003c1..97108838c 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -2492,7 +2492,8 @@ Partial Class AF_AF TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, CveMovimientoSalidaInv, UsuarioActual.CveUsuario, CveEmpresaActual, CveMarca:=DdlMarcas.SelectedValue.ToEntero, CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero, FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text, AgroCuenta:=TxtAgroCuenta.Text) > 0 Then - ViewState("CveActivoFijo") = ObjAF.CveActivoFijo + ViewState("CveActivoFijo") = ObjAF.CveActivoFijo + GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing Else ErrorGuardar = True End If @@ -2506,7 +2507,6 @@ Partial Class AF_AF End If Next - If Not ErrorGuardar Then For Each GvRowPlagaEnfermedad As GridViewRow In GvPlagaEnfermedad.Rows If Not ObjAF.AddPlagaEnfermedad(ObjAF.CveActivoFijo, GvRowPlagaEnfermedad.DataKey("Observaciones"), GvRowPlagaEnfermedad.DataKey("Fecha").ToDate, UsuarioActual.CveUsuario) Then @@ -2516,11 +2516,8 @@ Partial Class AF_AF Next End If - - If Not ErrorGuardar Then - For Each GvRowMantenimiento As GridViewRow In GvMantenimientos.Rows Dim CveMantenimientoTemp As Integer = ObjAF.AddMantenimientos(ObjAF.CveActivoFijo, GvRowMantenimiento.DataKey("Mantenimiento"), GvRowMantenimiento.DataKey("Observaciones"), GvRowMantenimiento.DataKey("Fecha").ToDate, UsuarioActual.CveUsuario, "") @@ -2556,7 +2553,6 @@ Partial Class AF_AF End If - Else ErrorGuardar = True Exit For @@ -2564,8 +2560,6 @@ Partial Class AF_AF Next - - End If End If @@ -2603,7 +2597,9 @@ Partial Class AF_AF 'UPHistModificaciones.Update() 'UpDatos.Update() ' GuardaValores() - ErrorGuardar = True + ErrorGuardar = True + Else + GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing End If End If