Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -507,6 +507,7 @@ Partial Class Inventarios_InventarioFisico
|
||||
FechaFin = GvRow.DataKey("FechaFin").ToEntero
|
||||
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
|
||||
chkUsarApp.Checked = Convert.ToBoolean(GvRow.DataKey("ConAplicacion").ToString)
|
||||
divUsuarios.Visible = chkUsarApp.Checked
|
||||
CargaGvAlmacen()
|
||||
CargaGvClasificacion()
|
||||
CargaGvProductosServicios()
|
||||
|
||||
@@ -161,7 +161,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
End If
|
||||
str.Clear()
|
||||
|
||||
CveAlmacenes = CveAlmacenesStr.ToString.Substring(0, CveAlmacenesStr.Length - 1)
|
||||
CveAlmacenes = CveAlmacenesStr.ToString.Substring(0, CveAlmacenesStr.Length)
|
||||
End If
|
||||
|
||||
If ObjInventario.GetInventarioFisicoDetallesClasificacion(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
@@ -41,6 +41,24 @@ Partial Class Inventarios_RepAnomalias
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property aplicacion As Boolean
|
||||
Get
|
||||
Return CType(ViewState("aplicacion"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("aplicacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CreandoNuevoInventario As Boolean
|
||||
Get
|
||||
Return CType(ViewState("CreandoNuevoInventario"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("CreandoNuevoInventario") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -51,6 +69,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
|
||||
If CveInventarioFisico > 0 Then
|
||||
CargaDatos(CveInventarioFisico)
|
||||
CreandoNuevoInventario = False
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -72,7 +91,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
lbFechaI.Text = Inventario.FechaI
|
||||
lbFechaF.Text = Inventario.FechaF
|
||||
CveSubProyecto = Inventario.CveSubProyectoInventario
|
||||
|
||||
aplicacion = Inventario.ConAplicacion
|
||||
If Inventario.Estatus = "Finalizado" Then
|
||||
btnFin.Visible = False
|
||||
End If
|
||||
@@ -254,7 +273,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvF.RowDataBound, GvS.RowDataBound
|
||||
Protected Sub GVF_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvF.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Costo") = "-1" Then
|
||||
e.Row.Cells(8).Text = "0"
|
||||
@@ -264,6 +283,29 @@ Partial Class Inventarios_RepAnomalias
|
||||
End If
|
||||
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1
|
||||
End If
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
If CreandoNuevoInventario Then
|
||||
e.Row.FCCheckBox("ChkAllFaltante").Attributes.Add("onclick", "SeleccionarTodosFaltante(this);")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GVS_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvS.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Costo") = "-1" Then
|
||||
e.Row.Cells(8).Text = "0"
|
||||
End If
|
||||
If e.Row.Cells(7).Text = MinFecha.ToString Then
|
||||
e.Row.Cells(7).Text = ""
|
||||
End If
|
||||
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1
|
||||
End If
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
If CreandoNuevoInventario Then
|
||||
e.Row.FCCheckBox("ChkAllSobrante").Attributes.Add("onclick", "SeleccionarTodosSobrante(this);")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
@@ -353,14 +395,14 @@ Partial Class Inventarios_RepAnomalias
|
||||
GvF.Columns(0).Visible = True
|
||||
LnkGuardar.Visible = True
|
||||
LnkCrear.Visible = False
|
||||
GvF.HeaderRow.FCCheckBox("ChkAllFaltante").Attributes.Add("onclick", "SeleccionarTodosFaltante(this);")
|
||||
CreandoNuevoInventario = True
|
||||
End If
|
||||
|
||||
If GvS.Rows.Count > 0 Then
|
||||
GvS.Columns(0).Visible = True
|
||||
LnkGuardar.Visible = True
|
||||
LnkCrear.Visible = False
|
||||
GvS.HeaderRow.FCCheckBox("ChkAllSobrante").Attributes.Add("onclick", "SeleccionarTodosSobrante(this);")
|
||||
CreandoNuevoInventario = True
|
||||
End If
|
||||
UPAnomalias.Update()
|
||||
UpdateGvS.Update()
|
||||
@@ -374,13 +416,15 @@ Partial Class Inventarios_RepAnomalias
|
||||
Dim ErrorClasif As Boolean = False
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
Dim CveInventarioFisicoNew As Integer
|
||||
Dim DtAlmacen, DtClasificacion, DtClasificacionExcluida, DtProveedor As DataTable
|
||||
Dim DtAlmacen, DtClasificacion, DtClasificacionExcluida, DtProveedor, DtUsuario As DataTable
|
||||
DtAlmacen = Nothing
|
||||
DtClasificacion = Nothing
|
||||
DtClasificacionExcluida = Nothing
|
||||
DtProveedor = Nothing
|
||||
DtUsuario = Nothing
|
||||
|
||||
ObjInventario.IniciaTransacSQL()
|
||||
If ObjInventario.AddInventarioFisico(UsuarioActual.CveEmpresa, TxtTitulo.Text, lbObservaciones.Text, 0, CveSubProyecto) Then
|
||||
If ObjInventario.AddInventarioFisico(UsuarioActual.CveEmpresa, TxtTitulo.Text, lbObservaciones.Text, 0, CveSubProyecto, aplicacion) Then
|
||||
CveInventarioFisicoNew = ObjInventario.CveInventarioFisico
|
||||
|
||||
If ObjInventario.GetInventarioFisicoDetallesAlmacen(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
@@ -396,6 +440,18 @@ Partial Class Inventarios_RepAnomalias
|
||||
DtProveedor = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
|
||||
End If
|
||||
|
||||
If ObjInventario.GetInventarioFisicoDetallesUsuarios(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
|
||||
DtUsuario = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
|
||||
End If
|
||||
|
||||
|
||||
For Each Gvr As DataRow In DtUsuario.Rows
|
||||
If Not ObjInventario.AddInventarioFisicoUsuarios(CveInventarioFisicoNew, Gvr("CveUsuario").ToString.ToEntero, Convert.ToBoolean(Gvr("Incluye").ToString), Convert.ToBoolean(Gvr("Cerrado").ToString), Convert.ToBoolean(Gvr("Bloqueado").ToString)) Then
|
||||
ErrorClasif = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each Gvr As DataRow In DtAlmacen.Rows
|
||||
If Not ObjInventario.AddInventarioFisicoAlmacenes(CveInventarioFisicoNew, Gvr("CveAlmacen").ToString.ToEntero) Then
|
||||
ErrorClasif = True
|
||||
@@ -455,6 +511,7 @@ Partial Class Inventarios_RepAnomalias
|
||||
GvS.Columns(0).Visible = False
|
||||
LnkGuardar.Visible = False
|
||||
LnkCrear.Visible = True
|
||||
CreandoNuevoInventario = False
|
||||
CargaDatos(CveInventarioFisico)
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
|
||||
Reference in New Issue
Block a user