Commit inicial Ventas Productivo
This commit is contained in:
241
Masters/Site42.master
Normal file
241
Masters/Site42.master
Normal file
@@ -0,0 +1,241 @@
|
||||
<%@ Master Language="VB" AutoEventWireup="false" CodeFile="~/Masters/Site42.master.vb" Inherits="Masters_Site42" CodeFileBaseClass="BaseMasterPage" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>Sistema de Información Gerencial</title>
|
||||
<link type="text/css" rel="stylesheet" href="/Styles/Estilos42.css" />
|
||||
<link type="text/css" rel="stylesheet" href="/Styles/thickbox.css" media="screen" />
|
||||
<link type="image/x-icon" rel="shortcut icon" href="~/Imagenes/favicon.ico" />
|
||||
<link type="text/css" rel="stylesheet" href="/Styles/ui-lightness/jquery-ui-1.8.15.custom.css" />
|
||||
<link href="/Styles/css" rel="stylesheet" type="text/css" />
|
||||
<script src="/Scripts/js" type="text/javascript"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body id="mBody" runat="server" style="margin-left: 40px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;">
|
||||
<form id="form1" runat="server">
|
||||
<asp:ScriptManager ID="TSM" runat="server" EnableHistory="true" EnableSecureHistoryState="true" ScriptMode="Release" EnableScriptGlobalization="true" AsyncPostBackTimeout="600" >
|
||||
<CompositeScript>
|
||||
<Scripts>
|
||||
<asp:ScriptReference Path="~/Scripts/jquery.js" />
|
||||
<asp:ScriptReference Path="~/Scripts/jquery.dataTables.min.js" />
|
||||
<%--<asp:ScriptReference Path="~/Scripts/jquery-1.4.4.min.js" />--%>
|
||||
<asp:ScriptReference Path="~/Scripts/jquery-ui-1.8.15.custom.min.js" />
|
||||
<asp:ScriptReference Path="~/Scripts/funciones.js" />
|
||||
<asp:ScriptReference Path="~/Scripts/FixFocus.js" />
|
||||
<asp:ScriptReference Path="~/Scripts/jquery.thickbox.js" />
|
||||
<asp:ScriptReference Path="~/Scripts/jquery.fancybox-1.3.4.js" />
|
||||
<asp:ScriptReference Path="~/Scripts/jquery.maskedinput-1.2.2.min.js" />
|
||||
<asp:ScriptReference Path="~/Scripts/raphael.2.1.0.min.js" />
|
||||
<asp:ScriptReference Path="~/Scripts/justgage.1.0.1.min.js" />
|
||||
</Scripts>
|
||||
</CompositeScript>
|
||||
</asp:ScriptManager>
|
||||
<asp:HiddenField ID="HdnEsPopup" runat="server" Value="false" />
|
||||
<asp:HiddenField ID="HdnPopUpWidth" runat="server" Value="400" />
|
||||
<table id="TablaPrincipal" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr id="TrPrincipal" runat="server" clientidmode="Static">
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" style="width: 995px; border: 0;">
|
||||
<tr>
|
||||
<td colspan="2" class="MenuEspacio">
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="vertical-align: top">
|
||||
<td colspan="2">
|
||||
<table id="TablaUsuario" class="TablaUsuario" cellspacing="0" cellpadding="0">
|
||||
<tr style="display: none;">
|
||||
<td colspan="2"><asp:Label ID="LblMasterNombre" runat="server" Text="Juan Pérez"></asp:Label></td>
|
||||
</tr>
|
||||
<tr style="text-transform: capitalize">
|
||||
<td> Usuario: <asp:Label ID="LblMasterUsuario" runat="server" Text="Usuario"></asp:Label>
|
||||
<asp:LinkButton ID="LnkBtnCerrarSesion" runat="server" CssClass="cerrar_sesion" CausesValidation="False">
|
||||
<img src="../Imagenes/Imagenes42/logout_32.png" alt="Cerrar Sesión"/></asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="MenuPrincipal" colspan="2">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="width: 143px">
|
||||
<asp:UpdatePanel ID="UPDMENU" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div style="z-index: 2000;">
|
||||
<asp:Menu ID="MenuPPal" Visible="true" runat="server" Height="28px" RenderingMode="Table" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False" BorderWidth="0px" StaticBottomSeparatorImageUrl="/Imagenes/separador42.gif" ClientIDMode="Static">
|
||||
<LevelMenuItemStyles>
|
||||
<asp:MenuItemStyle CssClass="menu_ppal" Font-Underline="False" />
|
||||
<asp:MenuItemStyle CssClass="menu_submenu" Font-Underline="False" HorizontalPadding="5" />
|
||||
<asp:MenuItemStyle CssClass="menu_submenu" Font-Underline="False" HorizontalPadding="5" />
|
||||
<asp:MenuItemStyle CssClass="menu_submenu" Font-Underline="False" HorizontalPadding="5" />
|
||||
</LevelMenuItemStyles>
|
||||
<StaticMenuItemStyle BackColor="Transparent" BorderColor="Transparent" ForeColor="White" Height="28px" Width="143px" />
|
||||
<StaticHoverStyle ForeColor="Silver" />
|
||||
<Items>
|
||||
<asp:MenuItem NavigateUrl="#" Text="Menú" Value="Menu"></asp:MenuItem>
|
||||
</Items>
|
||||
<DynamicMenuItemStyle Width="143px" CssClass="menu_submenu" />
|
||||
<DynamicMenuStyle CssClass="menuZIndex" />
|
||||
</asp:Menu>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td class="MenuDerecha">
|
||||
<table cellpadding='0' cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:ContentPlaceHolder ID="H" runat="server"> </asp:ContentPlaceHolder>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table id="TablaGeneral" cellspacing="0" cellpadding="0" border="0" width="995px" runat="server">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<table id="TablaContenido" cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
|
||||
<tr>
|
||||
<td class="TituloPPal" align="center">
|
||||
<asp:ContentPlaceHolder ID="E" runat="server"></asp:ContentPlaceHolder>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" id="tdContenido" class="contenido" valign="top" style="height: 600px">
|
||||
|
||||
<!-- ========================================== EMPIEZA CONTENIDO ========================================== -->
|
||||
|
||||
<asp:ContentPlaceHolder ID="C" runat="server"></asp:ContentPlaceHolder>
|
||||
|
||||
<!-- ========================================== TERMINA CONTENIDO ========================================== -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="menu_arriba">
|
||||
<td align="right">
|
||||
<table id="trBusc" cellpadding='0' cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td id="tdOS" runat="server" title="Buscar Órdenes de Servicio" visible="False">
|
||||
<img src="/Imagenes/separador42.gif" alt="" />
|
||||
<img alt="Buscar Órdenes de Servicio" onclick="AbrirVentana('/OS/PopUpBuscarOS.aspx',800,500,'popBuscarOS');" height="25px" src="/Imagenes/ImgOS.png" style="cursor: pointer;" />
|
||||
</td>
|
||||
<td id="tdProv" runat="server" title="Buscar Proveedor" visible="False">
|
||||
<img src="/Imagenes/separador42.gif" alt="" />
|
||||
<img alt="Buscar Proveedor" onclick="AbrirVentana('/Compras/PopUpBuscarProveedor.aspx',800,500,'popBuscarProv');" height="25px" src="/Imagenes/ImgProveedor.png" style="cursor: pointer;" />
|
||||
|
||||
</td>
|
||||
<td id="tdCliente" runat="server" title="Buscar Cliente" visible="False">
|
||||
<img src="/Imagenes/separador42.gif" alt="" />
|
||||
<img alt="Buscar Cliente" onclick="AbrirVentana('/Ventas/PopUpBuscarClientes.aspx',800,500,'popBuscarCliente');" height="25px" src="/Imagenes/ImgCliente.png" style="cursor: pointer;" />
|
||||
|
||||
</td>
|
||||
<td id="tdVentas" runat="server" title="Buscar Venta" visible="False">
|
||||
<img src="/Imagenes/separador42.gif" alt="" />
|
||||
<img alt="Buscar Factura de Ventas" onclick="AbrirVentana('/Ventas/PopUpBuscarFolio.aspx',800,500,'popBuscarFacturaV');" height="25px" src="/Imagenes/Nota.gif" style="cursor: pointer;" />
|
||||
|
||||
</td>
|
||||
<td id="tdCompras" runat="server" title="Buscar Compra" visible="False">
|
||||
<img src="/Imagenes/separador42.gif" alt="" />
|
||||
<img alt="Buscar Factura de Compra" onclick="AbrirVentana('/Compras/PopUpBuscarFolioC.aspx',800,500,'popBuscarFacturaC');" height="25px" src="/Imagenes/IconoFactura.jpg" style="cursor: pointer;" />
|
||||
|
||||
</td>
|
||||
<td id="tdPersonal" runat="server" title="Buscar Personal" visible="False">
|
||||
<img src="/Imagenes/separador42.gif" alt="" />
|
||||
<img alt="Buscar Personal" onclick="AbrirVentana('/RH/PopUpBuscarPersonal.aspx',980,547,'popBuscarPersonal');" height="25px" src="/Imagenes/Personal.png" style="cursor: pointer;" />
|
||||
|
||||
</td>
|
||||
<%-- <td id="tdProspectos" runat="server" title="Buscar Prospecto" visible="False">
|
||||
<img src="/Imagenes/separador42.gif" alt="" />
|
||||
<asp:Image ID="ImgProspecto" ToolTip="Buscar Prospecto" Height="25px" ImageUrl="/Imagenes/Prospecto.png" runat="server" Style="cursor: pointer;" />
|
||||
|
||||
</td>--%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="DivAlert1" style="width: 100%; height: 100%; position: absolute; top: 0px; background-color: #fde8b2; filter: alpha(opacity=80); opacity: 0.8; text-align: center; vertical-align: middle; display: none; z-index: 5000;"></div>
|
||||
<div id="DivAlert" style="width: 100%; height: 100%; position: absolute; top: 0px; text-align: center; vertical-align: middle; display: none; z-index: 5001;">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="height: 100%">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="300px">
|
||||
<tr>
|
||||
<td style="filter: alpha(opacity=100);">
|
||||
<img src="/Imagenes/Mensajes/TopLeft.png" alt="" />
|
||||
</td>
|
||||
<td style="background-image: url(/Imagenes/Mensajes/TopMiddle.png)">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="300px">
|
||||
<tr>
|
||||
<td align="left" id="AlerttdTitulo">Advertencia</td>
|
||||
<td align="right">
|
||||
<img src="/Imagenes/BotonCerrar.gif" id="_AlertImgCerrar" style="cursor: pointer" alt="" onclick="OcultaAlert();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<img src="/Imagenes/Mensajes/TopRight.png" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-image: url(/Imagenes/Mensajes/MiddleLeft.png)">
|
||||
<img src="/Imagenes/Mensajes/MiddleLeft.png" alt="" />
|
||||
</td>
|
||||
<td align="left" style="background: #FFFFFF;">
|
||||
<img src="/Imagenes/Mensajes/Exclamation.jpg" id="AlertImg" width="50px" style="float: left;" alt="" /><span id="AlertSPMsg"></span><br />
|
||||
</td>
|
||||
<td style="background-image: url(/Imagenes/Mensajes/MiddleRight.png)">
|
||||
<img src="/Imagenes/Mensajes/MiddleRight.png" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-image: url(/Imagenes/Mensajes/MiddleLeft.png)">
|
||||
<img src="/Imagenes/Mensajes/MiddleLeft.png" alt="" />
|
||||
</td>
|
||||
<td id="AlerttdBtn" style="background: #FFFFFF;" align="right">
|
||||
<input id="_AlertCmdAceptar" type="button" value="Aceptar" onclick="OcultaAlert();" />
|
||||
<input id="_AlertCmdCancelar" type="button" value="Cancelar" style="display: none;" onclick="OcultaAlert(); return false;" />
|
||||
</td>
|
||||
<td style="background-image: url(/Imagenes/Mensajes/MiddleRight.png)">
|
||||
<img src="/Imagenes/Mensajes/MiddleRight.png" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="/Imagenes/Mensajes/BottomLeft.png" alt="" />
|
||||
</td>
|
||||
<td style="background-image: url(/Imagenes/Mensajes/BottomMiddle.png)">
|
||||
</td>
|
||||
<td>
|
||||
<img src="/Imagenes/Mensajes/BottomRight.png" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
156
Masters/Site42.master.vb
Normal file
156
Masters/Site42.master.vb
Normal file
@@ -0,0 +1,156 @@
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Masters_Site42
|
||||
Inherits BaseMasterPage
|
||||
|
||||
|
||||
#Region "Propiedades"
|
||||
'ReadOnly Property UsuarioActual() As Usuario
|
||||
' Get
|
||||
' UsuarioActual = DirectCast(Session("UsuarioSIG"), Usuario)
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public Overrides Property EsPopup() As Boolean
|
||||
Get
|
||||
Return Convert.ToBoolean(HdnEsPopup.Value)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
HdnEsPopup.Value = value.ToString
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Property PopupWidth() As Integer
|
||||
Get
|
||||
Return HdnPopUpWidth.Value.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
HdnPopUpWidth.Value = value.ToString
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Menu"
|
||||
Private Sub CargaMenu()
|
||||
Dim Menu As MenuItem = MenuPPal.Items(0) 'Es la opción que dice menú, y este aparece siempre
|
||||
|
||||
|
||||
Try
|
||||
If Not UsuarioActual.Portal Then 'si no es un cliente o proveedor
|
||||
|
||||
Dim dt As New DataTable
|
||||
dt.ReadXml(String.Format("{0}\Menu\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
|
||||
Dim Inicio = From i In dt.AsEnumerable Where i!CvePadre.Equals(0) Order By i!Orden
|
||||
Dim CveModulo As Integer
|
||||
For Each dr As DataRow In Inicio
|
||||
CveModulo = dr("CveModulo").ToString.ToEntero
|
||||
Dim it As New MenuItem With {.Text = dr("Modulo").ToString, .Value = dr("CveModulo").ToString, .NavigateUrl = dr("Liga").ToString}
|
||||
If dr("PopUp").ToString = "S" Then it.NavigateUrl = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", dr("LIGA"), dr("ANCHO"), dr("ALTO"))
|
||||
|
||||
Menu.ChildItems.Add(it)
|
||||
Dim Hijos = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModulo) Order By h!Orden
|
||||
If Hijos.Count > 0 Then
|
||||
For Each drr As DataRow In Hijos
|
||||
Dim hit As New MenuItem With {.Text = drr("Modulo").ToString, .Value = drr("CveModulo").ToString, .NavigateUrl = drr("Liga").ToString}
|
||||
Dim CveModuloNewPadre As Integer = drr("CveModulo").ToString.ToEntero
|
||||
If drr("PopUp").ToString = "S" Then hit.NavigateUrl = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drr("LIGA"), drr("ANCHO"), drr("ALTO"))
|
||||
it.ChildItems.Add(hit)
|
||||
|
||||
Dim Hijos2 = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModuloNewPadre) Order By h!Orden
|
||||
If Hijos2.Count > 0 Then
|
||||
For Each drr2 As DataRow In Hijos2
|
||||
Dim hit2 As New MenuItem With {.Text = drr2("Modulo").ToString, .Value = drr2("CveModulo").ToString, .NavigateUrl = drr2("Liga").ToString}
|
||||
If drr2("PopUp").ToString = "S" Then hit2.NavigateUrl = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drr2("LIGA"), drr2("ANCHO"), drr2("ALTO"))
|
||||
hit.ChildItems.Add(hit2)
|
||||
Next
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
MenuPPal.Visible = False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrió un error al cargar el menú.", TipoMensaje.MsgError)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
If EsPopup Then
|
||||
TrPrincipal.Visible = False
|
||||
mBody.Attributes.CssStyle("background") = ""
|
||||
TablaGeneral.Width = String.Format("{0}px", PopupWidth.ToString)
|
||||
End If
|
||||
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
LblMasterNombre.Text = UsuarioActual.Nombre
|
||||
'LblMasterPerfil.Text = UsuarioActual.Rol
|
||||
LblMasterUsuario.Text = UsuarioActual.Usuario
|
||||
'If UsuarioActual.Empresa IsNot Nothing Then LblMasterEmpresa.Text = UsuarioActual.Empresa.Empresa
|
||||
'If UsuarioActual.CveEmpresa = 41 Then TREmpresa.Visible = False
|
||||
'Recargo el menu
|
||||
|
||||
CargaMenu()
|
||||
CargaBuscadores()
|
||||
|
||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacion Then
|
||||
LblMasterUsuario.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpCambiaUsuario.aspx',600,630,'Usuarios');")
|
||||
End If
|
||||
|
||||
'ImageMap1.ImageUrl = String.Format("/Empresas/{0}/Banner/{0}.png", UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkBtnCerrarSesion_Click(sender As Object, e As EventArgs) Handles LnkBtnCerrarSesion.Click
|
||||
|
||||
'If Request.ServerVariables("URL").ToUpper.Contiene("/Portal/ConsultaCliente.aspx".ToUpper) Then
|
||||
' ' UsuarioActual.CerrarSession(True)
|
||||
'Else
|
||||
' UsuarioActual.CerrarSession()
|
||||
'End If
|
||||
|
||||
'UsuarioActual.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaBuscadores()
|
||||
'Proveedores
|
||||
If UsuarioActual.TienePermisoPagina(37) Then tdProv.Visible = True
|
||||
|
||||
'Clientes
|
||||
If UsuarioActual.TienePermisoPagina(26) Then tdCliente.Visible = True
|
||||
|
||||
'Factura de Ventas
|
||||
If UsuarioActual.TienePermisoPagina(6) Then tdVentas.Visible = True
|
||||
|
||||
'Personal
|
||||
If UsuarioActual.TienePermisoPagina(46) Then tdPersonal.Visible = True
|
||||
|
||||
'Compras
|
||||
If UsuarioActual.TienePermisoPagina(38) Then tdCompras.Visible = True
|
||||
|
||||
'Ordenes Servicio
|
||||
If UsuarioActual.TienePermisoPagina(135) Then tdOS.Visible = True
|
||||
|
||||
''Prospectos
|
||||
'If UsuarioActual.TienePermisoPagina(181) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');")
|
||||
''ProspectosRedes
|
||||
'If UsuarioActual.TienePermisoPagina(183) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Redes',980,547,'popBuscarProspectos');")
|
||||
''ProspectosG15
|
||||
'If UsuarioActual.TienePermisoPagina(187) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Atn',980,547,'popBuscarProspectos');")
|
||||
''ProspectosSIP
|
||||
'If UsuarioActual.TienePermisoPagina(207) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=SIP',980,547,'popBuscarProspectos');")
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user