<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="add.aspx.cs" Inherits="JuSNS.Web.system.gift.add" %>

<!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 id="ptitle" runat="server">增加/修改礼物</title>
    <link href="../images/css/style.css" rel="stylesheet" type="text/css" />

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

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


</head>
<body>
    <table width="99%" border="0" align="center" cellpadding="5" cellspacing="1">
        <tr>
            <td width="120" align="center" valign="top">
                <div class="menu">
                    <ul>
                        <%=this.GetSystemMenu(sort)%>
                    </ul>
                </div>
            </td>
            <td valign="top">
                <div class="navip">
                    <span class="Blue">
                    <a href="index.aspx">礼物管理</a> 
                    <a href="add.aspx">增加礼物</a> 
                    <a href="class.aspx">礼物分类</a> 
                        </span>
                </div>
               <div style="padding:6px 8px 0px 8px;">
                <div id="giftClass" runat="server"></div>
                <form id="form1" runat="server">
                    <table width="100%" border="0" cellpadding="3" cellspacing="1" class="maintable">
                                    <tr class="maintablelist">
                                        <td align="right" style="width: 200px;">
                                            礼物名称</td>
                                        <td align="left" style="width: 678px">
                                            <asp:TextBox ID="gName" runat="server" MaxLength="50" ></asp:TextBox> <asp:RequiredFieldValidator
                                                ID="RequireName" runat="server" ControlToValidate="gName" Display="Dynamic"
                                                ErrorMessage="此项不能为空"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr class="maintablelist">
                                        <td align="right" style="width: 200px;">
                                            图片地址</td>
                                        <td align="left" style="width: 678px">
                                        <asp:FileUpload  ID="fpicture" runat="Server" />
                                       <%if (!string.IsNullOrEmpty(Request.QueryString["ID"]) && JuSNS.Common.Input.IsInteger(Request.QueryString["ID"]))
                                         {%>  
                                       <img src="../../template/images/gift/<%=oldpic %>" align="absmiddle" /> 
                                       <%} %>
                                        </td>
                                    </tr>
                                    <tr class="maintablelist">
                                        <td align="right" style="width: 200px;">
                                            需要积分</td>
                                        <td align="left" style="width: 678px">
                                            <asp:TextBox ID="point" runat="server" Text="0" MaxLength="50" ></asp:TextBox><asp:RequiredFieldValidator
                                                ID="RequiredFieldValidator4" runat="server" ControlToValidate="point" Display="Dynamic"
                                                ErrorMessage="此项不能为空"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr class="maintablelist">
                                        <td align="right" style="width: 200px;">
                                            礼物介绍
                                        </td>
                                        <td align="left" style="width: 678px">
                                            <asp:TextBox ID="Content" runat="server"  TextMode="MultiLine" Height="50px" Width="300px" MaxLength="200" ></asp:TextBox>	
                                        </td>
                                    </tr>
                                    <tr class="maintablelist" id="Tr_City">
                                        <td align="right" style="width: 200px;">
                                            分类
                                        </td>
                                        <td align="left" style="width: 678px">
                                            <asp:DropDownList ID="ClassID" runat="server">
                                            <asp:ListItem Value="0">未分类</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator
                                                ID="RequiredEmails" runat="server" ControlToValidate="ClassID" Display="Dynamic"
                                                ErrorMessage="此项不能为空"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr class="maintablelist">
                                        <td align="right" style="width: 200px">
                                        </td>
                                        <td align="left" colspan="2">
                                            <asp:Button ID="Button1" runat="server" Text=" 保 存 " OnClick="Button1_Click" />
                                            <asp:HiddenField ID="GiftID" Value="0" runat="server" />
                                            <asp:HiddenField ID="opic" Value="0" runat="server" />
                                        </td>
                                    </tr>
                                </table>                    
                </form>
                </div> 
                
            </td>
        </tr>
    </table>
</body>
</html>