<%@ Reference Page="~/admin/backup/operate.aspx" %>

<%@ Page Language="c#" Inherits="WebApp.OperateList" CodeBehind="OperateList.aspx.cs" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>操作序列管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/adminCssEdit.htm" -->
</head>
<body>
    <div class="edit-func-box func-box">
        <div class="hd">
            操作序列查看</div>
        <form id="frmOperateList" method="post" runat="server">
        <div class="bd">
            <div class="function-hd">
                <div class="search-box fr">
                </div>
                <!--/search-box-->
                <div class="action-field">
                    <table id="Table2" cellspacing="0" cellpadding="0" width="720" border="0">
                        <tr>
                            <td align="center" width="90" background='./Images/maillistbutton<%Response.Write(GetSelectImage("1","2",DisplayType,0));%>.gif'
                                height="24">
                                <asp:LinkButton ID="btnSend" runat="server" ForeColor="white" CausesValidation="False"
                                    OnClick="btnSend_Click">请求队列</asp:LinkButton>
                            </td>
                            <td align="center" width="90" background='./Images/maillistbutton<%Response.Write(GetSelectImage("1","2",DisplayType,1));%>.gif'
                                height="24">
                                <asp:LinkButton ID="btnExecute" runat="server" ForeColor="white" CausesValidation="False"
                                    OnClick="btnExecute_Click">执行队列</asp:LinkButton>
                            </td>
                            <td align="center" width="90" background='./Images/maillistbutton<%Response.Write(GetSelectImage("1","2",DisplayType,2));%>.gif'
                                height="24">
                                <asp:LinkButton ID="btnFinish" runat="server" ForeColor="white" CausesValidation="False"
                                    OnClick="btnFinish_Click">完成队列</asp:LinkButton>
                            </td>
                            <td align="right" width="440">
                            </td>
                        </tr>
                    </table>
                </div>
                <!--/action-field-->
            </div>
            <asp:DataGrid ID="schoolList" CssClass="list-table" runat="server" AutoGenerateColumns="False"
                     DataKeyField="pkID" OnItemCommand="schoolList_ItemCommand" OnItemDataBound="schoolList_ItemDataBound">
                <Columns>
                    <asp:BoundColumn DataField="pkID" HeaderText="ID" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="applyID" HeaderText="网站ID" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn DataField="schoolName" HeaderText="子站名称" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="操作名称" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:Label ID="lblOperation" runat="server" Text='<%# GetOperation(Convert.ToInt32(DataBinder.Eval(Container, "DataItem.operation").ToString()))%>'>
                            </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="操作状态" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:Label ID="lblOperateState" runat="server" Text='<%# GetOperateState(Convert.ToInt32(DataBinder.Eval(Container, "DataItem.operateState").ToString()))%>'>
                            </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="priority" HeaderText="优先级" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn DataField="remark" HeaderText="说明" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn Visible="False" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:LinkButton ID="btnEditPriority" runat="server" CausesValidation="False" Width="65px"
                                Text="修改优先级" CommandName="edit"></asp:LinkButton>
                            <asp:LinkButton ID="btnDelete" runat="server" CausesValidation="False" Width="33px"
                                Text="删除" CommandName="delete" CommandArgument='<%# GetOperation(Convert.ToInt32(DataBinder.Eval(Container, "DataItem.operation").ToString())) %>'>
                            </asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn Visible="False" DataField="InternalState" HeaderText="内部状态" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="InterRemark" HeaderText="内部说明" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="操作" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:LinkButton ID="btnDel" runat="server" CommandName="Del" Visible="False">删除</asp:LinkButton>
                            <asp:LinkButton ID="btnView" runat="server" CommandName="View">查看详情</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="operation" HeaderText="操作类型" Visible="False" HeaderStyle-CssClass="title"></asp:BoundColumn>
                </Columns>
            </asp:DataGrid>
            <table class="edit-table" >
                <tr style="display: none">
                    <td>
                        ID：
                        <asp:TextBox ID="txtID" runat="server" Enabled="False"></asp:TextBox>&nbsp;优先级：
                        <asp:TextBox ID="txtPriority" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqPriority" runat="server" ErrorMessage="*" Display="Dynamic"
                            ControlToValidate="txtPriority"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="请输入整数！"
                            Display="Dynamic" ControlToValidate="txtPriority" Type="Integer" Operator="DataTypeCheck"></asp:CompareValidator>&nbsp;
                        <asp:Button ID="btnSave" CssClass="btn" runat="server" Text="保存" OnClick="btnSave_Click"></asp:Button>
                    </td>
                </tr>
            </table>
        </div>
        <div class="ft">
            <div class="pagination">
                <asp:Label ID="lblPage" runat="server"></asp:Label>
            </div>
        </div>
        </form>
    </div>
</body>
</html>

<script language="javascript" type="text/javascript">
	function showLog(id)
	{
		javascript:showModalDialog("ViewOperationDetail.aspx?ID="+id,window, "dialogWidth:500px;dialogHeight:300px;help:no;scroll:no;status:no")
	}
</script>

