Usaurios destalle bitrcora y limpieza de modulos
This commit is contained in:
@@ -493,7 +493,7 @@
|
||||
<ajax:TabPanel runat="server" HeaderText="Requisiciones" ID="tabRequisiciones">
|
||||
<ContentTemplate>
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvEstatusUsuariosREQ" GridLines="None" DataKeyNames="CveProyecto,CveSubProyecto" CssClass="table table-striped table-advance table-hover Widthall" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
|
||||
<asp:GridView ID="GvEstatusUsuariosREQ" GridLines="None" DataKeyNames="CveProyecto,CveSubProyecto,SubProyecto" CssClass="table table-striped table-advance table-hover Widthall" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
|
||||
<HeaderStyle VerticalAlign="Middle" />
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Proyecto" DataField="Proyecto" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -836,7 +836,7 @@
|
||||
<ajax:TabPanel ID="tabOrdenesCompra" runat="server" HeaderText="Ordenes de Compra">
|
||||
<ContentTemplate>
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvEstatusUsuariosOC" DataKeyNames="CveProyecto,CveSubProyecto" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
|
||||
<asp:GridView ID="GvEstatusUsuariosOC" DataKeyNames="CveProyecto,CveSubProyecto,SubProyecto" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" Width="100%" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Usuarios Registrados" ToolTip="Listado de Usuarios">
|
||||
<HeaderStyle VerticalAlign="Middle" />
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Proyecto" DataField="Proyecto" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
@@ -371,6 +371,15 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DTOCEstatus As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTOCEstatus"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTOCEstatus") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property CveSucursal As Integer
|
||||
' Get
|
||||
' If ViewState("CveSucursal") Is Nothing Then
|
||||
@@ -462,6 +471,16 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
CreaDtAsignacionesMultiEmpresa()
|
||||
CveEmpresaAnterior = DdlEmpresaAsignaciones.SelectedValue.ToEntero
|
||||
|
||||
Using ObjOc As New ClsOC
|
||||
|
||||
If ObjOc.GetEstatus() Then
|
||||
DTOCEstatus = ObjOc.DtResultados
|
||||
Else
|
||||
DTOCEstatus = New DataTable
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -804,6 +823,7 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
Dim ObjOS As New ClsOS(ObjUsuarios.IniciaTransacSQL())
|
||||
Dim Indicador As New ClsIndicadores(ObjUsuarios.IniciaTransacSQL())
|
||||
Dim ObjBancos As New ClsBancos(ObjUsuarios.IniciaTransacSQL())
|
||||
Dim ObjGenerales As New ClsGenerales(ObjUsuarios.IniciaTransacSQL)
|
||||
|
||||
Dim TieneError = False
|
||||
Dim EsNuevoUsuario As Boolean = False
|
||||
@@ -972,10 +992,19 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
Exit For
|
||||
End If
|
||||
ElseIf dr("Accion").ToString = "2" Then
|
||||
If Not ObjUsuarios.RemoveSubProyectos(CveUsuario, dr("CveSubProyecto").ToString.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
|
||||
If ObjUsuarios.RemoveSubProyectos(CveUsuario, dr("CveSubProyecto").ToString.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
|
||||
If Not ObjGenerales.AddHistorialBitacora(406, -1, -1, -1, -1, -1, -1, -1, "", dr("SubProyecto").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
ElseIf dr("Accion").ToString = "4" Then
|
||||
If Not ObjUsuarios.UpdateSubProyectos(CveUsuario, dr("CveSubProyecto").ToString.ToEntero, dr("ViejoCveSubProyecto").ToString.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
TieneError = True
|
||||
@@ -2372,13 +2401,21 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
UpAsignaciones.Update()
|
||||
End Sub
|
||||
Private Sub GuardaEstatusProyectosREQ(ByRef ObjOC As ClsOC, ByRef HuboErrores As Boolean)
|
||||
|
||||
Dim ObjGenerales As New ClsGenerales(ObjOC.IniciaTransacSQL)
|
||||
|
||||
For Each Row As GridViewRow In GvEstatusUsuariosREQ.Rows
|
||||
|
||||
Dim CveSubProyecto As Integer = Row.DataKey("CveSubProyecto").ToEntero
|
||||
Dim CveProyecto As Integer = Row.DataKey("CveProyecto").ToEntero
|
||||
Dim SubProyecto As String = Row.DataKey("SubProyecto")
|
||||
|
||||
Dim r As Integer = 1
|
||||
|
||||
For i = 2 To Row.Cells.Count - 1
|
||||
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuariosREQ.Columns(i).FooterText), GvEstatusUsuariosREQ.Columns(i).FooterText.ToEntero, 0)
|
||||
Dim EstatusReqStr As String = DTOCEstatus.FiltroPrimeroValor("Estatus", $"CveEmpresa = {UsuarioActual.CveEmpresa} and CveEstatus = {CveEstatus}").ToString
|
||||
|
||||
If CveEstatus > -1 Then
|
||||
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero > 0 Then
|
||||
'Eliminar el registro existente
|
||||
@@ -2386,11 +2423,19 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
If Not ObjGenerales.AddHistorialBitacora(410, -1, -1, -1, -1, -1, -1, -1, "", $"{SubProyecto} {EstatusReqStr}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
ElseIf Row.FCCheckBox("chkEstatus" + r.ToString).Checked = True And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero = -1 Then
|
||||
If Not ObjOC.AddEstatusUsuarios(CveEstatus, CveSubProyecto, CveUsuario, True, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
If Not ObjGenerales.AddHistorialBitacora(409, -1, -1, -1, -1, -1, -1, -1, $"{SubProyecto} {EstatusReqStr}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
r += 1
|
||||
|
||||
@@ -2399,12 +2444,21 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
Next
|
||||
End Sub
|
||||
Private Sub GuardaEstatusProyectoOC(ByRef ObjOC As ClsOC, ByRef HuboErrores As Boolean)
|
||||
|
||||
Dim ObjGenerales As New ClsGenerales(ObjOC.IniciaTransacSQL)
|
||||
|
||||
For Each Row As GridViewRow In GvEstatusUsuariosOC.Rows
|
||||
|
||||
Dim CveSubProyecto As Integer = Row.DataKey("CveSubProyecto").ToEntero
|
||||
Dim CveProyecto As Integer = Row.DataKey("CveProyecto").ToEntero
|
||||
Dim SubProyecto As String = Row.DataKey("SubProyecto")
|
||||
Dim r As Integer = 1
|
||||
For i = 0 To Row.Cells.Count - 1
|
||||
|
||||
Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuariosOC.Columns(i).FooterText), GvEstatusUsuariosOC.Columns(i).FooterText.ToEntero, -1)
|
||||
Dim EstatusOCStr As String = DTOCEstatus.FiltroPrimeroValor("Estatus", $"CveEmpresa = {UsuarioActual.CveEmpresa} and CveEstatus = {CveEstatus}").ToString
|
||||
|
||||
|
||||
If CveEstatus > -1 Then
|
||||
If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero > 0 Then
|
||||
'Eliminar el registro existente
|
||||
@@ -2412,11 +2466,21 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjGenerales.AddHistorialBitacora(408, -1, -1, -1, -1, -1, -1, -1, "", $"{SubProyecto} {EstatusOCStr}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
ElseIf Row.FCCheckBox("chkEstatus" + r.ToString).Checked = True And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero = -1 Then
|
||||
If Not ObjOC.AddEstatusUsuarios(CveEstatus, CveSubProyecto, CveUsuario, True, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
If Not ObjGenerales.AddHistorialBitacora(407, -1, -1, -1, -1, -1, -1, -1, $"{SubProyecto} {EstatusOCStr}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
|
||||
HuboErrores = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
r += 1
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user