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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="/Common/js/Common_RegexString.js" type="text/javascript"></script>
    <script src="../js/Setting.TaskPlan.js"></script>
    <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 id="UI_Edit" runat="server" visible="false">
        <form action="" method="post" class="ui-form ui-form-vertical">
            <fieldset class="p5">
                <legend>基本信息</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">任务名称</label><div class="ui-form-ctrls">
                        <input type="text" value="<%=mtp.PlanName %>" class="ui-input-small" name="PlanName" id="PlanName" /><span
                            class="PlanName ui-help-inline">填写一个方便识别的名称</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">执行时间</label><div class="ui-form-ctrls">
                        <input type="text" value="<%=mtp.RunTime %>" class="ui-input-small" name="RunTime" id="RunTime" /><span class="RunTime ui-help-inline">任务开始执行时间，24小时制，如：22:30</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">任务类型</label><div class="ui-form-ctrls">
                        <select name="PlanType" id="PlanType"><%=Web.Lib.Fast.StringFromEnum(typeof(CommonLib.Enums.PlanType),"<option value=\"{1}\" {2}>{0}</option>",new string[]{mtp.PlanType.GetHashCode().ToString()},"selected") %></select><span class="PlanType ui-help-inline">选择要执行检查的任务类型</span>
                    </div>
                </div>

                <div class="ui-form-group">
                    <label class="ui-form-label">通知次数</label><div class="ui-form-ctrls">
                        <input type="text" class="ui-input-mini" value="<%=mtp.MeetNum %>"  name="MeetNum" id="MeetNum" /><span class="MeetNum ui-help-inline">针对同一事件邮件通知最大通知次数</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">任务间隔</label><div class="ui-form-ctrls">
                        <input type="text" class="ui-input-mini" value="<%=mtp.intevalDay %>" name="intevalDay" id="intevalDay" /> 天<span class="intevalDay ui-help-inline">间隔几天执行一次</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label"></label><div class="ui-form-ctrls">
                        <button class="ui-btn ui-btn-primary" type="submit">保存任务</button>
                        <button class="ui-btn" type="button" onclick="history.back();">返回</button>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>

    <div id="UI_List" runat="server" visible="false">
        <table class="ui-table ui-table-bordered">
            <thead>
                <tr>
                    <td colspan="5">
                        <a href="?Action=Add" class="ui-btn ui-btn-primary">添加任务</a></td>
                </tr>
                <tr>
                    <th>任务名称
                    </th>
                    <th>执行时间
                    </th>
                    <th>执行周期
                    </th>
                    <th>上次执行
                    </th>
                    <th>操作
                    </th>
                </tr>
            </thead>
            <%=tList %>
            <tr>
                <td colspan="5" id="Pager" class="Pager" runat="server"></td>
            </tr>
        </table>
    </div>
</asp:Content>
