<%@ page language="C#" autoeventwireup="true" inherits="sysadmin_Equipment, App_Web_equipment.aspx.a929186b" enableEventValidation="false" %>



<%@ Register Src="~/sadmin/NewHeader.ascx" TagPrefix="uc1" TagName="NewHeader" %>
<%@ Register Src="~/sadmin/NewFooter.ascx" TagPrefix="uc1" TagName="NewFooter" %>




<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>网上预约系统</title>
    <link href="/control/plugin/bootstrap3/css/bootstrap.min.css" rel="stylesheet" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <script src="/control/js/jquery.js" type="text/javascript"></script>
    <script src="/control/plugin/bootstrap3/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/control/js/msgbox.js" type="text/javascript"></script>
    <link href="/control/css/msgbox.css" rel="stylesheet" />

    <!-- ionicons -->
    <link href="/lib/ionicons/ionicons.min.css" rel="stylesheet" />
    <!-- Animate -->
    <link href="/lib/animate/animate.min.css" rel="stylesheet" />
    <!-- base -->
    <link href="/css/base.css" rel="stylesheet" />
    
    <!--[if lt IE 9]>
      <script src="/js/html5shiv.min.js"></script>
      <script src="/js/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <div class="wrapper">
        <uc1:NewHeader runat="server" ID="NewHeader" />
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                     <h3 class="page-header"><i class="glyphicon glyphicon-envelope"></i> 预约设备 <small> 预定义的事物 </small></h3>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">

                    <div class=" well well-sm  ">
                        <form class="form-inline" action="Equipment.aspx" method="get">
                            <div class="form-group  ">
                                <a href="EquipmentCreate.aspx" class="btn btn-default" id="move-play-list-button"><i class="glyphicon glyphicon-plus"></i>新增预约设备</a>
                            </div>
                            <div class="form-group pull-right">
                                <input id="e_name" name="e_name" value="<%=Request["e_name"] %>" type="text" class="form-control" placeholder="输入预约设备名称" />
                                <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
                            </div>
                        </form>
                    </div>

                    <div class="panel panel-default">
                        <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>
                                            </tr>
                                        </thead>
                                        <tbody>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr>

                                        <td>
                                            <%#Eval("e_name")%>
                                        </td>
                                        <td style="width: 600px">
                                            <%#Eval("e_note")%>
                                        </td>
                                        <td>
                                            <%#((bool)Eval("e_allow"))?"允许":"禁止"%>
                                        </td>

                                        <td>
                                            <a href="EquipmentEdit.aspx?id=<%#Eval("id") %>" class="btn btn-default btn-sm ">编辑</a>
                                            <button type="button" class="btn btn-default btn-sm " onclick="rd('<%#Eval("id") %>')">删除</button>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    </tbody> </table>
                
                             <div class="alert alert-warning" style="display: <%#bool.Parse((rptData.Items.Count==0).ToString())?"block":"none"%>">

                                 <strong>暂无信息</strong>

                             </div>

                                </FooterTemplate>
                            </asp:Repeater>



                        </div>
                    </div>

                    <div class="text-right">
                        <asp:Literal ID="litPage" runat="server"></asp:Literal>
                    </div>

                </div>
            </div>

            <script language="javascript" 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>
        </div>
        <uc1:NewFooter runat="server" ID="NewFooter" />
    </div>
</body>


</html>
