yzh
2022-05-10 07ac2c7ec9680f936a4393b923785242b799daa0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<%@ Page Language="C#"  masterpagefile="~/Main.master" AutoEventWireup="true" CodeFile="GwStrategy.aspx.cs" Inherits="_GwStrategy" %>
 
 
<asp:Content ID="Content3" ContentPlaceHolderID="content" runat="Server">
<form name="GwStrategyForm" method="post" action="GwStrategy.aspx" id="GwStrategyForm" class="form-inline">
    <div class="listCanvas">
        <table  class="table table-striped table-bordered table-hover">
            <tr>
                <th>
                    策略名称:
                    <input type="text" name="StrategyName" class="form-control" value="<%=StrategyName %>" />
                
                    <input type="submit" value="查询" class="btn btn-primary"/>
                </th>
            </tr>
        </table>
           <table  class="table table-striped table-bordered table-hover">
            <tr class="header">
                <th  style="width: 40px">
                    <input type='checkbox' name='checkAll' id='checkAll' />
                </th>
                <th >
                    策略名称
                </th>
                <th  style="width: 80px">
                    操作
                </th>
            </tr>
            <%=ViewState["list"] %>
        </table>
    </div>
    </form>
    <div class="footBar">
        <!-- .pageBar -->
        <div class="operatorBar">
            <input class="btn btn-primary"value="添  加" onclick="disAdd();" type="button" />
            <input class="btn btn-primary"value="删  除" onclick="disDelSelect();" type="button" />
        </div>
        <!-- .operatorBar -->
    </div>
    <!-- .footBar -->
    <script type="text/javascript" language="javascript">
        function disAdd() {
            location.href = "GwStrategyUpdate.aspx?action=add";
        }
        function disEdit(id) {
            location.href = "GwStrategyUpdate.aspx?action=edit&StrategyId=" + id;
        }
        function disDel(id) {
            if (confirm("你确定要删除吗?")) {
                location.href = "GwStrategyUpdate.aspx?action=del&StrategyId=" + id;
            }
        }
        function disDelSelect() {
            if (confirm("你确定要删除吗?")) {
                var id = "";
                $("input[name='checkbox']:checkbox:checked").each(function () {
                    id = id + $(this).val() + ",";
                });
                if (id != "") {
                    id = id.substring(0, id.length - 1);
                    location.href = "GwStrategyUpdate.aspx?action=delSelect&StrategyId=" + id;
                }
                else {
                    alert("请至少选中一个选项!");
                }
            }
        }
        $(document).ready(function () {
            $("#checkAll").click(function () {
                $("input[name='checkbox']").prop("checked", $(this).is(":checked"));
//                $("input[name='checkbox']").attr("checked", $(this).attr("checked"));
            });
        });
    </script>
</asp:Content>