-- parametro cveempresa

This commit is contained in:
2023-02-09 18:22:18 -07:00
parent 076a1d4f7b
commit 48a6d03cff

View File

@@ -2,13 +2,14 @@
Option Strict On
Imports System.Data
Imports System.Diagnostics
Imports Extensiones
Partial Class OC_CatEstatus
Inherits ClsPaginas
Inherits ClsPaginas
#Region "Propiedades"
'Local
'Local
Private Property DTEstatusUsuarios As DataTable
Get
Return CType(ViewState("DTEstatusUsuarios"), DataTable)
@@ -56,9 +57,9 @@ Partial Class OC_CatEstatus
Set(value As Integer)
ViewState("CveEstatus") = value
End Set
End Property
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CreaGrid("Req")
@@ -70,13 +71,14 @@ Partial Class OC_CatEstatus
CargaEstatus()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargaUsuarios()
sssss()
'SOLO MUESTRA SUBPROYECTO
'TdProyecto.Visible = False
'TdSubProyectoTitulo.Visible = False
'DivProyecto.Visible = False
'DivProyecto.Visible = False
'LblSubProyecto.Visible = False
DdlSubProyecto_SelectedIndexChanged(DdlSubProyecto, EventArgs.Empty)
@@ -87,11 +89,61 @@ Partial Class OC_CatEstatus
End If
End Sub
Private Sub sssss()
Dim length = 200000
Dim concatString = ""
Dim aaa As New StringBuilder
Dim stopWatch = New Stopwatch()
stopWatch.Start()
For i As Integer = 0 To length - 1
concatString = concatString & i
Next
stopWatch.[Stop]()
aaa.Append($"String Concat took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
stopWatch.Reset()
concatString = String.Empty
stopWatch.Start()
For i As Integer = 0 To length - 1
concatString = $"{concatString}a"
Next
stopWatch.[Stop]()
aaa.Append($"String Interpolation took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
stopWatch.Reset()
concatString = String.Empty
Dim stringBuilder = New StringBuilder()
stopWatch.Start()
For i As Integer = 0 To length - 1
stringBuilder.Append("a")
Next
concatString = stringBuilder.ToString()
stopWatch.[Stop]()
aaa.Append($"String Builder took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
stopWatch.Reset()
concatString = String.Empty
stopWatch.Start()
For i As Integer = 0 To length - 1
concatString = String.Format("a{0}", i)
Next
stopWatch.[Stop]()
aaa.Append($"String.Format took: {stopWatch.ElapsedMilliseconds} ms, for {length} iterations.</br>")
Alert(aaa.ToString)
End Sub
#Region "C A T A L O G O "
Public Sub CargaDatos()
Dim ObjEstatus As New ClsOC
If ObjEstatus.GetEstatus() Then
If ObjEstatus.GetEstatus(UsuarioActual.CveEmpresa) Then
ViewState("DTOCEstatus") = ObjEstatus.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
GlobalDTOCEstatus(UsuarioActual.CveEmpresa) = ObjEstatus.DtResultados
Else
@@ -682,10 +734,13 @@ Partial Class OC_CatEstatus
objEstatusOC.Dispose()
CargaGridEstatusUsuarios("OC")
End Sub
End Sub
#End Region
#End Region
End Class