<%@ Page Language="C#" MasterPageFile="~/Dialog/DialogMaster.Master" AutoEventWireup="true" CodeBehind="FieldMetaList.aspx.cs" Inherits="OAWeb.Dialog.FieldMetaList" Title="无标题页" Theme="Default" EnableViewState="true" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script language="javascript" type="text/javascript"> 
    function OpenEditDialog(Id)
    {
        if (Id != undefined && Id != "")
            OpenDialog( "/Dialog/FieldMetaEdit.aspx?Id=" + Id, "字段编辑");
        else
            OpenDialog("/Dialog/FieldMetaEdit.aspx?ModuleID=" + '<%= base.ModuleId %>', "添加字段");
        return false;
    }    
    </script>
    <div style="width: 700px; height: 500px; overflow-y: scroll">
    <table class="data_title">
        <tr>
            <td class="data_caption" style=" border-bottom:none">
                <a href="/Modules/ModuleList.aspx">视图模块</a> >
                <asp:Label ID="ltlTitle" runat="server" Text=""></asp:Label>(字段源数据管理)
            </td>
        </tr>
    </table>
    <div class="buttons-bar" style=" margin:10px;">
        <asp:Button ID="btnAdd" runat="server" Text="新 增" CssClass="btn_77px" />
        <asp:Button ID="btnDelete" runat="server" Text="删 除" onclick="btnDelete_Click" CssClass="btn_77px" />
    </div>
    <asp:GridView ID="gvData" runat="server" AutoGenerateColumns="False" CssClass="tb-listview" OnRowCommand="gvData_RowCommand" OnRowDataBound="gvData_RowDataBound" DataKeyNames="Id">
        <Columns>
            <asp:TemplateField HeaderText="选择">
                <HeaderTemplate>
                    <input name="chkHeader" onclick="javascript:selectAll(this);" type="checkbox" value="chkHeader" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="chkItem" runat="server"></asp:CheckBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="字段名称" DataField="FieldName">
                <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField HeaderText="显示名称" DataField="FieldLabel">
                <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField HeaderText="类型" DataField="DataType">
                <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField HeaderText="长度" DataField="FieldLength">
                <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkbtnEdit" runat="server">编辑</asp:LinkButton>
                    <asp:LinkButton ID="lnkbtnDel" runat="server" CommandName="cmdDel" CommandArgument='<%#Eval("Id") %>' OnClientClick="return confirm('确定要删除?');">删除</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <RowStyle BackColor="White" />
    </asp:GridView>
    <div class="pager-bar">
        <webdiyer:AspNetPager ID="pager" runat="server" CssClass="anpager" currentpagebuttonclass="cpb" PageSize="10" NextPageText="下一页" LastPageText="页 尾" FirstPageText="第一页" PrevPageText="上一页" ShowBoxThreshold="10" SubmitButtonText="跳 转" AlwaysShow="True" OnPageChanged="pager_PageChanged">
        </webdiyer:AspNetPager>
    </div>
    </div>
</asp:Content>
