From 4892ae4b4a5d4205b0b33fb54c1b584d291db17a Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 27 Nov 2020 20:19:51 -0700 Subject: [PATCH] --- GPS/RepCombustible.aspx.vb | 3 +- Site.master.vb | 86 ++++++++++++++++++++++---------------- vwd.webinfo | 2 + 3 files changed, 52 insertions(+), 39 deletions(-) diff --git a/GPS/RepCombustible.aspx.vb b/GPS/RepCombustible.aspx.vb index 976c03a04..6df5d34e6 100644 --- a/GPS/RepCombustible.aspx.vb +++ b/GPS/RepCombustible.aspx.vb @@ -311,8 +311,7 @@ Partial Class GPS_RepCombustible End Sub Protected Sub Lnkreportegral_Click(sender As Object, e As EventArgs) - Dim GloBalFileUrl As String = HttpContext.Current.Server.MapPath("~") - Dim file As String = $"{GloBalFileUrl}Empresas\Grales\Formatos\CombustibleGeneral.xlsx" + Dim file As String = $"{DirectorioBaseEmpresas}Empresas\Grales\Formatos\CombustibleGeneral.xlsx" Try Dim wb As New ClosedXML.Excel.XLWorkbook(file) Dim libro = wb.Worksheets(0) diff --git a/Site.master.vb b/Site.master.vb index f9498674c..4cfc112f6 100644 --- a/Site.master.vb +++ b/Site.master.vb @@ -17,7 +17,7 @@ Partial Class Site Return Convert.ToBoolean(HdnEsPopup.Value) End Get Set(value As Boolean) - HdnEsPopup.Value = value.ToString + HdnEsPopup.Value = value.ToString() End Set End Property @@ -26,7 +26,7 @@ Partial Class Site Return HdnPopUpWidth.Value.ToEntero End Get Set(value As Integer) - HdnPopUpWidth.Value = value.ToString + HdnPopUpWidth.Value = value.ToString() End Set End Property Public Property userx As Usuario @@ -39,7 +39,7 @@ Partial Class Site End Property Public Property countNotificaciones As Integer Get - countNotificaciones = If(IsNothing(ViewState("countNotificaciones")), 0, ViewState("countNotificaciones").ToString.ToEntero) + countNotificaciones = If(IsNothing(ViewState("countNotificaciones")), 0, ViewState("countNotificaciones").ToString().ToEntero) End Get Set(value As Integer) ViewState("countNotificaciones") = value @@ -64,10 +64,10 @@ Partial Class Site lblFecha.Text = DateTime.Now.ToString("dd.MMMyyyy HH:mm tt") MasterChat.Visible = False - If Request("Masterimpoup") IsNot Nothing AndAlso Request("Masterimpoup").ToString = "true" Then EsPopup = True + If Request("Masterimpoup") IsNot Nothing AndAlso Request("Masterimpoup").ToString() = "true" Then EsPopup = True If UsuarioActual IsNot Nothing Then - HdnCveE.Value = UsuarioActual.CveEmpresa.ToString - HdnCveU.Value = UsuarioActual.CveUsuario.ToString + HdnCveE.Value = UsuarioActual.CveEmpresa.ToString() + HdnCveU.Value = UsuarioActual.CveUsuario.ToString() LitTit.Text = UsuarioActual.Empresa.EmpresaEncabezado If UsuarioActual.CveUsuario = 100 Then LitTit.Text = String.Format(" Mi Empresa de Ventas ({0}) ", UsuarioActual.CveEmpresa) @@ -81,7 +81,7 @@ Partial Class Site userx = New Usuario userx.Empresa = New Empresa - userx.Referencia = Encripta(UsuarioActual.CveUsuario.ToString) + userx.Referencia = Encripta(UsuarioActual.CveUsuario.ToString()) userx.Usuario = Encripta(UsuarioActual.Usuario) userx.Liga = Encripta(UsuarioActual.Rol) @@ -143,7 +143,7 @@ Partial Class Site Else 'VALIDACION DE SEGURIDAD, EN LA QUE SE VALIDA QUE LA EMPRESA EN LA QUE SE GENERO LA PAGINA SEA LA MISMA A LA DE LA SESION, 'DE NO SER ASI, SE REDIRECCIONA A INICIO. - If UsuarioActual IsNot Nothing AndAlso (HdnCveE.Value <> UsuarioActual.CveEmpresa.ToString OrElse HdnCveU.Value <> UsuarioActual.CveUsuario.ToString) Then + If UsuarioActual IsNot Nothing AndAlso (HdnCveE.Value <> UsuarioActual.CveEmpresa.ToString() OrElse HdnCveU.Value <> UsuarioActual.CveUsuario.ToString()) Then Response.Redirect(FormsAuthentication.DefaultUrl) End If End If @@ -186,7 +186,7 @@ Partial Class Site ' userstring.AppendFormat("{0}{1} ", prefix, item) ' prefix = "," ' Next - ' stringusers = userstring.ToString + ' stringusers = userstring.ToString() ' If userconectedlist.Count > 0 Then ' GlobalDTUsuarios = GlobalDTUsuarios.FiltraParametros(String.Format("CveUsuario in ({0})", userstring)) ' RptChatEmpresa.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa >1", "", {"CveEmpresa", "Empresa"}) @@ -198,7 +198,7 @@ Partial Class Site 'End Sub 'Private stringusers As String = "0" 'Private Sub RptChatEmpresa_ItemDataBound(sender As Object, e As RepeaterItemEventArgs) Handles RptChatEmpresa.ItemDataBound - ' Dim CveEmpresa As Integer = e.Item.DataItem("CveEmpresa").ToString.ToEntero + ' Dim CveEmpresa As Integer = e.Item.DataItem("CveEmpresa").ToString().ToEntero ' Dim GlobalDTUsuarios As DataTable = DirectCast(Application("GlobalDTUsuarios"), DataTable).FiltraParametros(String.Format("CveUsuario in ({0}) AND CveEmpresa ={1}", stringusers, CveEmpresa)) ' Dim rpthijo As Repeater = DirectCast(e.Item.FindControl("RPTChatuser"), Repeater) @@ -312,61 +312,73 @@ Partial Class Site Dim LinkNieto = "" Dim ClassActive As String CveModuloPadreSeleccionado = 0 : CveModuloHijoSeleccionado = 0 : CveModuloNietoSeleccionado = 0 + + Dim strdomain = Request.Url.AbsoluteUri.Replace(Request.Url.PathAndQuery, "") + If Request.Url.Port <> 80 Then + strdomain = strdomain.Replace(String.Format(":{0}", Request.Url.Port), "") + End If Dim MenuHTML As New StringBuilder For Each drP As DataRow In Inicio - CveModuloPadre = drP("CveModulo").ToString.ToEntero - LinkPadre = drP("LIGA").ToString - If drP("PopUp").ToString = "S" Then LinkPadre = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drP("LIGA"), drP("ANCHO"), drP("ALTO")) + CveModuloPadre = drP("CveModulo").ToString().ToEntero + LinkPadre = drP("LIGA").ToString() + If drP("PopUp").ToString() = "S" Then LinkPadre = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drP("LIGA"), drP("ANCHO"), drP("ALTO")) Dim Hijos = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModuloPadre) Order By h!Orden - If CveModulo = drP("CveModulo").ToString.ToEntero Then - HeaderBar.AppendFormat("
  • {1}", LinkPadre, drP("Modulo").ToString) - ScriptColorGrupoModulo = ColorPage(drP("CveGrupoModulo").ToString.ToEntero) + If CveModulo = drP("CveModulo").ToString().ToEntero Then + HeaderBar.AppendFormat("
  • {1}", LinkPadre, drP("Modulo").ToString()) + ScriptColorGrupoModulo = ColorPage(drP("CveGrupoModulo").ToString().ToEntero) End If If Hijos.Count > 0 Then Linkpapa = LinkPadre LinkPadre = LinkBase - MenuHTML.AppendFormat("
  • {2}{1}