local
This commit is contained in:
@@ -271,6 +271,14 @@ Partial Class RH_Personal
|
||||
Set(value As Integer)
|
||||
ViewState("CveAlmacenUniforme") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveSeccionAlmacenUniforme As Integer
|
||||
Get
|
||||
Return CInt(ViewState("CveSeccionAlmacenUniforme"))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveSeccionAlmacenUniforme") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DescripcionUniforme As String
|
||||
@@ -302,7 +310,7 @@ Partial Class RH_Personal
|
||||
|
||||
Private Property PU As Decimal
|
||||
Get
|
||||
Return CInt(ViewState("PU"))
|
||||
Return ViewState("PU").ToString.ToDecimal
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("PU") = value
|
||||
@@ -5123,22 +5131,28 @@ Partial Class RH_Personal
|
||||
End Sub
|
||||
|
||||
Protected Sub LbLiberarUniforme(sender As Object, e As System.EventArgs)
|
||||
Dim lb As LinkButton = CType(sender, LinkButton)
|
||||
|
||||
Dim row As GridViewRow = CType(lb.NamingContainer, GridViewRow)
|
||||
Dim index As Integer = row.DataItemIndex
|
||||
|
||||
Dim rowInfo As DataRow = UniformesInfo.Rows(index)
|
||||
Dim lb As LinkButton = CType(sender, LinkButton)
|
||||
|
||||
Dim row As GridViewRow = CType(lb.NamingContainer, GridViewRow)
|
||||
|
||||
CveAlmacenUniforme = row.DataKey("CveAlmacen").ToString().ToEntero
|
||||
DescripcionUniforme = row.DataKey("CodigoPS")
|
||||
PU = row.DataKey("PU").ToString().ToDecimal
|
||||
CveSeccionAlmacenUniforme = row.DataKey("CveSeccionAlmacen").ToString().ToEntero
|
||||
CveUM = row.DataKey("CveUM").ToString().ToEntero
|
||||
CvePS = row.DataKey("CvePS").ToString().ToEntero
|
||||
CveMovimientoUniforme = row.DataKey("CveMovimiento").ToString().ToEntero
|
||||
CveMovimientoDetalleUniforme = row.DataKey("CveMovimientoDetalle").ToString().ToEntero
|
||||
If row.DataKey("AplicaSeccion").ToString = "True" Then
|
||||
divSeccionAlmacen.Visible = True
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePS, UsuarioActual.CveEmpresa)
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePS)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
End If
|
||||
|
||||
|
||||
CveAlmacenUniforme = rowInfo.Item("CveAlmacen").ToString().ToEntero
|
||||
DescripcionUniforme = rowInfo.Item("CodigoPS").ToString()
|
||||
PU = rowInfo.Item("PU").ToString().ToDecimal
|
||||
|
||||
CveUM = rowInfo.Item("CveUM").ToString().ToEntero
|
||||
CvePS = rowInfo.Item("CvePS").ToString().ToEntero
|
||||
CveMovimientoUniforme = rowInfo.Item("CveMovimiento").ToString().ToEntero
|
||||
CveMovimientoDetalleUniforme = rowInfo.Item("CveMovimientoDetalle").ToString().ToEntero
|
||||
UPPLiberarUniforme.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalUniforme"))
|
||||
End Sub
|
||||
@@ -5151,20 +5165,25 @@ Partial Class RH_Personal
|
||||
|
||||
Sub LiberarUniforme(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
ObjInventario.IniciaTransacSQL()
|
||||
|
||||
Dim ResultadoSalida As Integer = ObjInv.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=CInt(DdlAlmacenDestinoLiberarUniforme.SelectedValue), CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
|
||||
Dim ResultadoEntrada As Integer = ObjInv.AddMovimiento(CInt(DdlAlmacenDestinoLiberarUniforme.SelectedValue), 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
|
||||
|
||||
Dim ResultadoDetalleSalida As Boolean = ObjInv.AddMovimientoDetalle(ResultadoSalida, 1.0, CveUM, CvePS, PU, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
|
||||
Dim ResultadoDetalleEntrada As Boolean = ObjInv.AddMovimientoDetalle(ResultadoEntrada, 1.0, CveUM, CvePS, PU, -1)
|
||||
Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
|
||||
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, 1.0, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
|
||||
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||
Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
|
||||
Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, 1.0, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen)
|
||||
|
||||
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
|
||||
ObjInventario.Commit()
|
||||
Alert("Uniforme liberado")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalUniforme"))
|
||||
CargaUniformesPersonal()
|
||||
CargaUniformesPersonal()
|
||||
Else
|
||||
Alert("No se pudo registrar la liberación.", TipoMensaje.MsgError)
|
||||
ObjInventario.RollBack()
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
ObjInventario.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -5173,7 +5192,7 @@ Partial Class RH_Personal
|
||||
|
||||
#Region "CARGAR IMAGEN"
|
||||
Private Sub LnkSubirFacturas_Click(sender As Object, e As EventArgs) Handles LnkSubirFacturas.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchivo"))
|
||||
End Sub
|
||||
|
||||
Private Sub BtnGuardarArchivo_Click(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click
|
||||
|
||||
Reference in New Issue
Block a user