This commit is contained in:
rrene
2020-06-02 19:14:49 -07:00
parent ab98993a94
commit d9c953e6cb
3 changed files with 100 additions and 91 deletions

View File

@@ -84,22 +84,6 @@ Partial Class Inventarios_ResguardoMaterial
End Property
Private Property DtSeccionAlmacen As DataTable
Get
Return CType(ViewState("DtSeccionAlmacen"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtSeccionAlmacen") = value
End Set
End Property
Private Property IndexSeccionAlmacen As Integer
Get
Return CType(ViewState("IndexSeccionAlmacen"), Integer)
End Get
Set(value As Integer)
ViewState("IndexSeccionAlmacen") = value
End Set
End Property
Private Property CantidadTotal As Decimal
Get
Return CType(ViewState("CantidadTotal"), Decimal)
@@ -174,7 +158,6 @@ Partial Class Inventarios_ResguardoMaterial
GvM.DataBind()
CantidadTotal = 0
IndexSeccionAlmacen = 0
CvePS = 0
TipoSeccionAlmacen = 0
@@ -379,7 +362,7 @@ Partial Class Inventarios_ResguardoMaterial
#End Region
#Region " EISTENCIAS "
#Region " EXISTENCIAS "
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional Serie As String = "-1") As Double
Dim Inv As New ClsInventarios
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
@@ -481,10 +464,10 @@ Partial Class Inventarios_ResguardoMaterial
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {e.Row.RowIndex}").SUMD("CantidadSeccionAlmacen") > 0 Then
e.Row.FCLinkButton("lnkRemove").Visible = False
e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
End If
'If DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {e.Row.RowIndex}").SUMD("CantidadSeccionAlmacen") > 0 Then
' e.Row.FCLinkButton("lnkRemove").Visible = False
' e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
'End If
End If
End Sub
#End Region
@@ -502,7 +485,6 @@ Partial Class Inventarios_ResguardoMaterial
DdlAlmacen.SelectedValueExist("-1")
DdlAlmacenDestino.SelectedValueExist("-1")
DtSeccionAlmacen.Rows.Clear()
TxtObservaciones.Text = ""
TxtFecha.Text = Now.ToShortDateString
@@ -595,8 +577,6 @@ Partial Class Inventarios_ResguardoMaterial
FechaLiberacion = TxtFechaLiberacion.Text
BtnGuardarLiberacion.Visible = True
DtSeccionAlmacen.Rows.Clear()
UpGeneralesLibreacion.Update()
Else
Alert("Ocurrió un error al cargar los resguardos del personal. Por favor vuelva a intentar.", TipoMensaje.MsgError)
@@ -633,8 +613,6 @@ Partial Class Inventarios_ResguardoMaterial
LbFechaLiberacion.Text = ""
FechaLiberacion = ""
BtnGuardarLiberacion.Visible = False
DtSeccionAlmacen.Rows.Clear()
DdlAlmacenDestinoLiberacion.SelectedValue = "-1"
TxtObservacionesLiberacion.Text = ""
@@ -685,14 +663,6 @@ Partial Class Inventarios_ResguardoMaterial
Alert(TextoExistencia.ToString, TipoMensaje.MsgError)
End If
Dim TotalCantidad As Double = DtMovimientos.SUMD("Cantidad")
If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
If TotalCantidad <> DtSeccionAlmacen.FiltraParametros("TipoSeccionAlmacen = 1").SUMD("CantidadSeccionAlmacen") Then
Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Guardar(23)
End Sub
@@ -724,13 +694,6 @@ Partial Class Inventarios_ResguardoMaterial
Exit Sub
End If
If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
If TotalCantidad <> DtSeccionAlmacen.FiltraParametros("TipoSeccionAlmacen = 2").SUMD("CantidadSeccionAlmacen") Then
Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Guardar(24)