-- parametro cveempresa
This commit is contained in:
@@ -2,13 +2,14 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Diagnostics
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class OC_CatEstatus
|
Partial Class OC_CatEstatus
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
'Local
|
'Local
|
||||||
Private Property DTEstatusUsuarios As DataTable
|
Private Property DTEstatusUsuarios As DataTable
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("DTEstatusUsuarios"), DataTable)
|
Return CType(ViewState("DTEstatusUsuarios"), DataTable)
|
||||||
@@ -56,9 +57,9 @@ Partial Class OC_CatEstatus
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveEstatus") = value
|
ViewState("CveEstatus") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
CreaGrid("Req")
|
CreaGrid("Req")
|
||||||
@@ -70,13 +71,14 @@ Partial Class OC_CatEstatus
|
|||||||
CargaEstatus()
|
CargaEstatus()
|
||||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||||
CargaUsuarios()
|
CargaUsuarios()
|
||||||
|
sssss()
|
||||||
|
|
||||||
'SOLO MUESTRA SUBPROYECTO
|
'SOLO MUESTRA SUBPROYECTO
|
||||||
|
|
||||||
'TdProyecto.Visible = False
|
'TdProyecto.Visible = False
|
||||||
'TdSubProyectoTitulo.Visible = False
|
'TdSubProyectoTitulo.Visible = False
|
||||||
|
|
||||||
'DivProyecto.Visible = False
|
'DivProyecto.Visible = False
|
||||||
'LblSubProyecto.Visible = False
|
'LblSubProyecto.Visible = False
|
||||||
|
|
||||||
DdlSubProyecto_SelectedIndexChanged(DdlSubProyecto, EventArgs.Empty)
|
DdlSubProyecto_SelectedIndexChanged(DdlSubProyecto, EventArgs.Empty)
|
||||||
@@ -87,11 +89,61 @@ Partial Class OC_CatEstatus
|
|||||||
End If
|
End If
|
||||||
End Sub
|
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 "
|
#Region "C A T A L O G O "
|
||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
|
|
||||||
Dim ObjEstatus As New ClsOC
|
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))
|
ViewState("DTOCEstatus") = ObjEstatus.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||||
GlobalDTOCEstatus(UsuarioActual.CveEmpresa) = ObjEstatus.DtResultados
|
GlobalDTOCEstatus(UsuarioActual.CveEmpresa) = ObjEstatus.DtResultados
|
||||||
Else
|
Else
|
||||||
@@ -682,10 +734,13 @@ Partial Class OC_CatEstatus
|
|||||||
|
|
||||||
objEstatusOC.Dispose()
|
objEstatusOC.Dispose()
|
||||||
CargaGridEstatusUsuarios("OC")
|
CargaGridEstatusUsuarios("OC")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user