<%@ Page Language="C#" CodeBehind="manageinfoSearch.aspx.cs" Inherits="Web.User.manageinfoSearch" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>信息查询</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file="../Css/userCssList.htm"-->

    <script language="javascript" type="text/javascript" src="manageinfoSearch.js"></script>
    <script type="text/javascript">
        jQuery(function ($) {
        
             /*列表高度*/
            $('.function-bd').height($(window).innerHeight() - 145);

            $(window).resize(function () {
                $('.function-bd').height($(window).innerHeight() - 145);
            }); 
            
            $("#btnResultClient").click(function(){
                return true;
                }).fancybox({
                //改用弹出层，因为201409发布的最新ghome开始不支持showModalDialog()
                    'type': 'iframe',
                    'width': 480,
                    'height': 420,
                    'hideOnOverlayClick': false,
                    'href': 'manageinfoSearchSelect.html?callback=InfoSearchRequest&result=ResultValueList&isvalidresult=IsValidResult'
            });
            //导入Excel文件
            $("#btnImport").click().fancybox({
                'width'		: 700,
				'height'	: 280,
				'hideOnOverlayClick': false,
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'fade',
				'type'		: 'iframe',
				'padding':'0',
				'href'      : 'infoSearchImport.aspx?bigClassPkId=<%= BigClassId %>&menuId=<%= MenuId %>&pkId=<%= PkId %>'
            });
            //设置查询条件
            $("#btnCondition").click().fancybox({
                'width'		: 800,
				'height'	: 500,
				'hideOnOverlayClick': false,
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'fade',
				'type'		: 'iframe',
				'padding':'0',
				'href'      : 'conditionBox.aspx?bigClassPkId=<%= BigClassId %>&menuId=<%= MenuId %>&pkId=<%= PkId %>'
            });
            
            //显示字段格式设置
            $("#btnFormat").click().fancybox({
                'width'		: 800,
				'height'	: 500,
				'hideOnOverlayClick': false,
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'fade',
				'type'		: 'iframe',
				'padding':'0',
				'href'      : 'resultFormatBox.aspx?bigClassPkId=<%= BigClassId %>&menuId=<%= MenuId %>&pkId=<%= PkId %>'
            });
            //自定义帮助
            $("#btnMemo").click().fancybox({
                'width'		: 600,
				'height'	: 300,
				'hideOnOverlayClick': false,
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'fade',
				'type'		: 'iframe',
				'padding':'0',
				'href'      : 'infoSearchHelp.aspx?bigClassPkId=<%= BigClassId %>&menuId=<%= MenuId %>&pkId=<%= PkId %>'
            });
            
            $("#btnDel").click(function () {
                return GridSelectCheck('InfoList', true);
            });
        });
        
        
        //选中背景特效
        $(function(){
            $('.txt-c input').click(function(){
	            $(this).parents('tr').toggleClass('active');
            })
            
            $('.title.txt-c input').click(function(){
	            
	            if($('.list-table tr:first').hasClass('active')){
		            $('.list-table tr').addClass('active');
	            }else{
		            $('.list-table tr').removeClass('active');
	            }
            })
            
            $('.list-table select').change(function(){
	            //背景选中
	            if($(this).parents('tr').hasClass('active')){
		            
	            }else{
		            $(this).parents('tr').toggleClass('active');
	            }
	            
	            //复选框选中
	            var checkbox = $(this).parents("tr").find("input");
                for (var i = 0; i < checkbox.length; i++) {
                    if (checkbox[i].type == 'checkbox') {
                        checkbox[i].checked = true;
                    }
                }
                
            })
        })
    </script>

</head>
<body>
    <form id="form1" runat="server" method="post">
    <div class="list-func-box func-box">
        <div class="hd">
            <div class="breadcrumb">
                <asp:PlaceHolder ID="placeHead" runat="server"></asp:PlaceHolder>
            </div>
            <!--/breadcrumb-->
            <div class="user-service">
                <a class="help" href="#" title="帮助：Excel内容最后一行请选择删除整行后再保存，否则导入后会出现多余空白数据。">帮助</a>
            </div>
            <!--/user-service-->
        </div>
        <div class="bd">
            <div class="function-hd">
                <div class="search-box fr">
                </div>
                <!--/search-box-->
                <div class="action-field">
                    <input type="button" value="导入Excel" class="btn" id="btnImport" runat="server" />&nbsp;&nbsp;
                    <%--<asp:Button ID="btnImport" class="btn" runat="server" Text="导入Excel" OnClick="Btn_Click" />--%>
                    <input type="button" value="设置查询条件" class="btn" id="btnCondition" runat="server" />&nbsp;&nbsp;
                    <%--<asp:Button ID="btnCondition" class="btn" runat="server" Text="查询条件设置" OnClick="Btn_Click" />--%>
                    <asp:Button ID="btnResultClient" class="btn" runat="server" Text="显示字段设置" />&nbsp;&nbsp;
                    <asp:LinkButton runat="server" ID="Result" Text="显示字段设置" Style="text-decoration: none; display: none" OnClick="Result_Click"></asp:LinkButton>
                    <%--<asp:Button ID="btnFormat" class="btn" runat="server" Text="显示字段格式设置" OnClick="Btn_Click" />--%>
                    <input type="button" value="显示字段格式" class="btn" id="btnFormat" runat="server" />&nbsp;&nbsp;
                    <%--<asp:Button ID="btnMemo" class="btn" runat="server" Text="自定义帮助" OnClick="Btn_Click" />--%>
                    <input type="button" value="自定义帮助" class="btn" id="btnMemo" runat="server" />&nbsp;&nbsp;
                    <asp:Button ID="btnClearData" class="btn" runat="server" Text="清除所有数据" OnClientClick="if (!confirm('真的要清除所有数据吗？清除后不可恢复！')){return false;}" OnClick="Btn_Click" />&nbsp;&nbsp;
                    <asp:Button ID="btnDel" class="btn" runat="server" Text="删 除" OnClick="Btn_Click"></asp:Button>&nbsp;&nbsp;
                    <asp:Button ID="btnCancel" class="btn" runat="server" Text="返 回" OnClick="Btn_Click"></asp:Button>
                </div>
                <!--/action-field-->
            </div>
            <div class="function-bd" style="height: 592px; overflow: auto;">
            <asp:HiddenField ID="hfidstr" runat="server" />
            <asp:HiddenField ID="hftitlestr" runat="server" />
                <asp:GridView ID="InfoList" CssClass="list-table" runat="server" OnDataBound="InfoList_DataBound" >
                <Columns>
                <asp:TemplateField HeaderStyle-CssClass="title txt-c" ItemStyle-CssClass="txt-c" ItemStyle-Width="36px">
                    <ItemTemplate>
                        <asp:CheckBox ID="cbthis" runat="server" Text=""></asp:CheckBox>
                    </ItemTemplate>
                </asp:TemplateField>
                </Columns>
                </asp:GridView>
            </div>
            <div class="ft" id="InfoListBox" runat="server">
                <div class="action-field txt-c">
                    <asp:Label runat="server" ID="Description"></asp:Label>
                    <asp:HyperLink runat="server" ID="First" Text="首页"></asp:HyperLink>
                    <asp:HyperLink runat="server" ID="Previous" Text="上页"></asp:HyperLink>
                    <asp:HyperLink runat="server" ID="Next" Text="下页"></asp:HyperLink>
                    <asp:HyperLink runat="server" ID="Last" Text="尾页"></asp:HyperLink>
                </div>
            </div>
            <div id="ResultBox" style="display: none">
                <asp:ListBox ID="SelectSourceList" runat="server" SelectionMode="Multiple"></asp:ListBox>
                <asp:ListBox ID="SelectDestinationList" runat="server" SelectionMode="Multiple">
                </asp:ListBox>
                <asp:TextBox ID="ResultValueList" runat="server"></asp:TextBox>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
