From 48a6d03cff420833720ea18afdd2696143b7516a Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 9 Feb 2023 18:22:18 -0700 Subject: [PATCH] -- parametro cveempresa --- OC/CatEstatus.aspx.vb | 77 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 11 deletions(-) diff --git a/OC/CatEstatus.aspx.vb b/OC/CatEstatus.aspx.vb index 7a5600c37..48e439649 100644 --- a/OC/CatEstatus.aspx.vb +++ b/OC/CatEstatus.aspx.vb @@ -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.
") + 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.
") + 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.
") + 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.
") + 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