-- seccion/serie/lote/caducidad
This commit is contained in:
@@ -278,7 +278,9 @@
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-Width="10%" Visible="false"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="10%" Visible="false" />
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||
<%--<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -184,10 +184,13 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
dt.Columns.Add("Estatus")
|
||||
dt.Columns.Add("Codigo")
|
||||
dt.Columns.Add("Serie")
|
||||
dt.Columns.Add("Lote")
|
||||
dt.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
|
||||
dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32"))
|
||||
dt.Columns.Add("Observaciones")
|
||||
dt.Columns.Add("CvePersonal", Type.GetType("System.Int32"))
|
||||
dt.Columns.Add("Checado", Type.GetType("System.Boolean"))
|
||||
dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32"))
|
||||
|
||||
dt.Columns.Add("SeccionAlmacen")
|
||||
|
||||
DtMovimientos = dt
|
||||
@@ -334,15 +337,26 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Sub
|
||||
Private Sub VerificaProducto()
|
||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltraParametros("Inv_CveMetodoInventario = 5", "PS").Rows.Count > 0 Then
|
||||
ThSerie.Visible = True
|
||||
TrSerie.Visible = True
|
||||
TxtnSerie.Visible = True
|
||||
Dim drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
If drp IsNot Nothing Then
|
||||
'activa Serie
|
||||
If CBool(drp("AplicaSerie")) Then
|
||||
ThSerie.Visible = True
|
||||
TrSerie.Visible = True
|
||||
TxtnSerie.Visible = True
|
||||
End If
|
||||
|
||||
'activa seccion
|
||||
If CBool(drp("AplicaSeccion")) Then
|
||||
ThSeccion.Visible = True
|
||||
TrSeccion.Visible = True
|
||||
End If
|
||||
'activa lote
|
||||
|
||||
'activa caducidad
|
||||
|
||||
ThSeccion.Visible = True
|
||||
TrSeccion.Visible = True
|
||||
|
||||
GvM.Columns(4).Visible = True
|
||||
Else
|
||||
TxtnSerie.Visible = False
|
||||
End If
|
||||
@@ -447,28 +461,36 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
#Region " GvM "
|
||||
Private Sub CargaGvM()
|
||||
|
||||
ThSerie.Visible = False
|
||||
TrSerie.Visible = False
|
||||
TxtnSerie.Visible = False
|
||||
GvM.Columns(5).Visible = False
|
||||
GvM.Columns(4).Visible = False
|
||||
If DtMovimientos IsNot Nothing Then
|
||||
GvM.Columns(4).Visible = DtMovimientos.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
GvM.Columns(5).Visible = DtMovimientos.MAX("Serie").ToString <> ""
|
||||
GvM.Columns(6).Visible = DtMovimientos.MAX("Lote").ToString <> ""
|
||||
GvM.Columns(7).Visible = DtMovimientos.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
End If
|
||||
|
||||
Dim Contador As Integer = 0
|
||||
Dim UltimoRenglon As Integer = DtMovimientos.Rows.Count - 1
|
||||
Dim MostrarSerie As Boolean = False
|
||||
Dim MostrarSeccion As Boolean = False
|
||||
While Contador <= UltimoRenglon And (Not MostrarSerie And Not MostrarSeccion)
|
||||
Dim Dr As DataRow = DtMovimientos.Rows(Contador)
|
||||
MostrarSerie = If(Not MostrarSerie, Dr("Serie").ToString <> "", True)
|
||||
MostrarSeccion = If(Not MostrarSerie, Dr("SeccionAlmacen").ToString <> "", True)
|
||||
Contador += 1
|
||||
End While
|
||||
|
||||
ThSerie.Visible = MostrarSerie
|
||||
TrSerie.Visible = MostrarSerie
|
||||
GvM.Columns(5).Visible = MostrarSerie
|
||||
'ThSerie.Visible = False
|
||||
'TrSerie.Visible = False
|
||||
'TxtnSerie.Visible = False
|
||||
'GvM.Columns(5).Visible = False
|
||||
'GvM.Columns(4).Visible = False
|
||||
|
||||
GvM.Columns(4).Visible = MostrarSeccion
|
||||
'Dim Contador As Integer = 0
|
||||
'Dim UltimoRenglon As Integer = DtMovimientos.Rows.Count - 1
|
||||
'Dim MostrarSerie As Boolean = False
|
||||
'Dim MostrarSeccion As Boolean = False
|
||||
'While Contador <= UltimoRenglon And (Not MostrarSerie And Not MostrarSeccion)
|
||||
' Dim Dr As DataRow = DtMovimientos.Rows(Contador)
|
||||
' MostrarSerie = If(Not MostrarSerie, Dr("Serie").ToString <> "", True)
|
||||
' MostrarSeccion = If(Not MostrarSerie, Dr("SeccionAlmacen").ToString <> "", True)
|
||||
' Contador += 1
|
||||
'End While
|
||||
|
||||
'ThSerie.Visible = MostrarSerie
|
||||
'TrSerie.Visible = MostrarSerie
|
||||
'GvM.Columns(5).Visible = MostrarSerie
|
||||
|
||||
'GvM.Columns(4).Visible = MostrarSeccion
|
||||
|
||||
'For Each Dr As DataRow In DtMovimientos.Rows
|
||||
' If Dr("Serie").ToString <> "" Then
|
||||
|
||||
Reference in New Issue
Block a user