<%@ page language="C#" autoeventwireup="true" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" inherits="Pages_TimeTable_ClassRoomTimeOff, App_Web_gfuvrgrk" maintainscrollpositiononpostback="true" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/TimeTable/TimeTable.ascx" TagName="TimeTableControl" TagPrefix="TimeTable" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/TimeTable/TimeTableSchemaDetailBoxControl.ascx" TagName="TimeTableSchemaControl" TagPrefix="TimeTableSchema" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="OTQueueListingUpdatePanel" runat="server">
        <ContentTemplate>
            <TimeTable:TimeTableControl ID="TimeTableControlBox" runat="server" Visible="false" />
            <div id="divContentPage" class="divcontentpagemargin">
                <style type="text/css">
                    .table {
                        margin-bottom: 0px !important;
                    }
                </style>
              
                            <div class="dashBoardLeftCont">
                                <div class="himssuHeader3WireBox">
                                    <table>
                                        <tr>
                                            <td>
                                                <div class="himsBoxContent">
                                                    <div class="leftUlMenu">
                                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="222"
                                                            Visible="true" runat="server" />
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="whiteboxpaddingleft row">
                                <TimeTableSchema:TimeTableSchemaControl ID="TimeTableSchemaUserControl" runat="server" Visible="true" />
                                <div class="himssuHeader5WireBox card card-box">
                                    <div class="himsBoxHeader card-head">
                                       
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                                <header>
                                                <i class="far fa-calendar-alt"></i>
                                                <asp:Label ID="Label1" runat="server" Text="Time Table"></asp:Label>
                                                </header>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="himsBoxContent card-body">
                                        <div class="contentHolder">
                                            <div class="himssuHeader1WireBox ">
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SchoolBuildingLabel" runat="server" Text="School Building" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="SchoolBuildingDropDownList" SkinID="CustomWidthDropDownList"
                                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            AutoPostBack="true" OnSelectedIndexChanged="SchoolBuildingDropDownList_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ClassLabel" runat="server" Text="ClassRoom" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList"
                                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                            AutoPostBack="true" OnSelectedIndexChanged="ClassDropDownList_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </div>
                                                    
                                                </div>
                                              
                                                <div class="outerBox pTop15 col-md-3">
                                                    <div class="fLeft pTop5">
                                                        <asp:CheckBox ID="ApplyToOtherClassCheckBox" runat="server" Text="Apply To Other Classroom" OnCheckedChanged="ApplyToOtherClassCheckBox_CheckedChanged" AutoPostBack="true" />
                                                       
                                                    </div>
                                                </div>
                                                <div class="col-md-12 center pTop5">
                                                    <asp:Button runat="server" ID="TestButton" Text="&#xf0c7; Save" SkinID="0" OnClick="SaveButton_Click" class="btn-save btn fas" />
                                                </div>

                                               

                                                <div id="DivClassCheckBoxList" class="outerBox11 pTop5 col-md-3" runat="server" visible="false">
                                                    <div class=" select fLeft pRight5 chck-dropdown-onclick bg-lghtgrey outerBox11 col-md-12 overflow-x-hidden padd-0" visible="false">
                                                        <asp:CheckBox ID="ClassCheckBox" runat="server" AutoPostBack="True" Text="Select All" OnCheckedChanged="ClassCheckBox_CheckedChanged" />

                                                    </div>
                                               
                                                        <asp:CheckBoxList ID="ClassDivisionCheckBoxList" runat="server">
                                                        </asp:CheckBoxList>
                                                   
                                                    <div class="pTop15">
                                                        <asp:Button ID="ApplyForSelectClassButton" runat="server" SkinID="0" OnClick="ApplyForSelectClassButton_Click"
                                                            Text="Apply" CssClass="btn btn-assign" />
                                                    </div>
                                                </div>
                                                
                                                <div class="cBoth"></div>

                                                <div id="TimeTableDetailDiv" runat="server" visible="True">
                                                    <div class="himsBoxContent col-md-12 table-responsive">
                                                        <asp:GridView ID="ClassRoomGridView" runat="server" AutoGenerateColumns="false"
                                                            EmptyDataText="No Records Found !!"
                                                            ShowHeader="true" CssClass="table table-bordered table-striped table-hover">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="No Of Period">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="NoofperiodLabel" runat="server" Width="30px" Text='<%# Eval("NoOfPeriod") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Sunday">
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox runat="server" ID="Chsunday" Checked='<%# Convert.ToBoolean(Eval("Sunday"))%>' />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Monday">
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox runat="server" ID="ChMonday" Checked='<%# Convert.ToBoolean(Eval("Monday"))%>' />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Tuesday">
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox runat="server" ID="ChTuesday" Checked='<%# Convert.ToBoolean(Eval("Tuesday"))%>' />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Wednesday">
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox runat="server" ID="ChWednesday" Checked='<%# Convert.ToBoolean(Eval("Wednesday"))%>' />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Thursday">
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox runat="server" ID="ChThursday" Checked='<%# Convert.ToBoolean(Eval("Thursday"))%>' />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Friday">
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox runat="server" ID="ChFriday" Checked='<%# Convert.ToBoolean(Eval("Friday"))%>' />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Saturday">
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox runat="server" ID="ChSaturday" Checked='<%# Convert.ToBoolean(Eval("Saturday"))%>' />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                        </asp:GridView>
                                                        <asp:HiddenField ID="hfGridView1SV" runat="server" />
                                                        <asp:HiddenField ID="hfGridView1SH" runat="server" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </tr>
                    </table>
                </div>
            </div>            
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/encrypt/class-room-timeoff-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/class-room-timeoff")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <%--<script type="text/javascript" src="/../../../JavaScript/gridviewScroll.min.js"></script>--%>
    <script type="text/javascript">
        function cpageLoad() {
            $('#<%=ClassRoomGridView.ClientID%>').gridviewScroll({
                width: 1090,
                height: 355,                
                freezesize: 1,
                startVertical: $("#<%=hfGridView1SV.ClientID%>").val(),
                startHorizontal: $("#<%=hfGridView1SH.ClientID%>").val(),
                onScrollVertical: function (delta) {
                    $("#<%=hfGridView1SV.ClientID%>").val(delta);
                },
                onScrollHorizontal: function (delta) {
                    $("#<%=hfGridView1SH.ClientID%>").val(delta);
                }
            });
        }
        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
        function checkitem(checkBox, textBox1) {
            var e = document.getElementById(textBox1.id);
            var f = document.getElementById(checkBox.id);
            if (f.checked == true) {
                e.disabled = true;
            }
            else {
                e.disabled = false;
            }
        }
    </script>    
</asp:Content>