<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="attachtypesgrid.aspx.cs"
    Inherits="FangPage.Admin.attachtypesgrid" %>

<%@ Register TagPrefix="cc1" Namespace="FangPage.Control" Assembly="FangPage.Control" %>
<%@ Register TagPrefix="cc2" Namespace="FangPage.Control" Assembly="FangPage.Control" %>
<!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>
    <title>上传附件类型</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="styles/bmsmanager.css" type="text/css" rel="stylesheet">
    <link href="styles/datagrid.css" type="text/css" rel="stylesheet">

    <script type="text/javascript" src="js/common.js"></script>

    <meta content="MSHTML 6.00.3790.0" name="GENERATOR">
</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div class="Navbutton" style="width: 98%;">
    <table cellspacing="1" cellpadding="4" align="left" class="table1">
        <tbody>
            <tr>
                <td width="60">&nbsp;
                <input title="选中/取消选中" onclick="CheckAll(this.form)" type="checkbox" name="chkall"
                        id="chkall" />全选
                </td>
                <td align="left">
                    <cc1:Button ID="DelRec" runat="server" Text=" 删 除 " ButtonImgUrl="images/del.gif"
                        OnClick="DelRec_Click"></cc1:Button>
                </td>
            </tr>
        </tbody>
    </table>
    </div>
    <cc1:DataGrid ID="DataGrid1" runat="server" OnItemDataBound="DataGrid_ItemDataBound" IsFixConlumnControls="true">
        <Columns>
            <asp:TemplateColumn HeaderText="选择">
                <ItemTemplate>
                    <input id="id" onclick="javascript:SH_SelectOne(this)" type="checkbox" value="<%# DataBinder.Eval(Container, "DataItem.id").ToString() %>"
                        name="id" />
                    <%# DataGrid1.LoadSelectedCheckBox(DataBinder.Eval(Container, "DataItem.id").ToString())%>
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="id" SortExpression="id" HeaderText="ID" Visible="false">
            </asp:BoundColumn>
            <asp:TemplateColumn ItemStyle-HorizontalAlign="Left" HeaderText="扩展名">
              <ItemTemplate>
              &nbsp;&nbsp;&nbsp;&nbsp;<img src="<%# GetFileTypeIco(DataBinder.Eval(Container, "DataItem.extension").ToString())%>" style="vertical-align:middle" border="0" />&nbsp;
              <%# DataBinder.Eval(Container, "DataItem.extension").ToString()%>
              </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="maxsize" SortExpression="maxsize" HeaderText="最大尺寸(单位:字节)">
            </asp:BoundColumn>
            <asp:TemplateColumn HeaderText="文件类型">
                <ItemTemplate>
                    <%# FileTypeStr(DataBinder.Eval(Container, "DataItem.type").ToString())%>
                </ItemTemplate>
            </asp:TemplateColumn>
        </Columns>
    </cc1:DataGrid>
    <div class="Navbutton">
        <cc1:Button ID="SaveAttachType" runat="server" Text=" 保存修改" OnClick="SaveAttachType_Click">
        </cc1:Button>
        <div class="ManagerForm">
        <fieldset>
            <legend style="background: url(images/icon32/NewWeb.gif) no-repeat 6px; padding-left:40px;">添加上传文件类型</legend>
            <table cellspacing="0" cellpadding="4" class="table1" align="center" width="100%">
                <tr>
                    <td class="td1" width="10%">
                        扩展名：
                    </td>
                    <td class="td1" width="40%">
                        <cc2:TextBox ID="extension" runat="server" RequiredFieldType="暂无校验" IsReplaceInvertedComma="true"
                            MaxLength="15" Size="15" HintInfo="允许上传的文件类型,不用输入&quot;.&quot;"></cc2:TextBox>
                        
                    </td>
                    <td class="td2" width="10%">
                     文件类型：   
                    </td>
                    <td class="td2" width="40%">
                        <cc1:DropDownList ID="type" runat="server">
                        </cc1:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="td1" width="10%">选择大小：</td>
                    <td class="td1" width="40%">
                    <select onchange="document.getElementById('maxsize').value=this.value">
                            <option value="">请选择</option>
                            <option value="51200">50K</option>
                            <option value="102400">100K</option>
                            <option value="153600">150K</option>
                            <option value="204800">200K</option>
                            <option value="256000">250K</option>
                            <option value="307200">300K</option>
                            <option value="358400">350K</option>
                            <option value="409600">400K</option>
                            <option value="512000">500K</option>
                            <option value="614400">600K</option>
                            <option value="716800">700K</option>
                            <option value="819200">800K</option>
                            <option value="921600">900K</option>
                            <option value="1024000">1M</option>
                            <option value="2048000">2M</option>
                            <option value="4096000">4M</option>
                     </select>
                    </td>
                    <td class="td1" width="10%">最大尺寸：</td>
                    <td class="td1" width="40%"><cc2:TextBox ID="maxsize" runat="server" RequiredFieldType="数据校验" Size="9" MaxLength="8"></cc2:TextBox>(单位:字节)</td>
                </tr>
                <tr>
                    <td colspan="4" align="center">
                        <cc1:Button ID="AddNewRec" runat="server" Text=" 添 加 " OnClick="AddNewRec_Click">
                        </cc1:Button>
                    </td>
                </tr>
            </table>
        </fieldset>
    </div>
    </div>
    <cc1:Hint ID="Hint1" runat="server" HintImageUrl="images"></cc1:Hint>
    </form>
</body>
</html>
