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

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



<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <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/plugin/bootstrap-treeview/bootstrap-treeview.min.css" rel="stylesheet" />
    <script src="/control/plugin/bootstrap-treeview/bootstrap-treeview.min.js"></script>

</head>
<body>
    <uc1:MyHeader runat="server" ID="MyHeader" />
    <div class="container-fluid">

        <div class="row">
            <div class="col-lg-8 col-lg-offset-2">

                <h3 class="page-header" style="margin: 15px 0 20px;">编辑基本信息<small> 编辑会议室基本信息</small></h3>

                <%--            <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href="/admin/Room/Room_Details.aspx?id=<%=Request["id"] %>">编辑基本信息</a></li>
                    <li role="presentation">
                        <a href="/admin/Room_Equipment/Room_Equipment.aspx?id=<%=Request["id"] %>">编辑会议室设备</a>
                    </li>
                </ul>--%>

                <div class="panel">
                    <div class="panel-body">

                        <form id="from1" runat="server">
                            <!-- Add.aspx -->
                             <div>
                                <div id="tree"></div>
                                <script type="text/javascript">
                                    $(function(){
                                       $('#tree').treeview({
                                                    levels: 1000,
                                                    showTags: true,
                                                    onNodeSelected: function(event, node) {
                                                        $("#txtdepart").val(node.id);
                                                    },
                                                    onNodeUnselected: function (event, node) {
                                                        $("#txtdepart").val("");
                                                    },
                                                    data: <%=BuilderTree()%>
                                         });
                                        
                                    });
                                 
                                </script>


                                <asp:TextBox ID="txtdepart" runat="server" Style="display: none"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvEmp" runat="server" ForeColor="Red" ErrorMessage="请选择所属机构" ControlToValidate="txtdepart"></asp:RequiredFieldValidator>
                            </div>

                            <div class="form-group">
                                <label class=" control-label">
                                    会议室名称<span class='rd'>*</span>：  
                <asp:RequiredFieldValidator ID="rfvr_name" runat="server" ForeColor="Red" ErrorMessage="请填写会议室名称" ControlToValidate="txtr_name"></asp:RequiredFieldValidator>
                                </label>
                                <asp:TextBox ID="txtr_name" runat="server" MaxLength="50" CssClass="form-control"></asp:TextBox>
                            </div>
                            <div class="form-group">
                                <label class=" control-label">
                                    预订限制：  
                                </label>
                                <div>
                                    <div class="radio-inline">
                                        <label>
                                            <asp:RadioButton ID="rbAll" Checked="true" GroupName="xz" runat="server" />
                                            允许所有用户预订
                                        </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <asp:RadioButton ID="rbZhuanyuan" GroupName="xz" runat="server" />
                                            会议室专员预订
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class=" control-label">
                                    面积<span class='rd'>*</span>： 
                <asp:RequiredFieldValidator ID="rfvr_size" runat="server" ForeColor="Red" ErrorMessage="请填写面积" ControlToValidate="txtr_size"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revr_size" ForeColor="Red" runat="server" ErrorMessage="必须为数字" ControlToValidate="txtr_size" ValidationExpression="^[0-9]\d*$"></asp:RegularExpressionValidator></label>

                                <asp:TextBox ID="txtr_size" runat="server" MaxLength="8" CssClass="form-control"></asp:TextBox>
                            </div>
                            <div class="form-group">
                                <label class=" control-label">
                                    可容纳人数<span class='rd'>*</span>：    
                <asp:RequiredFieldValidator ID="rfvr_maxNumber" runat="server" ForeColor="Red" ErrorMessage="请填写可容纳人数" ControlToValidate="txtr_maxNumber"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revr_maxNumber" ForeColor="Red" runat="server" ErrorMessage="必须为数字" ControlToValidate="txtr_maxNumber" ValidationExpression="^[0-9]\d*$"></asp:RegularExpressionValidator>
                                </label>

                                <asp:TextBox ID="txtr_maxNumber" runat="server" MaxLength="8" CssClass="form-control"></asp:TextBox>
                            </div>
                            <div class="form-group">
                                <label class=" control-label">
                                    所在位置<span class='rd'>*</span>：  
                <asp:RequiredFieldValidator ID="rfvr_position" runat="server" ForeColor="Red" ErrorMessage="请填写所在位置" ControlToValidate="txtr_position"></asp:RequiredFieldValidator>
                                </label>

                                <asp:TextBox ID="txtr_position" runat="server" MaxLength="255" CssClass="form-control"></asp:TextBox>
                            </div>

                            <div class="form-group">
                                <label class=" control-label">会议室设置</label>
                                <div class="checkbox">
                                    <label>
                                        <asp:CheckBox ID="cbDisable" runat="server" />
                                        禁止预订
                                    </label>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class=" control-label">
                                    使用注意事项<span class='rd'>*</span>：  
                <asp:RequiredFieldValidator ID="rfvr_note" runat="server" ForeColor="Red" ErrorMessage="请填写使用注意事项" ControlToValidate="txtr_note"></asp:RequiredFieldValidator>
                                </label>

                                <asp:TextBox ID="txtr_note" runat="server" MaxLength="255" TextMode="MultiLine" Rows="5" CssClass="form-control"></asp:TextBox>

                            </div>
                            <div class="form-group">
                                <label class=" control-label">
                                    会议室设备：  
                                </label>
                                <div>
                                    <asp:CheckBoxList ID="cblEquipment" runat="server" RepeatColumns="4" Width="100%"></asp:CheckBoxList>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class=" control-label">
                                    照片<span class='rd'>*</span>：  
               
                                </label>

                                <asp:FileUpload ID="txtr_photo" runat="server" />
                                <p class="help-block">上传会议室照片</p>
                            </div>



                            <div class="form-group">
                                <label class="control-label">
                                    会议室照片：
                                </label>
                                <div>
                                    <asp:Image ID="imgr_photo" runat="server" Style="max-width: 100%" />
                                </div>
                            </div>

                            <div class="form-group">
                                <asp:Button ID="btnSubmit" runat="server" Text="编辑会议室" CssClass="btn btn-primary btn-block btn-lg " OnClick="btnSubmit_Click" />
                            </div>

                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <uc1:MyFooter runat="server" ID="MyFooter" />
    <script type="text/javascript">
        $(function () {
            window.parent.ShowDialog();
        });
    </script>
</body>
</html>
