<%@ page language="C#" autoeventwireup="true" inherits="user_Booking, App_Web_booking.aspx.6cc23264" enableEventValidation="false" %>

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

<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>网上预约系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link href="/control/plugin/bootstrap3/css/bootstrap.min.css" rel="stylesheet" />
    <script src="/control/js/jquery.js"></script>
    <script src="/control/plugin/bootstrap3/js/bootstrap.min.js"></script>
    <link href="/user/css/user.css" rel="stylesheet" />
    <script src="/control/plugin/My97DatePicker/WdatePicker.js"></script>
    <link href="/control/css/msgbox.css" rel="stylesheet" />
    <script src="/control/js/msgbox.js"></script>
    <!--[if lt IE 9]>
      <script src="/js/html5shiv.min.js"></script>
      <script src="/js/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <uc1:MyHeader runat="server" ID="MyHeader" />
    <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 class=" well well-sm  ">
                    <form class="form-inline" action="Teacher.aspx" method="post">
                        <div class="form-group  ">
                            <a href="CreateBooking.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="t_name" name="t_name" value="<%=Request["t_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>--%>

                                            <th>管理员审核</th>
                                            <th>创建日期</th>
                                            <th></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td>
                                        <%#Eval("rowNum") %>
                                    </td>
                                    <td>
                                        <a href="BookingDetails.aspx?id=<%#Eval("id") %>"><%#Eval("e_name")%></a>
                                    </td>
                                    <td>
                                        <%#GetName((int)Eval("b_stype"))%>
                                    </td>
                                <%--<td>
                                        <%#GetVerify((int)Eval("b_tVerify"))%>
                                    </td>--%>
                                    <td>
                                        <%#GetVerify((int)Eval("b_mVerify"))%>
                                    </td>
                                    <td>
                                        <%#Eval("b_cdate")%>
                                    </td>
                                    <td>
                                        <button type="button" class="btn btn-default " 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>
                <asp:Literal ID="litPage" runat="server"></asp:Literal>

            </div>
        </div>

        <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>
    </div>

</body>


</html>
