<%@ page language="C#" autoeventwireup="true" inherits="user_room_RoomManager, ALL" enableEventValidation="false" %>


<%@ Register Src="~/user/MyHeader.ascx" TagPrefix="uc1" TagName="MyHeader" %>
<%@ Register Src="~/user/MyFooter.ascx" TagPrefix="uc1" TagName="MyFooter" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>会议室预约系统</title>
    <link href="/control/plugin/bootstrap3/css/bootstrap.min.css" rel="stylesheet" />
    <link href="/admin/css/style.css?v=201721" rel="stylesheet" />

    <script src="/control/js/jquery.js"></script>
    <script src="/control/plugin/bootstrap3/js/bootstrap.min.js"></script>
    <link href="/control/css/msgbox.css" rel="stylesheet" />
    <script src="/control/js/msgbox.js"></script>

    <link href="/control/plugin/bootstrap-treeview/bootstrap-treeview.min.css" rel="stylesheet" />
    <script src="/control/plugin/bootstrap-treeview/bootstrap-treeview.min.js?v=5"></script>


</head>
<body>
    <uc1:MyHeader runat="server" ID="MyHeader1" />
    <div class=" container-fluid">
        <ul class="nav nav-tabs" role="tablist">
                   <%-- <li role="presentation"><a href="/user/ExternalPerson/ExternalPerson.aspx">外部人员管理</a></li>--%>
                    <li role="presentation" ><a href="/user/user/userManager.aspx">用户管理</a></li>
                    <li role="presentation"  class="active"><a href="/user/room/RoomManager.aspx">会议室管理</a></li>
        </ul>
        <div class="panel">
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-3">
                        <div id="tree"></div>
                        <script>
                            $('#tree').treeview({
                                levels: 10000,
                                showTags: true,
                                data: <%=BuilderTree()%>,
                                onNodeSelected: function(event, node) {
                                    setd(node.id);
                                }
                            });
                            function setd(id)
                            {
                                $("#hfdepart").val(id);
                                $("#search").submit();
                            }
                        </script>
                    </div>
                    <div class="col-lg-9">

                        <div class="well">
                            <form id="search" class="form-inline" method="get">

                                <div class="form-group">
                                    <label for="txtstart">会议室名称:</label>
                                    <input type="text" class="form-control" id="txtName" name="name" value="<%=Request["name"] %>" />
                                    <input id="hfdepart" name="depart" type="hidden" />
                                </div>

                                <button type="submit" class="btn btn-default">查询</button>
                                <a type="button" class="btn btn-primary" href="RoomManager_Add.aspx">
                                    <i class="glyphicon glyphicon-plus"></i>添加会议室
                                </a>
                            </form>
                        </div>

                        <div class="panel">
                            <div class="panel-body">
                                <asp:Repeater ID="rptData" runat="server">
                                    <HeaderTemplate>
                                        <table id="dataView" class="table table-hover  ">
                                            <thead>
                                                <tr class='table-heading'>
                                                    <th>序号</th>
                                                    <th>所属机构</th>
                                                    <th>会议室名称</th>
                                                    <th>面积</th>
                                                    <th>可容纳人数</th>
                                                    <th>预约限制</th>
                                                    <th>修改日期</th>
                                                    <th>禁止预订</th>
                                                    <th></th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <%#Eval("rowNum") %>
                                            </td>
                                            <td>
                                                <%#Eval("d_index") %>/<%#Eval("d_name") %>
                                            </td>
                                            <td>
                                                <%#Eval("r_name")%>
                                            </td>
                                            <td>
                                                <%#Eval("r_size")%>
                                            </td>
                                            <td>
                                                <%#Eval("r_maxNumber")%>
                                            </td>



                                            <td>
                                                <%#((bool)Eval("r_bespeak"))?"专员":"不限"%>
                                            </td>

                                            <td>
                                                <%#Eval("r_udate")%>
                                            </td>
                                            <td>
                                                <%#((bool)Eval("r_disable"))?"<span class='label label-danger'>禁止预订</span>":String.Empty%>
                                            </td>
                                            <td>
                                                <a href="RoomManager_Edit.aspx?id=<%#Eval("r_id")%>" class="btn btn-default btn-xs">编辑</a>

                                                <a href="Room_Details.aspx?id=<%#Eval("r_id")%>" class="btn btn-default btn-xs">详细</a>
                                                <a href="Room_Meeting.aspx?id=<%#Eval("r_id")%>" class="btn btn-default btn-xs">会议</a>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </tbody> </table>
                                    </FooterTemplate>
                                </asp:Repeater>

                            </div>

                        </div>




                        <asp:Literal ID="litPage" runat="server"></asp:Literal>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <uc1:MyFooter runat="server" ID="MyFooter1" />

    <%--    <script type="text/javascript">

        function rd(key) {
            if (confirm('确定删除该项！')) {
                ZENG.msgbox.show('删除中...', 6);
                $.ajax({
                    type: "POST",
                    dataType: "json",
                    data: { "did": key },
                    success: function (result) {
                        ZENG.msgbox._hide();
                        if (result.state == 1) {
                            location.reload();
                        } else {
                            alert(result.data);
                        }
                    }
                });
            }
        }
    </script>--%>
</body>
</html>
