<%@ Page Title="" Language="C#" MasterPageFile="~/Management/SiteManage.Master" AutoEventWireup="true" CodeBehind="TitleOriginalVocabulary.aspx.cs" Inherits="Amr.SuperSiteGroup.Web.Management.TitleOriginalVocabulary" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="right" style="text-align: center; margin-top: 10px;">
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        添加标题原创词汇</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                            <table width="100%" border="0" cellspacing="1" cellpadding="1" class="table_list">
                                <tr class="tr1">
                                    <td colspan="2">
                                        <asp:Label ID="laTitle" runat="server" Text="添加标题原创词汇"></asp:Label><br />
                                        <asp:Label ID="laErrorInfo" runat="server" ForeColor="Red"></asp:Label>
                                        <asp:Label ID="laSuccessInfo" runat="server" ForeColor="Green"></asp:Label><br />
                                        添加标题原创词汇，词汇将被添加到页面标题里。
                                    </td>
                                        </tr>
                                <tr>
                                    <td>
                                        <div align="right">
                                            词汇分类：</div></td>
                                    <td align="left">
                                        <asp:DropDownList ID="ddlCategory" runat="server">
                                        </asp:DropDownList>
&nbsp;<asp:LinkButton ID="lbEditCategory" runat="server" onclick="lbEditCategory_Click">【编辑选中分类】</asp:LinkButton>
                                        <asp:LinkButton ID="lbDeleteCategory" runat="server" onclick="lbDeleteCategory_Click" OnClientClick="if(confirm('确认删除词汇分类?所有属于该分类的词汇会一并被删除。')){eval(this.attributes['href'].value)}else{return false}">【删除选中分类】</asp:LinkButton>
&nbsp;<asp:TextBox ID="tbCatagory" runat="server" Width="80" 
                                            Wrap="False" />
                                                    &nbsp;<asp:LinkButton ID="lbAddCategory" runat="server" 
                                            onclick="lbAddCategory_Click">【添加词汇分类】</asp:LinkButton>
                                    </td>
                                        </tr>
                                <tr>
                                    <td>
                                        <div align="right">
                                            原创词汇<font color="red">*</font>：</div></td>
                                    <td align="left">
                                        <validation targetid="<%=tbVocabulary.ClientID%>" targetname="原创词汇" type="text" />
                                                    <asp:TextBox ID="tbVocabulary" runat="server" Width="80" 
                                            Wrap="False" />
                                        &nbsp;
                                                    </td>
                                        </tr>
                                <tr>
                                    <td>
                                        <div align="right">
                                            选择批量导入文件：</div></td>
                                    <td align="left">
                                                    <asp:FileUpload ID="fuVocabulary" runat="server" />
                                        &nbsp;<asp:Label ID="lbEncoding" runat="server" Text="编码"></asp:Label>
                                                    &nbsp;<asp:TextBox ID="tbEncoding" runat="server" Width="80" 
                                            Wrap="False" >gb2312</asp:TextBox>
                                                    &nbsp;文件每行数据请勿超过1000字符（500中文），否则会报错</td>
                                        </tr>
                                <tr>
                                    <td>
                                        <div align="right">
                                            选项：</div>
                                    </td>
                                    <td align="left">
                                        <asp:CheckBox ID="cbIsDefault" CssClass="checkbox" runat="server" 
                                            Text="是否共享（勾选将在站群站点间共享）" Checked="True" />
                                        &nbsp;</td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:LinkButton ID="lbUploadVocabulary" runat="server" 
                                            onclick="lbUploadVocabulary_Click">【批量上传词汇】</asp:LinkButton>
                                        <asp:LinkButton ID="lbSubmit" runat="server" 
                                            Text="【提交单个词汇】" onclick="lbSubmit_Click"  
                                            OnClientClick="return validateForm()" />
                                        &nbsp;<asp:LinkButton ID="lbCancel" runat="server" Text="【取消】" onclick="lbCancel_Click"/>
                                    </td>
                                </tr>
                            </table>
                </td>
            </tr>
        </table>
    </div>
    <div class="clear">
    </div>
        <div class="right" style="text-align: center; margin-top: 10px;">
        <div class="clear">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        标题原创词汇列表</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <div align="left">选择词汇分类：<asp:DropDownList ID="ddlCategorySelect" runat="server">
                                        </asp:DropDownList>
&nbsp;<asp:LinkButton ID="lbSelectCategory" runat="server" Text="【查看分类数据】" 
                        onclick="lbSelectCategory_Click"/>
                                    &nbsp;<asp:LinkButton ID="lbDeleteCategoryOriginal" 
                        runat="server" onclick="lbDeleteCategoryOriginal_Click" 
                        OnClientClick="if(confirm('确认删除分类所有的词汇?数据将不可恢复。')){eval(this.attributes['href'].value)}else{return false}">【删除所有分类词汇】</asp:LinkButton></div>
                    <asp:GridView ID="gvOriginal" runat="server" AutoGenerateColumns="False" 
                        GridLines="None" CssClass="table_list" Width="100%" 
                        EnableModelValidation="True" AllowPaging="True" 
                        onpageindexchanging="gvOriginal_PageIndexChanging" PageSize="20">
                        <Columns>
                            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbEdit" runat="server" CausesValidation="False"
                                        Text="【编辑】" CommandArgument='<%# Bind("OriginalId") %>' onclick="lbEdit_Click"></asp:LinkButton>
                                    &nbsp;<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandArgument='<%# Bind("OriginalId") %>'
                                        Text="【删除】" onclick="lbDelete_Click" OnClientClick="if(confirm('确认删除记录?')){eval(this.attributes['href'].value)}else{return false}"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="OriginalId" HeaderText="编号" 
                                SortExpression="OriginalId" />
                        <asp:CheckBoxField DataField="IsDefault" HeaderText="是否共享" SortExpression="IsDefault" />
                            <asp:BoundField DataField="Vocabulary" HeaderText="原创词汇" />
                        </Columns>
                        <HeaderStyle CssClass="tr1" />
                        <RowStyle CssClass="tr_a" />
                        <AlternatingRowStyle CssClass="tr_b" />
                        <FooterStyle CssClass="dg_header" />
                        <EmptyDataTemplate>没有数据，请先添加</EmptyDataTemplate>
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
    <div class="clear" style="margin-top: 10px;">
    </div>
</asp:Content>
