<%@ page language="C#" autoeventwireup="true" inherits="admin_user_SetGrade, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Import Namespace="D.Common" %>
<%@ Import Namespace="D.BLL" %>
<!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 runat="server">
    <title></title>
    <link id="CssName" rel="stylesheet" type="text/css" runat="server" />

    <script src="../../js/Common.js" type="text/javascript"></script>
    <script src="../../js/<%=B_Lang.getLang() %>/Alert.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                您现在的位置：<a href="../info.aspx">后台管理</a> >> <a href="GradeList.aspx">用户积分等级列表</a> >>
                设置用户积分等级
            </td>
        </tr>
    </table>
    <table class="border" cellspacing="1" cellpadding="0" border="0" align="center">
        <tr>
            <td class="bqleft">
                积分等级名称：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtGradeName" CssClass="in1" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                是否启用：
            </td>
            <td class="bqright">
                <asp:RadioButtonList ID="IsEnabled" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="True" Selected="True">启用</asp:ListItem>
                    <asp:ListItem Value="False">禁用</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                积分等级设置：
            </td>
            <td class="bqright">
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtContent" runat="server" style="display:none"></asp:TextBox>
                                    <asp:GridView ID="GridView1" HeaderStyle-CssClass="title" runat="server" AutoGenerateColumns="False"
                                        CssClass="border" DataKeyNames="Id" RowStyle-CssClass="tdMoveTr" HorizontalAlign="Center" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating">
                                        <RowStyle CssClass="tdMoveTr" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="等级名称">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txt_Name" CssClass="in1" Columns="20" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="标志图片">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txt_Image" CssClass="in1" Columns="15" runat="server" Text='<%# Bind("Image") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <img src="<%=Param.ApplicationRootPath %>/user/images/grade/<%# Eval("Image") %>" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="等级级别">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txt_OrderId" CssClass="in1" Columns="10" runat="server" Text='<%# Bind("OrderId") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("OrderId") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="所需积分">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txt_Integral" CssClass="in1" Columns="10" runat="server" Text='<%# Bind("Integral") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("Integral") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:CommandField HeaderText="操作" ShowEditButton="True" />
                                            <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
                                        </Columns>
                                        <HeaderStyle CssClass="title" Font-Bold="True" />
                                        <EmptyDataTemplate>
                                            <tr class="title">
                                                <td>
                                                    等级名称
                                                </td>
                                                <td>
                                                    标志图片
                                                </td>
                                                <td>
                                                    等级级别
                                                </td>
                                                <td>
                                                    所需积分
                                                </td>
                                                <td>
                                                    操作
                                                </td>
                                                <td>
                                                    删除
                                                </td>
                                            </tr>
                                        </EmptyDataTemplate>
                                    </asp:GridView>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <table class="border" cellspacing="1" cellpadding="0" border="0" align="center" style="margin-bottom:10px;margin-top:10px;">
                                        <tr>
                                            <td class="bqleft" colspan="2"><b>创建一组积分等级</b></td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft">
                                                等级名称：
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtName" runat="server" CssClass="in1"></asp:TextBox> 如：新手上路
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft">
                                                标志图片：
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtImage" runat="server" CssClass="in1"></asp:TextBox> <br />等级图片均保存在/user/images/grade/目录下面 此处填写如：“1/1.gif”
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft">
                                                等级级别：
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtOrderId" runat="server" CssClass="in1"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft">
                                                所需积分：
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtIntegral" runat="server" Text="0" CssClass="in1"></asp:TextBox> 用户升级到此等级所需要的积分数
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft"></td>
                                            <td height="40">
                                                <asp:Button ID="Button1" runat="server" Text=" 创建等级 " CssClass="btn" 
                                                    onclick="Button1_Click" /><asp:Literal ID="Literal2" runat="server"></asp:Literal>
                                                创建、编辑或删除一组积分等级后，需要点击【确认】按钮才能生效
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                积分等级描述：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtDes" runat="server" TextMode="MultiLine" Rows="4" Columns="40"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
            </td>
            <td class="bqright" height="50">
                <asp:Button ID="Button2" runat="server" Text=" 确认 " CssClass="btn radius30 pad_0_30" 
                    onclick="Button2_Click" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
