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

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>操作序列管理</title>
    <meta name="description" content="overview &amp; stats" />

    <!--#include file = "../assets/head.htm" -->
</head>
<body class="no-skin">
    <form id="frmOperateList" method="post" runat="server">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <div class="breadcrumbs" id="breadcrumbs">
                <script type="text/javascript">
                    try { ace.settings.check('breadcrumbs', 'fixed') } catch (e) { }
                </script>

                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa fa-home home-icon"></i>
                        主页
                    </li>
                    <li>系统操作
                    </li>
                    <li class="active">执行序列查看</li>
                </ul>
                <!-- /.breadcrumb -->


                <!-- /section:basics/content.searchbox -->
            </div>

            <!-- /section:basics/content.breadcrumbs -->

            <div class="page-content">

                <!-- /section:settings.box -->

                <!-- PAGE CONTENT BEGINS -->

                <div class="row">
                    <div class="col-xs-12">
                        <!-- #section:elements.tab -->
                        <div class="tabbable">
                            <ul class="nav nav-tabs" >
                                <li class="<%Response.Write(GetSelectImage("", "active", DisplayType, 0));%>">
                                    <asp:LinkButton ID="btnSend" runat="server" CausesValidation="False"
                                        OnClick="btnSend_Click">请求队列</asp:LinkButton>
                                </li>

                                <li class="<%Response.Write(GetSelectImage("", "active", DisplayType, 1));%>">
                                    <asp:LinkButton ID="btnExecute" runat="server" CausesValidation="False"
                                        OnClick="btnExecute_Click">执行队列</asp:LinkButton>
                                </li>

                                <li class="<%Response.Write(GetSelectImage("", "active", DisplayType, 2));%>">
                                    <asp:LinkButton ID="btnFinish" runat="server" CausesValidation="False"
                                        OnClick="btnFinish_Click">完成队列</asp:LinkButton>
                                </li>
                            </ul>

                            <div class="tab-content">
                                <div class="tab-pane fade active in">
                                    <asp:DataGrid ID="schoolList" CssClass="table table-striped table-bordered" 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" Text="修改优先级" CommandName="edit"></asp:LinkButton>
                                                    <asp:LinkButton ID="btnDelete" runat="server" CausesValidation="False" 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>
                                                    <div class="action-buttons">
                                                    <asp:LinkButton ID="btnView" runat="server" CommandName="View" CssClass="FBox" href='<%# Eval("pkId","ViewOperationDetail.aspx?ID={0}")%>' >
                                                        <i class="ace-icon fa fa-search-plus bigger-130" title="查看详情" ></i>
                                                    </asp:LinkButton>
                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:BoundColumn DataField="operation" HeaderText="操作类型" Visible="False" HeaderStyle-CssClass="title"></asp:BoundColumn>
                                        </Columns>
                                    </asp:DataGrid>

                                    <div class="clearfix">
                                        <div class="col-xs-12">
                                            <asp:Label ID="lblPage" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                    
                                    <div class="row" style="display:none ;">
                                        <div class="hr hr22 hr-dotted"></div>
                                        <div class="col-xs-6">
                                                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 btn-sm btn-primary" runat="server" Text="保存" OnClick="btnSave_Click"></asp:Button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <!--#include file = "../assets/foot.htm" -->
    <script lang="javascript" type="text/javascript">
        jQuery(function ($) {
            //编辑：打开弹出层
            $(".FBox").click().fancybox({
                autoSize: false,
                'width': 600,
                'height': 430,
                'hideOnOverlayClick': false,
                'type': 'iframe',
                'padding': '0'
            });

        });
    </script>
</body>
</html>



