Puntos GDiaz:

--Selectivas
This commit is contained in:
2024-09-17 20:40:17 -07:00
parent 34c0b61235
commit f35a5fd2d5
8 changed files with 395 additions and 30 deletions

View File

@@ -83,6 +83,11 @@ Partial Class Inventarios_InventarioFisico
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
DivSelectiva.Visible = True
CargaSelectivas()
End If
CargaDdlSubProyectos()
CargaDdlClasificacion()
CargDdlProveedor()
@@ -100,6 +105,17 @@ Partial Class Inventarios_InventarioFisico
End Sub
#Region "CARGAS"
Private Sub CargaSelectivas()
Using ObjPS As New ClsProductosServicios
If ObjPS.GetSelectiva(-1, UsuarioActual.CveEmpresa) Then
DdlSelectiva.DataSource = ObjPS.DtResultados
End If
End Using
DdlSelectiva.DataBind()
DdlSelectiva.Items.Insert(0, New ListItem("-", "-1"))
End Sub
Private Sub CargaDatos(CveEmpresa As Integer)
Dim Inventario As New ClsInventarios
Dim dt As New DataTable
@@ -261,6 +277,35 @@ Partial Class Inventarios_InventarioFisico
End If
End Sub
Private Sub BtnSelectiva_Click(sender As Object, e As EventArgs) Handles BtnSelectiva.Click
If DdlSelectiva.SelectedValue = "-1" Then
Alert("Tienes seleccionada la opcion 'Seleccione'.", TipoMensaje.MsgInformacion)
GvPS.DataSource = Nothing
GvPS.DataBind()
tDTPS.Rows.Clear()
Else
If tDTPS IsNot Nothing Then
tDTPS.Rows.Clear()
End If
Using ObjPS As New ClsProductosServicios
If ObjPS.GetPSSelectiva(DdlSelectiva.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
For Each RowPS As DataRow In ObjPS.DtResultados.Rows
Dim Row As DataRow = tDTPS.NewRow
Row("CvePS") = RowPS("CvePS")
Row("CodigoPS") = RowPS("CodigoPS")
tDTPS.Rows.Add(Row)
Next
End If
End Using
GvPS.DataSource = tDTPS
GvPS.DataBind()
UpProductosServicios.Update()
End If
End Sub
Private Sub BtnAddPSExcluye_Click(sender As Object, e As EventArgs) Handles BtnAddPSExcluye.Click
If DdlPSExcluye.SelectedValue = "-1" Then
Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion)