SeccionAlmacen en PS
This commit is contained in:
@@ -97,6 +97,15 @@ Partial Class ProductosyServicios
|
||||
ViewState("CvePSAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DtSeccionAlmacen() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtSeccionAlmacen"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtSeccionAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -137,6 +146,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
CargarAlias()
|
||||
CargaExistencias()
|
||||
CargaGvSeccionAlmacen()
|
||||
Else
|
||||
'Configuración de Modalidad Insert
|
||||
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
|
||||
@@ -275,6 +285,11 @@ Partial Class ProductosyServicios
|
||||
CargaDdlFraccionArancelaria()
|
||||
CveSATPS = -1
|
||||
|
||||
CargaCombosSeccionAlmacen()
|
||||
DivSeccionAlmacen.Visible = UsuarioActual.Empresa.Funcionalidad(563).ToString = "1"
|
||||
|
||||
CreaDtSeccionAlmacen()
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaCuentasContables()
|
||||
If Not (Request("CvePS") IsNot Nothing AndAlso IsNumeric(Request("CvePS")) AndAlso Request("CvePS").ToEntero > 0) Then DivUsoClasificacion.Visible = True
|
||||
@@ -2462,4 +2477,71 @@ Partial Class ProductosyServicios
|
||||
DdlCategoriaToxicidad.SelectedValue = "000"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "SECCION ALMACEN"
|
||||
|
||||
Private Sub CreaDtSeccionAlmacen()
|
||||
DtSeccionAlmacen = New DataTable
|
||||
DtSeccionAlmacen.Columns.Add("CvePSAlmacenSeccion", GetType(Integer))
|
||||
DtSeccionAlmacen.Columns.Add("CvePS", GetType(Integer))
|
||||
DtSeccionAlmacen.Columns.Add("CveAlmacen", GetType(Integer))
|
||||
DtSeccionAlmacen.Columns.Add("Almacen", GetType(String))
|
||||
DtSeccionAlmacen.Columns.Add("CveAlmacenSeccion", GetType(Integer))
|
||||
DtSeccionAlmacen.Columns.Add("AlmacenSeccion", GetType(String))
|
||||
End Sub
|
||||
Private Sub CargaGvSeccionAlmacen()
|
||||
Dim ObjInv As New ClsInventarios
|
||||
If ObjInv.GetProductosServiciosAlmacenSeccion(CvePS, -1, -1) Then
|
||||
GvSeccionAlmacen.DataSource = ObjInv.DtResultados
|
||||
DtSeccionAlmacen = ObjInv.DtResultados
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
GvSeccionAlmacen.DataBind()
|
||||
UpSeccionAlmacen.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaCombosSeccionAlmacen()
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveAlmacen)
|
||||
DdlAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveAlmacen)
|
||||
DdlSeccionAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkSeccionAlmacenAdd_Click(sender As Object, e As EventArgs)
|
||||
DdlAlmacen.SelectedIndex = 0
|
||||
DdlSeccionAlmacen.SelectedIndex = 0
|
||||
RegistraScript("$('#DivAddSeccionAlmacen').modal();")
|
||||
UpModalSeccionAlmacen.Update()
|
||||
End Sub
|
||||
Protected Sub LnkEditarSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
DdlAlmacen.SelectedValueExist(gvRow.DataKey("CvAlmacen"))
|
||||
DdlSeccionAlmacen.SelectedValueExist(gvRow.DataKey("CveAlmacenSeccion"))
|
||||
RegistraScript("$('#DivAddSeccionAlmacen').modal();")
|
||||
UpModalSeccionAlmacen.Update()
|
||||
End Sub
|
||||
Protected Sub LnkRemoveSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
If gvRow.DataKey("CvePSAlmacenSeccion").ToEntero > 0 Then
|
||||
DtSeccionAlmacen.Rows(gvRow.RowIndex)("CvePS") = -1
|
||||
Else
|
||||
DtSeccionAlmacen.Rows(gvRow.RowIndex.ToEntero).Delete()
|
||||
End If
|
||||
DtSeccionAlmacen.AcceptChanges()
|
||||
GvSeccionAlmacen.DataSource = DtSeccionAlmacen
|
||||
GvSeccionAlmacen.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user