Reconstruir costos

This commit is contained in:
HECTOR RODRIGUEZ
2021-04-14 10:12:42 -07:00
parent cd42929271
commit fbd9e32492
3 changed files with 57 additions and 1 deletions

View File

@@ -58,7 +58,31 @@ Partial Class Inventario_ReconstruirCostos
End If
ObjPS.Dispose()
End Sub
Private Sub BtnReconstruir_Click(sender As Object, e As EventArgs) Handles BtnReconstruir.Click
Dim objInv As New ClsInventarios
Dim TieneError As Boolean = False
Dim Producto As String = ""
For Each Gvr As GridViewRow In GvProdcutos.Rows
If Gvr.FCCheckBox("ChkProducto").Checked Then
Dim CvePS As Integer = Gvr.DataKey("CvePS").ToEntero
If Not objInv.ReconstruirCostos(CvePS, UsuarioActual.CveEmpresa) Then
TieneError = True
Producto += String.Format("{0} <br/>", Gvr.DataKey("PS").ToString)
End If
End If
Next
If TieneError Then
Alert(String.Format("Error al reconstruir los costos en los siguientes productos: {0}", Producto), TipoMensaje.MsgError)
Else
Alert("Se realizo el cambio correctamente", TipoMensaje.MsgConfirmacion)
End If
objInv.Dispose()
End Sub
End Class