Lineas adicionales, Cat Empresas Visible para usuarios

This commit is contained in:
Oscar Irigoyen
2022-09-30 08:45:11 -07:00
parent 05bbaec2a1
commit 85872034b0
11 changed files with 226 additions and 188 deletions

View File

@@ -45,7 +45,7 @@ Partial Class Sistemas_CatEmpresas
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If UsuarioActual.CveRol <> 1 Then Response.Redirect("/Inicio.aspx")
'If UsuarioActual.CveRol <> 1 Then Response.Redirect("/Inicio.aspx")
ViewState("Orden") = "CveEmpresa ASC"
ViewState("CveRol") = -1
@@ -117,16 +117,20 @@ Partial Class Sistemas_CatEmpresas
End Sub
Private Sub CargaGrid(Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(GlobalDTEmpresas, "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = GlobalDTEmpresas
End If
Using ObjEmpresas As New ClsSisEmpresas()
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario) Then
GvDatos.DataSource = ObjEmpresas.DtResultados
Else
GvDatos.DataSource = Nothing
End If
End Using
GvDatos.DataBind()
UpDatos.Update()
End Sub
#End Region
End Class