<%@ Page Language="c#" AutoEventWireup="true" Inherits="Web.Wpdcc.manageRegService" CodeBehind="manageRegService.aspx.cs" %>

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

    <script type="text/javascript">
        $(document).ready(function(){
            
            $("#ok").click(function () {
                return confirm("确定继续执行此操作吗？");
            });
          
            //统一检查页面输入项合法性
            $("#add").click(function(){
                return checkAllValidate();
            });

            $(".FBox").click(function () {
                var h = $(this).attr('href');
                if (h == "#")
                {
                    $.fancybox.cancle();
                }}).fancybox({
                        'width': 550,
                        'height': 480,
                        'hideOnOverlayClick': false,
                        'transitionIn': 'elastic',
                        'transitionOut': 'elastic',
                        'type': 'iframe',
                        'padding': '0'
                });

            $(".FDel").click(function () {
                var s = $(this).attr('data');
                return confirm("您确定要删除" + s + "的注册服务吗？");
            });

        });

    </script>

</head>
<body>
    <div class="list-func-box func-box">
        <div class="hd">
            您的位置：系统数据设置 &gt; 注册服务列表管理
        </div>
        <form id="Form1" method="post" runat="server">
            <div class="bd">
                <div class="function-hd">
                    <div class="search-box fr">
                        服务注册码：
                        <asp:TextBox ID="txtRegServiceCode" runat="server" class="input-txt" notNull="true" MaxLength="100" msgname="服务注册码"></asp:TextBox>
                        &nbsp;&nbsp;对应服务：
                        <asp:DropDownList ID="ddlServiceList" runat="server" CssClass="drop-txt" DataTextField="ServiceName" DataValueField="ServiceId"></asp:DropDownList>
                        &nbsp;&nbsp;
                        <asp:Button ID="add" class="btn" runat="server" Text="添 加" OnClick="add_Click"></asp:Button>
                    </div>
                    <div class="action-field">
                        <asp:Button ID="ok" TabIndex="1" class="btn" runat="server" Text="保 存" CausesValidation="False" OnClick="ok_Click"></asp:Button>
                    </div>
                </div>
                <asp:DataGrid ID="adminDataGrid" class="list-table" runat="server" AutoGenerateColumns="False"
                    OnItemCommand="adminDataGrid_ItemCommand">
                    <Columns>
                        <asp:BoundColumn DataField="pkId" HeaderText="ID" HeaderStyle-CssClass="title"></asp:BoundColumn>
                        <asp:BoundColumn DataField="serviceId" HeaderText="服务名称" HeaderStyle-CssClass="title"></asp:BoundColumn>
                        <asp:BoundColumn DataField="regServiceCode" HeaderText="服务注册码" HeaderStyle-CssClass="title"></asp:BoundColumn>
                        <asp:TemplateColumn HeaderText="审核" HeaderStyle-CssClass="title">
                            <ItemTemplate>
                                <asp:DropDownList ID="isAllowService" runat="server" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.isAllowService") %>' CssClass="drop-txt" Width="90">
                                    <asp:ListItem Value="0" Selected="True">待审</asp:ListItem>
                                    <asp:ListItem Value="1">通过</asp:ListItem>
                                    <asp:ListItem Value="-1">未通过</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:BoundColumn DataField="regTime" HeaderText="注册时间" HeaderStyle-CssClass="title"></asp:BoundColumn>
                        <asp:TemplateColumn HeaderText="执行" HeaderStyle-CssClass="title">
                            <ItemTemplate>
                                <asp:LinkButton ID="del" runat="server" CssClass="FDel blue" CausesValidation="False" CommandName="del" data='<%# Eval("regServiceCode") %>'
                                    CommandArgument='<%# Eval("regServiceCode") %>'>删除</asp:LinkButton>
                                &nbsp;
                            <asp:LinkButton ID="assign" runat="server" CssClass="FBox blue" CausesValidation="False">对应栏目选择</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateColumn>
                    </Columns>
                </asp:DataGrid>
            </div>
            <div class="ft">
                <div class="action-field txt-c">
                </div>
            </div>
        </form>
    </div>
</body>
</html>