<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_InfoModel_FieldList, QianboCMS" EnableEventValidation="false" %>
<%@ Import Namespace="Qianbo.BLL.CommonModel" %>
<%@ Import Namespace="Qianbo.Common" %>
<!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/layout.css" type="text/css" rel="stylesheet" />
</head>

<body>
<form id="FieldForm" runat="server">
  <table width="99%" cellspacing="1" cellpadding="0" class="wzdh" align="center">
    <tr>
      <td style="padding-left: 10px;"><img src="../Images/Skin/Default/you.gif" align="absmiddle" /> 您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; <a href="ModelList.aspx">模型列表</a> &gt;&gt; 字段列表</td>
    </tr>
  </table>
  <table cellpadding="0" cellspacing="1" class="border" align="center">
    <tr class="wzlist">
      <td>当前模型：[<asp:Label ID="ModelName" runat="server" Text="Label"></asp:Label>] <a href="SetModelField.aspx?ModelId=<%=Request.QueryString["ModelId"] %>">添加字段</a> | <asp:HyperLink ID="ModelPreViewUrl" runat="server">模型预览</asp:HyperLink> | <a href="ModeldFieldHtml.aspx?ModelId=<%=Request.QueryString["ModelId"] %>">生成静态Html代码</a></td>
    </tr>
  </table>
  <table width="99%" align="center" class="border" cellspacing="1" cellpadding="0">
    <tr class="title">
      <td>字段名</td>
      <td width="180px">字段别名</td>
      <td width="120px">字段类型</td>
      <td width="60px">字段级别</td>
      <td width="60px">是否必填</td>
      <td width="90px">排序</td>
      <td width="90px">管理操作</td>
    </tr>
    <asp:Repeater ID="RepSystemModel" runat="server">
      <ItemTemplate>
        <tr class="tdbg" onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'">
          <td align="left" style="padding-left: 5px;"><%#Eval("Name")%></td>
          <td><%#Eval("Alias")%></td>
          <td><%# Eval("Type","{0}")%></td>
          <td><font color="#339900">系统</font></td>
          <td><%#Eval("IsNotNull")%></td>
          <td></td>
          <td></td>
        </tr>
      </ItemTemplate>
    </asp:Repeater>
    <asp:Repeater ID="RepModelField" runat="server" OnItemCommand="RepModelField_ItemCommand">
      <ItemTemplate>
        <tr class="tdbg" onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'">
          <td align="left" style="padding-left: 5px;"><%#Eval("Name")%></td>
          <td><%#Eval("Alias")%></td>
          <td><%# B_ModelField.GetFieldType(Eval("Type","{0}"))%></td>
          <td>自定义</td>
          <td><%# Function.GetStyleTrue(Eval("IsNotNull","{0}"))%></td>
          <td><asp:LinkButton ID="LinkButton2" runat="server" CommandName="UpMove" CommandArgument='<%# Eval("FieldId") %>'>上移</asp:LinkButton> | <asp:LinkButton ID="LinkButton3" runat="server" CommandName="DownMove" CommandArgument='<%# Eval("FieldId") %>'>下移</asp:LinkButton></td>
          <td><a href="SetModelField.aspx?FieldId=<%# Eval("FieldId") %>&ModelId=<%# Eval("ModelId") %>">修改</a> | <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Delete" CommandArgument='<%# Eval("FieldId") %>' OnClientClick="return confirm('是否确定删除此字段？\r\n删除字段后需要重新生成静态Html代码。')">删除</asp:LinkButton></td>
        </tr>
      </ItemTemplate>
    </asp:Repeater>
  </table>
</form>
<br />
</body>
</html>