<%@ 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/head.htm"-->
</head>
<body>
    <form id="form1" runat="server" method="post">
    <div class="list-func-box func-box">
       <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa  fa-desktop"></i>
                <asp:PlaceHolder ID="placeHead" runat="server"></asp:PlaceHolder>
                    </li></ul>
         <div class="user-service">
                    <span data-original-title="帮助" data-placement="left" data-rel="popover" data-content="Excel内容最后一行请选择删除整行后再保存，否则导入后会出现多余空白数据" data-trigger="hover"><i class="fa fa-question-circle bigger-120 blue"></i></span>
                </div>
           </div>
        <div class="page-content">
            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->
        <div class="bd">
            <div class="page-header clearfix">
                <!--/search-box-->
                <div class="action-field">
                    <input type="button" value="导入Excel" class="btn btn-sm btn-primary" 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 btn-sm btn-primary" id="btnCondition" runat="server" />&nbsp;&nbsp;
                    <%--<asp:Button ID="btnCondition" class="btn" runat="server" Text="查询条件设置" OnClick="Btn_Click" />--%>
                    <asp:Button ID="btnResultClient" class="btn btn-sm btn-primary" 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 btn-sm btn-primary" id="btnFormat" runat="server" />&nbsp;&nbsp;
                    <%--<asp:Button ID="btnMemo" class="btn" runat="server" Text="自定义帮助" OnClick="Btn_Click" />--%>
                    <input type="button" value="自定义帮助" class="btn btn-sm btn-primary" id="btnMemo" runat="server" />&nbsp;&nbsp;
                    <asp:Button ID="btnClearData" class="btn btn-sm btn-primary" runat="server" Text="清除所有数据" OnClientClick="if (!confirm('清除时将清除所有数据和表结构，且不可恢复，您确定要清除吗？')){return false;}" OnClick="Btn_Click" />&nbsp;&nbsp;
                    <asp:Button ID="btnDel" class="btn btn-sm btn-primary" runat="server" Text="删 除" OnClick="Btn_Click"></asp:Button>&nbsp;&nbsp;
                    <asp:Button ID="btnCancel" class="btn btn-sm btn-primary" runat="server" Text="返 回" OnClick="Btn_Click"></asp:Button>
                </div>
                <!--/action-field-->
            </div>
            <div class="function-bd" >
            <asp:HiddenField ID="hfidstr" runat="server" />
            <asp:HiddenField ID="hftitlestr" runat="server" />
                <asp:GridView ID="InfoList" CssClass="table table-striped table-bordered table-hover" runat="server" OnDataBound="InfoList_DataBound" >
                <Columns>
                <asp:TemplateField HeaderStyle-CssClass="title text-center" ItemStyle-CssClass="text-center" 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 text-center">
                    <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>
                     <!-- PAGE CONTENT ENDS -->
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
    <!--#include file="../Css/foot.htm"-->
        <script language="javascript" type="text/javascript" src="manageinfoSearch.js"></script>
    <script type="text/javascript">
        jQuery(function ($) {

            $("#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 () {
            $('.text-center input').click(function () {
                $(this).parents('tr').toggleClass('active');
            })

            $('.title.text-center 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>
</html>
