Reconstruir costos
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
<asp:UpdatePanel ID="UpGvProductos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div style="height:650px; overflow-y: scroll;" >
|
||||
<asp:GridView ID="GvProdcutos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
|
||||
<asp:GridView ID="GvProdcutos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS, PS" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
@@ -82,6 +82,18 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpReconstruir" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<div>
|
||||
<br />
|
||||
|
||||
<asp:Button ID="BtnReconstruir" runat="server" Text="Guardar" CssClass="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user