<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Field2List.aspx.cs" Inherits="KstCMS.KstCMS_Manager.WebContent.products.protype.Field2List" %>

<html>
<head  runat="server">
    <title></title>

</head>
<body style="background-color:Menu">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"  AllowCustomErrorsRedirect="false"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1"  UpdateMode="Conditional"  runat="server" > 
    <ContentTemplate>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" style="background-color:#FFF">
  <tr>
    <td valign="top">
       <table width="100%" border="0" cellspacing="0" cellpadding="4" style="background-color:ButtonFace">
       <tr>
       <td>
           <asp:TextBox ID="txt_FieldName" runat="server" MaxLength="50"></asp:TextBox>
           <asp:Button ID="Button1" runat="server" Text="增加" OnClientClick="if(this.form.txt_FieldName.value==''){alert('请输入字段名称！');this.form.txt_FieldName.focus();return false;}else{return true;}" /> <input type="button" value="刷新" onclick="mTableRload();" />
       </td>
      
       </tr>
    </table>

<asp:Repeater ID="RepMain" runat="server">
       <HeaderTemplate>    
       <table width="100%" border="0" cellspacing="1" cellpadding="5" class="Table_Gray">
  <tr class="TableHeader">
    <td>ID</td>
    <td>排序</td>
    <td>字段名称</td>
    <td>默认值</td>
    <td>操作</td>
  </tr>
  </HeaderTemplate>
  <ItemTemplate>
  <tr class="TableTd_Gray">
    <td align="center"><%#DataBinder.Eval(Container.DataItem,"FieldId") %></td>
    <td align="center"><input type="text" class="input_text" name="SortNo_<%#DataBinder.Eval(Container.DataItem,"FieldId") %>" value="<%#DataBinder.Eval(Container.DataItem,"SortNo") %>" size="4" /></td>
    <td align="center">
    <input type="text" class="input_text" name="FieldName_<%#DataBinder.Eval(Container.DataItem,"FieldId") %>" value="<%#DataBinder.Eval(Container.DataItem,"FieldName") %>" size="15" maxlength="100" />
    </td>
    <td align="center">
     <input type="button"  value="设置/显示" onclick="OpenDialog('description.aspx?FieldId=<%#DataBinder.Eval(Container.DataItem,"FieldId") %>',750,600)" />
    </td>
    <td align="center">
     <asp:Button ID="btn1" runat="server" CommandArgument="0"  CommandName=<%#DataBinder.Eval(Container.DataItem,"FieldId") %> Text="修改" />
     <asp:Button ID="btn2" runat="server" CommandArgument="1"  CommandName=<%#DataBinder.Eval(Container.DataItem,"FieldId") %> Text="删除" OnClientClick="return confirm('真的删除当前选项吗？');" />
    </td>
  </tr>
  </ItemTemplate>
  <AlternatingItemTemplate>
    <tr class="TableTd_Gray1">
    <td align="center"><%#DataBinder.Eval(Container.DataItem,"FieldId") %></td>
    <td align="center"><input type="text" class="input_text" name="SortNo_<%#DataBinder.Eval(Container.DataItem,"FieldId") %>" value="<%#DataBinder.Eval(Container.DataItem,"SortNo") %>" size="4" /></td>
    <td align="center">
    <input type="text" class="input_text" name="FieldName_<%#DataBinder.Eval(Container.DataItem,"FieldId") %>" value="<%#DataBinder.Eval(Container.DataItem,"FieldName") %>" size="15" maxlength="100" />
    </td>
    <td align="center">
     <input type="button"  value="设置/显示" onclick="OpenDialog('description.aspx?FieldId=<%#DataBinder.Eval(Container.DataItem,"FieldId") %>',750,600)" />
    </td>
    <td align="center">
     <asp:Button ID="btn1" runat="server" CommandArgument="0"  CommandName=<%#DataBinder.Eval(Container.DataItem,"FieldId") %> Text="修改" />
     <asp:Button ID="btn2" runat="server" CommandArgument="1"  CommandName=<%#DataBinder.Eval(Container.DataItem,"FieldId") %> Text="删除" OnClientClick="return confirm('真的删除当前选项吗？');" />
    </td>
  </tr>
  </AlternatingItemTemplate>
  <FooterTemplate>
</table>
</FooterTemplate>
   </asp:Repeater> 
    </td>
  </tr>
</table>
    </ContentTemplate>
   </asp:UpdatePanel> 


    <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
    <ProgressTemplate>请稍候...</ProgressTemplate>
    </asp:UpdateProgress>     

    </form>

        <script type="text/javascript" language="javascript">
            function mTableRload() {
                window.document.location.href = "<%=CurrentUrl %>"
            } 
    </script>
</body>
</html>