From b34283d9c6448b5a72914cef80d0bed0c2392e88 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Mon, 27 Mar 2023 23:29:17 -0700 Subject: [PATCH] --- App_Code/modExtensiones.vb | 160 +++++++++++++++++++- Metronic/assets/admin/layout/css/custom.css | 4 +- Site.master | 134 ++++++++-------- Site.master.vb | 51 +++---- 4 files changed, 255 insertions(+), 94 deletions(-) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index c9901fe10..a8437e242 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -29,6 +29,104 @@ Namespace Extensiones #Region "E X T E N S I O N E S" Public Module ModExtensiones + + Public ReadOnly Property foreign_characters As Dictionary(Of String, String) + Get + Dim fgk As Dictionary(Of String, String) = New Dictionary(Of String, String) From { + {"äæǽ", "ae"}, + {"öœ", "oe"}, + {"ü", "ue"}, + {"Ä", "Ae"}, + {"Ü", "Ue"}, + {"Ö", "Oe"}, + {"ÀÁÂÃÄÅǺĀĂĄǍΑΆẢẠẦẪẨẬẰẮẴẲẶА", "A"}, + {"àáâãåǻāăąǎªαάảạầấẫẩậằắẵẳặа", "a"}, + {"Б", "B"}, + {"б", "b"}, + {"ÇĆĈĊČ", "C"}, + {"çćĉċč", "c"}, + {"Д", "D"}, + {"д", "d"}, + {"ÐĎĐΔ", "Dj"}, + {"ðďđδ", "dj"}, + {"ÈÉÊËĒĔĖĘĚΕΈẼẺẸỀẾỄỂỆЕЭ", "E"}, + {"èéêëēĕėęěέεẽẻẹềếễểệеэ", "e"}, + {"Ф", "F"}, + {"ф", "f"}, + {"ĜĞĠĢΓГҐ", "G"}, + {"ĝğġģγгґ", "g"}, + {"ĤĦ", "H"}, + {"ĥħ", "h"}, + {"ÌÍÎÏĨĪĬǏĮİΗΉΊΙΪỈỊИЫ", "I"}, + {"ìíîïĩīĭǐįıηήίιϊỉịиыї", "i"}, + {"Ĵ", "J"}, + {"ĵ", "j"}, + {"ĶΚК", "K"}, + {"ķκк", "k"}, + {"ĹĻĽĿŁΛЛ", "L"}, + {"ĺļľŀłλл", "l"}, + {"М", "M"}, + {"м", "m"}, + {"ÑŃŅŇΝН", "N"}, + {"ñńņňʼnνн", "n"}, + {"ÒÓÔÕŌŎǑŐƠØǾΟΌΩΏỎỌỒỐỖỔỘỜỚỠỞỢО", "O"}, + {"òóôõōŏǒőơøǿºοόωώỏọồốỗổộờớỡởợо", "o"}, + {"П", "P"}, + {"п", "p"}, + {"ŔŖŘΡР", "R"}, + {"ŕŗřρр", "r"}, + {"ŚŜŞȘŠΣС", "S"}, + {"śŝşșšſσςс", "s"}, + {"ȚŢŤŦτТ", "T"}, + {"țţťŧт", "t"}, + {"ÙÚÛŨŪŬŮŰŲƯǓǕǗǙǛŨỦỤỪỨỮỬỰУ", "U"}, + {"ùúûũūŭůűųưǔǖǘǚǜυύϋủụừứữửựу", "u"}, + {"ÝŸŶΥΎΫỲỸỶỴЙ", "Y"}, + {"ýÿŷỳỹỷỵй", "y"}, + {"В", "V"}, + {"в", "v"}, + {"Ŵ", "W"}, + {"ŵ", "w"}, + {"ŹŻŽΖЗ", "Z"}, + {"źżžζз", "z"}, + {"ÆǼ", "AE"}, + {"ß", "ss"}, + {"IJ", "IJ"}, + {"ij", "ij"}, + {"Œ", "OE"}, + {"ƒ", "f"}, + {"ξ", "ks"}, + {"π", "p"}, + {"β", "v"}, + {"μ", "m"}, + {"ψ", "ps"}, + {"Ё", "Yo"}, + {"ё", "yo"}, + {"Є", "Ye"}, + {"є", "ye"}, + {"Ї", "Yi"}, + {"Ж", "Zh"}, + {"ж", "zh"}, + {"Х", "Kh"}, + {"х", "kh"}, + {"Ц", "Ts"}, + {"ц", "ts"}, + {"Ч", "Ch"}, + {"ч", "ch"}, + {"Ш", "Sh"}, + {"ш", "sh"}, + {"Щ", "Shch"}, + {"щ", "shch"}, + {"ЪъЬь", ""}, + {"Ю", "Yu"}, + {"ю", "yu"}, + {"Я", "Ya"}, + {"я", "ya"} + } + Return fgk + End Get + End Property + Public ReadOnly Property DirectorioBaseEmpresas As String Get If IsNothing(System.Configuration.ConfigurationManager.AppSettings("DirectorioBaseEmpresas")) Then @@ -3826,11 +3924,71 @@ Namespace Extensiones Dim FechaF As DateTime = New DateTime(Year, 10, 1, 23, 59, 59).GetLastWeekdayOfMonth(DayOfWeek.Sunday) 'ULTIMO DOMINGO DE OCTUBRE Return fecha >= FechaI AndAlso fecha <= FechaF + End Function + + + Function RemoveDiacritics(ByVal c As Char) As Char + For Each entry As KeyValuePair(Of String, String) In foreign_characters + + If entry.Key.IndexOf(c) <> -1 Then + Return entry.Value(0) + End If + Next + + Return c + End Function + + + Function RemoveDiacritics(ByVal s As String) As String + Dim text As String = "" + + For Each c As Char In s + Dim len As Integer = text.Length + + For Each entry As KeyValuePair(Of String, String) In foreign_characters + + If entry.Key.IndexOf(c) <> -1 Then + text += entry.Value + Exit For + End If + Next + + If len = text.Length Then + text += c + End If + Next + + Return text End Function End Module #End Region -#Region "C L A S E S" + +#Region "C L A S E S" + Public Class TipoCambioActual + Public Fecha As Date + Public TipoCambio As Decimal + End Class + + Public Class MenuModal + Public Sub New() + HeaderBar = New StringBuilder("
  • Inicio
  • ") + MenuHTML = New StringBuilder() + modpadres = New List(Of String) + End Sub + + Property CveModuloSeleccionado As Integer + Property CveModuloSeleccionadoPadre As Integer + Property dt As DataTable + + Property HeaderBar As StringBuilder + Property MenuHTML As StringBuilder + Property ScriptColorGrupoModulo As String + Property strdomain As String + Property modpadres As List(Of String) + + + End Class Public Class Archivo Public Sub New() filename = "" diff --git a/Metronic/assets/admin/layout/css/custom.css b/Metronic/assets/admin/layout/css/custom.css index e36932996..32a99628f 100644 --- a/Metronic/assets/admin/layout/css/custom.css +++ b/Metronic/assets/admin/layout/css/custom.css @@ -12,7 +12,9 @@ .table-hover > tbody > tr:hover { background-color: #e5e5e5; } - +.page-sidebar-menu .dnone { + display: none; +} .table-striped > tbody > tr:nth-of-type(odd).ADSRow, table > tbody > tr.ADSRow > td, table.table > tbody > tr.ADSRow > td, table > tr.ADSRow > td, table.table > tr.ADSRow > td, diff --git a/Site.master b/Site.master index c67e7ac23..7101ccf0b 100644 --- a/Site.master +++ b/Site.master @@ -13,6 +13,11 @@ + <%: Scripts.Render("~/bundles/modernizr") %> <%: Styles.Render("~/Content/AjaxControlToolkit/Styles/Bundle") %> @@ -149,7 +154,7 @@ -