<%
    //-----------------------------------------------------------
    // 文件名称: Email_EmailVariableField_Manage.aspx
    // 页面名称: 邮件变量字段管理
    //
    // 描    述: 邮件变量字段 查看/添加/删除/修改
    //
    // 创建标识: Add By 吴建春 2008-06-23
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Email_EmailVariableField_Manage, V5Shop.Shop.Config" culture="auto" uiculture="auto" meta:resourcekey="PageResource1" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<!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 href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <uc3:ManageHeader ID="PageHead" runat="server" />
            <div id="search">
                <!-- 查询部 -->
                <div style="padding-right: 20px; padding-left: 20px; padding-bottom: 20px; padding-top: 20px; border-bottom: #f7f7f7 4px solid">
                    <asp:Label ID="lblName" runat="server" Text="表名:" meta:resourcekey="lblNameResource"></asp:Label>
                    <asp:DropDownList ID="ddlTableName" runat="server">
                        <asp:ListItem Selected="True" Value="-1">请选择</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;
                    <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" meta:resourcekey="btnSearchResource" CssClass="button" /></div>
            </div>
            <div id="content">
                <!-- 明细数据编辑栏 -->
                <div style="padding-right: 25px; padding-left: 25px; padding-bottom: 3px; color: #4b6888; padding-top: 3px; border-bottom: #cccccc 1px solid">
                    <input id="CheckAllBox" onclick="CheckAll()" type="checkbox" class="checkbox" />全选
　
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" meta:resourcekey="btnAddResource2" OnClick="btnAdd_Click"><img src="images/icon/key_add.gif" alt="Read/Write Property"/> 添加</asp:LinkButton>
　
                    <asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnEdit_Click" OnClientClick="return CheckEdit()" CausesValidation="False"><img src="images/icon/key_edit.gif" alt="Read/Write Property"/> 编辑</asp:LinkButton>
　
                    <asp:LinkButton ID="btnDel" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDel_Click" OnClientClick="return CheckDel()"><img src="images/icon/key_delete.gif" alt="Read/Write Property"/> 删除</asp:LinkButton></div>
                <!-- 明细数据 -->
                <div class="listborder">
                    <cc1:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist" HeaderStyle-ForeColor="#000000" CacheName="TableCache_" EmptyDataText="没有可用的信息！" TableName="" Width="100%">
                        <Columns>
                            <asp:TemplateField meta:resourcekey="DetilData">
                                <itemtemplate>
                                    <input runat="server" value='<%# Eval("ID") %>' id="CheckBoxID" type="checkbox" class="checkbox"
                                        onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                                
</itemtemplate>
                                <itemstyle horizontalalign="Center" width="5%" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID" HeaderText="ID">
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="表名" DataField="TableName" SortExpression="TableName">
                                <itemstyle width="20%" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="字段名" DataField="Name" SortExpression="Name">
                                <itemstyle width="20%" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="字段描述" DataField="Descripation" SortExpression="Descripation">
                                <itemstyle width="30%" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="排序号" DataField="OrderID" SortExpression="Age">
                                <itemstyle width="10%" />
                            </asp:BoundField>
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="是否可删除" SortExpression="CanDel">
                                <itemtemplate>
                                	<asp:Label ID="lblSex" runat="server" Text='<%# FormatCanDel(DataBinder.Eval(Container, "DataItem(CanDel)","{0}")) %>'> id="lblSex"></asp:Label>
                                
</itemtemplate>
                                <itemstyle horizontalalign="Center" width="10%" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle CssClass="category" ForeColor="Black" />
                        <PagerSettings Mode="NumericFirstLast" />
                    </cc1:V5ShopGridView>
                </div>
                <asp:Panel runat="server" ID="PanelShow" Visible="False" Width="100%">
                    <div style="text-align: center; background: #f1f1f1">
                        <table cellpadding="0" cellspacing="0" style="width: 500px">
                            <tr>
                                <td align="right" style="height: 30px; width: 20%;">
                                    <asp:Label ID="lblNameAdd" runat="server" Text="表名：" />
                                </td>
                                <td align="left">
                                    <span class="NeedMsg">
                                        <asp:DropDownList ID="ddlTableIDAdd" runat="server" Width="150px">
                                            <asp:ListItem Selected="True" Value="-1">请选择</asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:Button ID="btnTableAdd" runat="server" CssClass="button" OnClick="btnTableAdd_Click" Text="管理" CausesValidation="False" /></span>
                                    </td>
                            </tr>
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label ID="Label1" runat="server" Text="字段名："></asp:Label></td>
                                <td align="left">
                                    <asp:TextBox ID="txtNameAdd" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                                    <span style="color: #ff0000">*</span>
                                    <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txtNameAdd" Display="Dynamic" ErrorMessage="必须输入."></asp:RequiredFieldValidator></td>
                            </tr>
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label ID="lblTrueName" runat="server" Text="字段描述："></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtDescriptionAdd" runat="server" Width="300px" MaxLength="250"></asp:TextBox><span class="NeedMsg"></span></td>
                            </tr>
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label ID="lblTel" runat="server" Text="排序号：" Width="100px"></asp:Label>
                                </td>
                                <td align="left">
                                    <cc1:NumberBox ID="txtOrderIDAdd" runat="server" Width="72px" IsInt="True" Value="1000" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label ID="lblIsLockAdd" runat="server" Text="是否可删除："></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlCanDelAdd" runat="server" meta:resourcekey="ddlIsLockResource" Width="150px">
                                        <asp:ListItem Selected="True" Value="0">不可删除</asp:ListItem>
                                        <asp:ListItem Value="1">可以删除</asp:ListItem>
                                    </asp:DropDownList></td>
                            </tr>
                            <!-- 确定/更新/重置 -->
                            <tr>
                                <td align="center" style="height: 30px" colspan="2">
                                    <asp:Button ID="btnAddSubmit" runat="server" meta:resourcekey="btnAddResource1" OnClick="btnAddSubmit_Click" Text="确定" CssClass="button" />&nbsp;
                                    <asp:Button ID="btnEditSubmit" runat="server" meta:resourcekey="btnEditResource1" OnClick="btnEditSubmit_Click" Text="更新" Visible="False" CssClass="button" />&nbsp;
                                    <input id="iptReset" runat="server" type="reset" value="重置" class="button" /></td>
                            </tr>
                        </table>
                    </div>
                </asp:Panel>
                <uc2:PageBottom ID="PageBottom1" runat="server" />
            </div>
            <div id="hiddenfield">
                <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
                <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
                <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
                <uc1:HiddenField ID="Alert" runat="server" />
            </div>
        </div>
    </form>
</body>
</html>
