<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../Global.Master" CodeBehind="Orders.aspx.cs" Inherits="Web.AdminManager.Product.Orders" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../js/Product.order.js"></script>
    <script src="/Common/jQuery/ui/jquery.ui.core.min.js"></script>
    <link href="/Common/jQuery/themes/jquery.ui.all.min.css" rel="stylesheet" />
    <link href="/Common/jQuery/themes/jquery.ui.datepicker.min.css" rel="stylesheet" type="text/css" />
    <script src="/Common/jQuery/ui/jquery.ui.datepicker.min.js" type="text/javascript"></script>
    <script src="/Common/jQuery/ui/i18n/jquery.ui.datepicker-zh-CN.min.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <ul class="ui-nav-tabs clearfix">
            <li <%=sClassType==0?"class=\"active\"":"" %>>
                <a href="orders.aspx">全部</a>
            </li>
            <%=Web.Lib.Fast.StringFromEnum(typeof(CommonLib.Enums.ClassType),"<li {2}><a href=\"orders.aspx?SClassType={1}\">{0}</a></li>",sClassType.ToString(),"class=\"active\"",new int[]{-1,-2,-3,-4,-5,-6}) %>
        </ul>
    </div>
    <div class="h8"></div>
    <div id="UI_AddDomainUser" runat="server" visible="false">
        <form action="" method="post" class="ui-form ui-form-vertical">
            <fieldset>
                <legend>添加域名订单——本功能用于域名转入</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">订单编号</label>
                    <div>
                        <input type="text" name="SN" value="<%=DateTime.Now.ToString("yyyyMMddHHmmss") %>" readonly="readonly" />
                        <span class="SN ui-help-inline"></span>
                    </div>
                </div>
                
                <div class="ui-form-group">
                    <label class="ui-form-label">所属用户</label><div>
                        <input type="text" name="UserName" id="UserName"
                            class="text ui-widget-content ui-corner-all ui-input-small" value="<%=new BLL.Member().GetUserNameById(mo.UserId) %>" /><span class="UserName ui-help-inline">所属用户名</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">开通日期</label><div>
                        <input type="text" name="BuyDate" id="BuyDate"
                            class="text ui-widget-content ui-corner-all ui-input-small" value="<%=mo.BuyDate.ToString("yyyy-MM-dd") %>" /><span class="BuyDate ui-help-inline">购买日期</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">到期日期</label><div>
                        <input type="text" name="EndDate" id="EndDate"
                            class="text ui-widget-content ui-corner-all ui-input-small" value="<%=mo.EndDate.ToString("yyyy-MM-dd") %>" /><span class="EndDate ui-help-inline">到期日期</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">域名</label><div>
                        <input type="text" name="Domain" id="Domain"
                            class="text ui-widget-content ui-corner-all" value="" /><span class="Domain ui-help-inline">如：qzsys.com</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">接口服务商</label><div>
                        <select name="APIType">
                            <%=CommonLib.Helper.StringFromEnum(typeof(CommonLib.API.Pro_APIType),"<option value=\"{1}\" {2}>{0}</option>",0,"selected") %>
                        </select>
                        <span class="EndDate ui-help-inline"></span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">状态</label><div>
                        已开通
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">&nbsp;</label>
                    <div>
                        <button class="ui-btn ui-btn-primary" type="submit">确认添加</button>
                        <button class="ui-btn" onclick="history.back()" type="button">返回</button>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
    <div id="UI_Edit" runat="server" visible="false">
        <form action="" method="post" class="ui-form ui-form-vertical">
            <fieldset>
                <legend>编辑订单</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">订单编号</label>
                    <div>
                        <%=mo.SN %><a class="ui-btn ui-btn-primary" href="orders.aspx?Action=Control&Id=<%=mo.id %>" target="_blank">点击进入面板</a>
                        <span class="SN ui-help-inline"></span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">产品名称</label>
                    <div><%=mo.OrderName %><span class="OrderName ui-help-inline"></span></div>
                </div>
                <%if (AgentUserId == 1)
                  { %>
                <div class="ui-form-group">
                    <label class="ui-form-label">所属用户</label><div>
                        <input type="text" name="UserName" id="UserName"
                            class="text ui-widget-content ui-corner-all" value="<%=new BLL.Member().GetUserNameById(mo.UserId) %>" /><span class="UserName ui-help-inline">所属用户名</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">开通日期</label><div>
                        <input type="text" name="BuyDate" id="BuyDate"
                            class="text ui-widget-content ui-corner-all" value="<%=mo.BuyDate.ToString("yyyy-MM-dd") %>" /><span class="BuyDate ui-help-inline">购买日期</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">到期日期</label><div>
                        <input type="text" name="EndDate" id="EndDate"
                            class="text ui-widget-content ui-corner-all" value="<%=mo.EndDate.ToString("yyyy-MM-dd") %>" /><span class="EndDate ui-help-inline">到期日期</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">是否允许升级</label><div>
                        <select id="CanUpdate" name="CanUpdate">
                            <option value="true" <%=mo.CanUpdate?"selected":"" %>>允许</option>
                            <option value="false" <%=mo.CanUpdate?"":"selected" %>>不允许</option>
                        </select><span class="CanUpdate ui-help-inline">是否允许升级</span>
                    </div>
                </div>
                <%} %>
                <div class="ui-form-group">
                    <label class="ui-form-label">&nbsp;</label>
                    <div>
                        <%if (AgentUserId == 1)
                          { %>
                        <button class="ui-btn ui-btn-primary" type="submit">保存修改</button><%} %>
                        <button class="ui-btn" onclick="history.back()" type="button">返回</button>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
    <div id="UI_List" runat="server" visible="false">
        <table class="ui-table ui-table-striped">
            <thead>
                <tr>
                    <th colspan="9">
                        <form action="orders.aspx?SClassType=<%=sClassType %>" method="post">
                            <%=GetUserSelecter() %>
                   订单编号：<input type="text" class="ui-input-small" name="SSN" value="<%=SSN %>" />
                            到期期限：<input type="text" class="ui-input-small datep" name="SEndTime" value="<%=SEndTime %>" />
                            已到期用户：<input <%=SIsEndDate?"checked=\"checked\"":"" %> type="checkbox" name="SIsEndDate" value="ON" />
                            <span class="ui-btn-group">
                            <button class="icon-search ui-btn ui-btn-primary" type="submit"></button>
                                <%if (sClassType == 2)
                                  { %>
                            <button class="ui-btn" type="button" onclick="location.href='?Action=AddDomainUser'">添加</button>
                                <%} %>
                            </span>
                        </form>
                    </th>
                </tr>
                <%=TheadString %>
            </thead>
            <%=ShowList%>
            <tr>
                <td id="Pager" runat="server" colspan="9" class="Pager"></td>
            </tr>
        </table>
    </div>
</asp:Content>

