agregando dropdownlost al resguardo material
This commit is contained in:
@@ -4,8 +4,8 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Inventarios_ResguardoMaterial
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
Public Property DtMovimientos() As DataTable
|
||||
Get
|
||||
@@ -122,12 +122,12 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Set(value As Integer)
|
||||
ViewState("TipoSeccionAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
@@ -156,11 +156,11 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
Private Sub OcultarControles(CvePersonal As Integer)
|
||||
|
||||
DdlPersonal.SelectedValueExist(CvePersonal)
|
||||
DdlPersonal.ddl.SelectedValueExist(CvePersonal)
|
||||
DdlPersonal.Enabled = False
|
||||
DVTipo.Visible = False
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CreaDT()
|
||||
@@ -213,21 +213,25 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonal.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlPersonal.setEsWebService(True)
|
||||
DdlPersonal.Attributes.Add("data-metodo", "getpersonal")
|
||||
DdlPersonal.SelectedValue = "-1"
|
||||
DdlPersonal.SelectedText = "Seleccione"
|
||||
|
||||
DdlPersonalLiberacion.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonalLiberacion.DataBind()
|
||||
DdlPersonalLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlPersonalLiberacion.setEsWebService(True)
|
||||
DdlPersonalLiberacion.Attributes.Add("data-metodo", "getpersonal")
|
||||
DdlPersonalLiberacion.SelectedValue = "-1"
|
||||
DdlPersonalLiberacion.SelectedText = "Seleccione"
|
||||
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlCliente.DataBind()
|
||||
DdlCliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlCliente.setEsWebService(True)
|
||||
DdlCliente.Attributes.Add("data-metodo", "getcliente")
|
||||
DdlCliente.SelectedValue = "-1"
|
||||
DdlCliente.SelectedText = "Seleccione"
|
||||
|
||||
DdlClienteLiberacion.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlClienteLiberacion.DataBind()
|
||||
DdlClienteLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClienteLiberacion.setEsWebService(True)
|
||||
DdlClienteLiberacion.Attributes.Add("data-metodo", "getcliente")
|
||||
DdlClienteLiberacion.SelectedValue = "-1"
|
||||
DdlClienteLiberacion.SelectedText = "Seleccione"
|
||||
|
||||
DdlProveedor.setEsWebService(True)
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
|
||||
@@ -304,14 +308,14 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Sub
|
||||
Private Function isWhitFamily() As Boolean
|
||||
Return (UsuarioActual.CveEmpresa = 66)
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " RESGUARDO "
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " FUNCIONALIDAD 105 - CLASIFICACION PS"
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
CargaProductosPorClasificacion()
|
||||
@@ -371,21 +375,21 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlUnidad.DataBind()
|
||||
UPDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " EISTENCIAS "
|
||||
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote 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"), SerieLote:=SerieLote)
|
||||
Inv.Dispose()
|
||||
Return Existencia
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " AGREGAR "
|
||||
Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
AgregaProducto()
|
||||
@@ -443,10 +447,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlClasificacion.SelectedValue = "-1"
|
||||
txtCantidad.Text = ""
|
||||
TxtObservacionesdetalle.Text = ""
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GvM "
|
||||
Private Sub CargaGvM()
|
||||
|
||||
@@ -483,10 +487,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " NUEVO "
|
||||
Protected Sub BtnNuevo_Click(sender As Object, e As EventArgs)
|
||||
LimpiarMovimiento()
|
||||
@@ -503,20 +507,20 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
|
||||
TxtObservaciones.Text = ""
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
DdlPersonal.SelectedIndex = 0
|
||||
DdlPersonal.ddl.SelectedIndex = 0
|
||||
LimpiarAgregar()
|
||||
UPDatos.Update()
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " LIBERACION "
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV DATOS LIBERACION "
|
||||
Protected Sub GvMLiberacion_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -529,12 +533,12 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Dim Index = e.Row.RowIndex
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onKeyUp", String.Format("ValidarCantidad({0});", Index))
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " CARGA RESGUARDOS PARA LIBERACION "
|
||||
|
||||
|
||||
Protected Sub BtnVerificarExistencias_Click(sender As Object, e As EventArgs)
|
||||
If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then
|
||||
Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -572,7 +576,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
CargaGvMLiberacion()
|
||||
If DdlPersonalLiberacion.SelectedValue.ToEntero <> -1 Then
|
||||
LblTipo.InnerText = "Personal/Responsable:"
|
||||
LbTipoLiberacion.Text = DdlPersonalLiberacion.SelectedItem.Text
|
||||
LbTipoLiberacion.Text = DdlPersonalLiberacion.SelectedText
|
||||
End If
|
||||
If DdlProveedorLiberacion.SelectedValue.ToEntero <> -1 Then
|
||||
LblTipo.InnerText = "Proveedor:"
|
||||
@@ -580,7 +584,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End If
|
||||
If DdlClienteLiberacion.SelectedValue.ToEntero <> -1 Then
|
||||
LblTipo.InnerText = "Cliente:"
|
||||
LbTipoLiberacion.Text = DdlClienteLiberacion.SelectedItem.Text
|
||||
LbTipoLiberacion.Text = DdlClienteLiberacion.SelectedText
|
||||
End If
|
||||
CvePersonalLiberacion = DdlPersonalLiberacion.SelectedValue.ToEntero
|
||||
CveClienteLiberacion = DdlClienteLiberacion.SelectedValue.ToEntero
|
||||
@@ -613,10 +617,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
GvMLiberacion.DataSource = DtMovimientosLiberacion
|
||||
GvMLiberacion.DataBind()
|
||||
UpGridLiberacion.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " LIMPIAR LIBERACION "
|
||||
Private Sub LimpiarLiberacion()
|
||||
LbTipoLiberacion.Text = ""
|
||||
@@ -638,14 +642,14 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
CargaGvMLiberacion()
|
||||
|
||||
UpGeneralesLibreacion.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GUARDAR "
|
||||
Protected Sub BtnGuardarResguardo_Click(sender As Object, e As EventArgs) Handles BtnGuardarResguardo.Click
|
||||
|
||||
@@ -963,17 +967,26 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DivCliente.Visible = False
|
||||
DivPersonal.Visible = False
|
||||
DivProveedor.Visible = False
|
||||
If RbTipoCliente.Checked Then DivCliente.Visible = True
|
||||
If RbTipoPersonal.Checked Then DivPersonal.Visible = True
|
||||
If RbTipoProveedor.Checked Then DivProveedor.Visible = True
|
||||
If RbTipoCliente.Checked Then
|
||||
DivCliente.Visible = True
|
||||
'DdlPersonal.Attributes.Add("data-metodo", "getcliente")
|
||||
End If
|
||||
If RbTipoPersonal.Checked Then
|
||||
DivPersonal.Visible = True
|
||||
'DdlPersonal.Attributes.Add("data-metodo", "getpersonal")
|
||||
End If
|
||||
If RbTipoProveedor.Checked Then
|
||||
DivProveedor.Visible = True
|
||||
'DdlPersonal.Attributes.Add("data-metodo", "getproveedores")
|
||||
End If
|
||||
UpGenerales.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlPersonalLiberacion.SelectedIndex = 0
|
||||
DdlProveedorLiberacion.SelectedValue = "-1"
|
||||
DdlProveedorLiberacion.SelectedText = "Seleccione"
|
||||
DdlClienteLiberacion.SelectedIndex = 0
|
||||
'DdlPersonalLiberacion.ddl.SelectedIndex = 0
|
||||
'DdlProveedorLiberacion.SelectedValue = "-1"
|
||||
'DdlProveedorLiberacion.SelectedText = "Seleccione"
|
||||
'DdlClienteLiberacion.SelectedValue = "0"
|
||||
DivPersonalLiberacion.Visible = False
|
||||
DivPersonalLiberacion2.Visible = False
|
||||
DivClienteLiberacion.Visible = False
|
||||
@@ -993,10 +1006,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DivProveedorLiberacion2.Visible = True
|
||||
End If
|
||||
UpFiltraLiberacion.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SECCION ALMACEN"
|
||||
Private Sub CreaDtSeccionAlmacen()
|
||||
DtSeccionAlmacen = New DataTable
|
||||
@@ -1100,9 +1113,9 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlAlmacen.Enabled = True
|
||||
DdlAlmacen.ToolTip = ""
|
||||
End If
|
||||
UpGenerales.Update()
|
||||
|
||||
ElseIf TipoSeccionAlmacen = 2 Then
|
||||
UpGenerales.Update()
|
||||
|
||||
ElseIf TipoSeccionAlmacen = 2 Then
|
||||
If CantidadTotalSeccion > 0 Then
|
||||
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = False
|
||||
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = "Cuenta con sección almacen"
|
||||
@@ -1172,32 +1185,32 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DtSeccionAlmacen.Rows.RemoveAt(Index)
|
||||
DtSeccionAlmacen.AcceptChanges()
|
||||
CargaSeccionAlmacen()
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
|
||||
' If Not CveVentaSurtir > 0 Then
|
||||
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' Dim ObjInv As New ClsInventarios
|
||||
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
|
||||
' End If
|
||||
' ObjInv.Dispose()
|
||||
' GvVerSeccionesAlmacen.DataBind()
|
||||
' UpVerSeccionesAlmacen.Update()
|
||||
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
|
||||
'End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
|
||||
' If Not CveVentaSurtir > 0 Then
|
||||
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
' Dim ObjInv As New ClsInventarios
|
||||
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
|
||||
' End If
|
||||
' ObjInv.Dispose()
|
||||
' GvVerSeccionesAlmacen.DataBind()
|
||||
' UpVerSeccionesAlmacen.Update()
|
||||
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user