<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="configlist.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.sysmanage.configlist" %>

<!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 id="Head1" runat="server">
    <title>参数管理</title>
    <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
    <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
    <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
    <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
    <script src="../scripts/CustomersData.js" type="text/javascript"></script>
    <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <link href="../images/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        var actionNodeID;
        var singleClick;
        var taotleCount="";
         var manager = null;
        $(function () {
            LoadList();
        });

        function LoadList() {
            manager = $("#divDataList").ligerGrid({
                height: '100%',
                columns: [
                { display: '参数代码', name: 'F_ParamCode', align: 'left', width: 100, minWidth: 60 },
                { display: '参数名称', name: 'F_ParamDes', minWidth: 60 },
                { display: '参数值', name: 'F_ParamValue' }
                ], url: '../sysmanage/ajax/systemConfigAction.ashx?action=getSystemlist' + '&keyWords=' + getWhereStr(), pageSize: 10, rownumbers: true,
                 onSelectRow: function (data, rowindex, rowobj) {
                     singleClick = data.F_ParamId;
//                    taotleCount = taotleCount + "," + data.F_ParamId;
                }
            });
            $("#pageloading").hide();
        }


        function getWhereStr() {

            var keyWords = "";
            if (document.getElementById("txtKeywords").value != "") {
                keyWords += document.getElementById("txtKeywords").value;
            }
            return keyWords;
        }
        function Add() {
            $.ligerDialog.open({ url: 'configedit.aspx?action=Add', title: '添加参数信息', height: 300, width: 400, isResize: true
            });
        }

        function modifyEdit() {
            if (singleClick == "" || singleClick == undefined) {
                alert("请选择修改行！");
            } else {
                $.ligerDialog.open({ url: 'configedit.aspx?action=Edit&param=' + singleClick, title: '修改参数信息', height: 300, width: 400, isResize: true
                });
            }
        }
        function DeleteOrder() {
            var row = manager.getSelectedRows();
            var idStr = "";
            jQuery.each(row, function (i, val) {
                idStr += val.F_ParamId + ",";
            });
            idStr = idStr.substring(0, idStr.length - 1);
            if (idStr == "") {
                alert("请选择删除行！");
            } else {
                $.ligerDialog.confirm('确定要删除吗?', function (yes) {
                    if (yes) {
                        gridlist = $("#divDataList").ligerGrid({
                            url: '../sysmanage/ajax/systemConfigAction.ashx?action=delete&taolCount=' + idStr, pageSize: 10, rownumbers: true
                        });
                    }
                    LoadList();
                });
            }
        }

    </script>
</head>
<body style="margin: 0px; padding: 0px; overflow: hidden;">
    <form id="form1" runat="server">
    <div class="tools_box">
        <div class="tools_bar"><a class="tools_btn" href="#" onclick="Add();">
                <span><b class="add">添加</b></span>
            </a>
            <a class="tools_btn" href="#" onclick="modifyEdit();">
                <span><b class="modify">修改</b></span>
            </a>
           <%-- <a href="javascript:void(0);" onclick="checkAll(this);" class="tools_btn"><span><b class="all">全选</b></span></a>--%>
            <a class="tools_btn" href="#" onclick="DeleteOrder();">
                <span><b class="delete">批量删除</b></span>
            </a>
            
            <div class="search_box">
                
                参数代码：<asp:TextBox ID="txtKeywords" runat="server" CssClass="txtInput"></asp:TextBox>&nbsp;&nbsp;
                <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="LoadList();" />
            </div>
        </div>
    </div>
        <div id="divDataList">
    </div>
    </form>
</body>
</html>
