From 1140ab1198aa7de6bf5cad27a237c36a1151fd31 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 18 Oct 2022 14:05:06 -0700 Subject: [PATCH] - mejora AF --- General/SaldosIniciales.aspx.vb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 9741dfdda..2efab3828 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1804,8 +1804,6 @@ Partial Class General_SaldosIniciales If Not dt.Columns.Contains("CveCuentaContable") Then dt.Columns.Add("CveCuentaContable", GetType(Integer)) End If - - Dim sbErrores As New StringBuilder For Each Row As DataRow In dt.Rows @@ -1827,8 +1825,6 @@ Partial Class General_SaldosIniciales End If Next - - If Not ErrorAF Then dt.AcceptChanges() Else @@ -1836,7 +1832,6 @@ Partial Class General_SaldosIniciales Exit Sub End If - Dim ObjAF As New ClsAF Try @@ -1845,7 +1840,7 @@ Partial Class General_SaldosIniciales Dim Contador As Integer = 0 Dim NumRow As Integer = 0 - For Each Row As DataRow In dt.Rows + For Each Row As DataRow In dt.FiltraParametros("Descripción <> ''").Rows Dim Codigo As String = Row("Código").ToString Dim Descripcion As String = Row("Descripción").ToString Dim TipoAF As String = Row("Tipo").ToString.Trim @@ -1873,9 +1868,9 @@ Partial Class General_SaldosIniciales 'VALIDACIONES - If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For - If Not CveSubProyecto > 0 Then Alert($"No se encontró el SubProyecto: {SubProyecto} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For - If Not CveEstadoActivoFijo > 0 Then Alert($"No se encontró el Estado: {Estado} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For + If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For + If Not CveSubProyecto > 0 Then Alert($"No se encontró el SubProyecto: {SubProyecto} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For + If Not CveEstadoActivoFijo > 0 Then Alert($"No se encontró el Estado: {Estado} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For If Not CveCliente > 0 Then CveCliente = -1