<%@ Page Language="C#" AutoEventWireup="True" Inherits="Admin_Model_Default" CodeBehind="Admin_Model_Default.aspx.cs" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="Memu/InfovrsionControl.ascx" TagName="InfovrsionControl" TagPrefix="uc2" %>
<%@ Register Src="Admin_Model_Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<html>
<head id="Head1" runat="server">
  <title>模型管理</title>
  <link href="Css/StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <form id="form1" runat="server">
  <div>
    <uc1:Menu ID="Menu1" runat="server" />
    <table border="0" cellpadding="0" cellspacing="2" class="Table" style="width: 98%">
      <tr>
        <td class="td" style="height: 25px">
          <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False" Width="100%"
            HorizontalAlign="Center" DataKeyNames="ChannelID" CellPadding="2">
            <HeaderStyle Font-Bold="True" Wrap="False" ForeColor="White" CssClass="title" BackColor="#799AE1"
              Height="25px"></HeaderStyle>
            <Columns>
              <asp:BoundField DataField="ChannelID" HeaderText="ID" HeaderStyle-HorizontalAlign="Center">
                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                <ItemStyle Width="20px" HorizontalAlign="Center" />
              </asp:BoundField>
              <asp:BoundField DataField="ChannelName" HeaderText="模型名称" HeaderStyle-HorizontalAlign="Left">
                <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                <ItemStyle Width="150px" />
              </asp:BoundField>
              <asp:BoundField DataField="ChannelTable" HeaderText="数据表名" HeaderStyle-HorizontalAlign="Left">
                <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
              </asp:BoundField>
              <asp:TemplateField HeaderText="数据表类型">
                <ItemStyle HorizontalAlign="Center" Width="100px" />
                <ItemTemplate>
                  <%#GetModelType(Eval("ModelOption"))%>
                </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="状态">
                <ItemStyle HorizontalAlign="Center" Width="50px" />
                <ItemTemplate>
                  <%#GetChecked(Eval("Checked"))%>
                </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="管理操作">
                <ItemTemplate>
                  <a href="Admin_Model_Showinfo.aspx?action=edit&ID=<%#Eval("ChannelID") %>">编辑</a> ｜
                  <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" OnClientClick="return window.confirm('确定删除吗？');"
                    CommandName='<%#Eval("ChannelID") %>'>删除</asp:LinkButton>
                  ｜ <a href="Admin_Field_Default.aspx?ChannelID=<%#Eval("ChannelID") %>">字段管理</a> ｜ <a href="#">禁用</a>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="200px" />
              </asp:TemplateField>
            </Columns>
          </asp:GridView>
        </td>
      </tr>
      <tr>
        <td class="td" style="height: 25px" align="right">
          <webdiyer:AspNetPager ID="myAspNetPager" runat="server" HorizontalAlign="Right" OnPageChanged="myAspNetPager_PageChanged"
            ShowCustomInfoSection="Left" SubmitButtonText=" G O  " CustomInfoHTML="Page  <font color='red'><b>%CurrentPageIndex%</b></font> of  %PageCount%&nbsp;&nbsp;Order %StartRecordIndex%-%EndRecordIndex%"
            PageSize="20">
          </webdiyer:AspNetPager>
        </td>
      </tr>
    </table>
  </div>
  <uc2:InfovrsionControl ID="InfovrsionControl1" runat="server" />
  </form>
</body>
</html>
