167 lines
9.3 KiB
Plaintext
167 lines
9.3 KiB
Plaintext
<%@ Page Title="Lista de Empresas con acceso disponible" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PopUpSeleccionarEmpresa.aspx.vb" Inherits="PopUpSeleccionarEmpresa" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
Lista de Empresas con acceso disponible
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
<div style="align-content: center;">
|
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<asp:Button ID="BtnSeleccionar" runat="server" ClientIDMode="Static" Text="Seleccionar" Style="display: none;" class="btn btn-primary" />
|
|
<asp:HiddenField ID="HdnEmpresa" runat="server" ClientIDMode="Static" Value="-1" />
|
|
|
|
<asp:Button ID="BtnSetWindows" runat="server" ClientIDMode="Static" Text="Set Window" Style="display: none;" class="btn btn-primary" />
|
|
<asp:HiddenField ID="HdnAncho" runat="server" ClientIDMode="Static" Value="-1" />
|
|
<asp:HiddenField ID="HdnAlto" runat="server" ClientIDMode="Static" Value="-1" />
|
|
<div id="TblBusqueda" runat="server" border="0" visible="false">
|
|
<div>
|
|
Número de registros encontrados: <b>
|
|
<asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b>
|
|
</div>
|
|
<div>
|
|
<input name="ctl00$C$TxtBusqueda" type="text" id="TxtBusqueda" class="form-control input-sm TxtBusqueda" placeholder="" data-table=".GVSearch" style="width: 100%">
|
|
</div>
|
|
<asp:GridView ID="GvEmpresas" runat="server" DataKeyNames="CveUsuario, Contraseña, Usuario,CveEmpresa" AutoGenerateColumns="false"
|
|
Width="100%" ToolTip="Listado de Empresas a las que tiene acceso." CssClass="table table-striped table-advance table-hover GVSearch" Style="margin-top: -10px; text-align: center;"
|
|
GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Empresa</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="LnkEmp" runat="server" CssClass="Texto" Text='<%# Eval("Empresa")%>' CommandArgument='<%# Eval("CveEmpresa") %>' CommandName="Cambia"></asp:LinkButton>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
<RowStyle CssClass="Texto" />
|
|
<HeaderStyle HorizontalAlign="Left" />
|
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
|
</asp:GridView>
|
|
|
|
<asp:GridView ID="GvPortalRastreo" runat="server" DataKeyNames="CveUsuario, CveCliente, Contraseña, Usuario,CveEmpresa" AutoGenerateColumns="false" ShowHeaderWhenEmpty="false" OnRowDataBound="GvPortalRastreo_RowDataBound"
|
|
Width="100%" ToolTip="Listado de Empresas a las que tiene acceso." CssClass="table table-striped table-advance table-hover GVSearch"
|
|
Style="margin-top: -10px; text-align: center;" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Portal Rastreo</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:HyperLink ID="HlpPortal" runat="server" CssClass="Texto" Target="_blank" Text='<%# Eval("Cliente")%>' ></asp:HyperLink>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" />
|
|
<HeaderStyle HorizontalAlign="Left" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
|
|
<asp:GridView ID="GvPortalCliente" runat="server" DataKeyNames="CveUsuario, CveCliente, Contraseña, Usuario, CveEmpresa" AutoGenerateColumns="false" ShowHeaderWhenEmpty="false"
|
|
Width="100%" ToolTip="Listado de Empresas a las que tiene acceso." CssClass="table table-striped table-advance table-hover GVSearch"
|
|
Style="margin-top: -10px; text-align: center;" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Portal del Cliente</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="LnkEmp" runat="server" CssClass="Texto" Text='<%# Eval("ClienteEmpresa")%>' CommandArgument='<%# Eval("CveCliente") %>' CommandName="Cambia"></asp:LinkButton>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" />
|
|
<HeaderStyle HorizontalAlign="Left" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
<asp:GridView ID="GvPortalProveedor" runat="server" DataKeyNames="CveUsuario, CveProveedor, Contraseña, Usuario, CveEmpresa" AutoGenerateColumns="false" ShowHeaderWhenEmpty="false"
|
|
Width="100%" ToolTip="Listado de Empresas a las que tiene acceso." CssClass="table table-striped table-advance table-hover GVSearch"
|
|
Style="margin-top: -10px; text-align: center;" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField>
|
|
<HeaderTemplate>Portal del Proveedor</HeaderTemplate>
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="LnkEmp" runat="server" CssClass="Texto" Text='<%# Eval("ProveedorEmpresa")%>' CommandArgument='<%# Eval("CveProveedor") %>' CommandName="Cambia"></asp:LinkButton>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" />
|
|
<HeaderStyle HorizontalAlign="Left" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
<script type="text/javascript">
|
|
|
|
jQuery(document).ready(function () {
|
|
buscarDT();
|
|
Sys.Application.add_load(function (s, e) {
|
|
buscarDT();
|
|
});
|
|
});
|
|
document.body.onload = function () {
|
|
alertSize();
|
|
}
|
|
|
|
|
|
function Ir(c) {
|
|
$get("HdnEmpresa").value = c;
|
|
$('#BtnSeleccionar').click();
|
|
}
|
|
|
|
function Ir2(url) {
|
|
//gotourl('/PortalGPS/InicioGPS.aspx');
|
|
gotourl(url);
|
|
}
|
|
|
|
function Ir3() {
|
|
gotourl('/Inicio.aspx');
|
|
}
|
|
|
|
function Ir4() {
|
|
gotourl('/PortalCliente/PortalCliente.aspx');
|
|
}
|
|
function Ir5() {
|
|
gotourl('/PortalProveedor/PortalProveedor.aspx');
|
|
}
|
|
|
|
function buscarDT() {
|
|
$('.TxtBusqueda').on('keyup', function () {
|
|
if (this.value == '') {
|
|
$('table' + $(this).attr('data-table') + ' tr').css('display', '');
|
|
} else {
|
|
$('table' + $(this).attr('data-table') + ' tr').css('display', 'none');
|
|
$('table' + $(this).attr('data-table') + ' tr:contains("' + this.value + '")').css('display', '');
|
|
}
|
|
});
|
|
$('.TxtBusqueda').removeClass('TxtBusqueda');
|
|
}
|
|
function alertSize() {
|
|
var myWidth = 0, myHeight = 0;
|
|
if (typeof (window.innerWidth) == 'number') {
|
|
//Non-IE
|
|
myWidth = window.innerWidth;
|
|
myHeight = window.innerHeight;
|
|
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
|
|
//IE 6+ in 'standards compliant mode'
|
|
myWidth = document.documentElement.clientWidth;
|
|
myHeight = document.documentElement.clientHeight;
|
|
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
|
|
//IE 4 compatible
|
|
myWidth = document.body.clientWidth;
|
|
myHeight = document.body.clientHeight;
|
|
}
|
|
$get("HdnAncho").value = myWidth;
|
|
//$get("TablaGeneral").style.width = myWidth;
|
|
$get("HdnAlto").value = myHeight;
|
|
|
|
//$('#BtnSetWindows').click();
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|