<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Components_Biometric_ImportStudentCloud, App_Web_eiesolok" uiculture="auto" title="Import Student Cloud" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl"
    TagPrefix="Date" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl"
    TagPrefix="hims" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="timePicker" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl"
    TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <style type="text/css">
        input:disabled + input[type=image], input:read-only + a {
            pointer-events: visible;
            cursor: pointer !important;
        }
    </style>
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <uc2:CommonSearchUserControl ID="CommonSearchControl" Visible="false" runat="server" />
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">


                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="166"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="TopPanel" runat="server">

                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="headerTextLabel" runat="server" Text="Import Student Cloud"></asp:Label>
                                        </header>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <asp:Panel ID="DetailPanel" runat="Server">
                            <div class="himsBoxContent card-body">
                                <div class="contentHolder">
                                    <asp:Panel ID="PanelSearch" runat="server">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="OrganizationLabel" runat="server" Text="Organization"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="OrganizationDropDownList" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control" onmouseleave="showHideTooltip()" AutoPostBack="true" onmouseenter="showHideTooltip()"
                                                    OnSelectedIndexChanged="OrganizationDropDownList_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="ClassLabel" runat="server" Text="Class"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList" CssClass="form-control" onmouseleave="showHideTooltip()"
                                                    AutoPostBack="true" onmouseenter="showHideTooltip()" OnSelectedIndexChanged="ClassDropDownList_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="DivisionLabel" Text="Division" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="DivisionDropDownList" runat="server" onmouseleave="showHideTooltip()" CssClass="form-control"
                                                    SkinID="CustomWidthDropDownList" onmouseenter="showHideTooltip()" AutoPostBack="true">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="RollNoLabel" runat="server" Text="Roll No"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="RollNoTextBox" SkinID="CustomWidthTextBox" runat="server"
                                                    onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" meta:resourcekey="RollNoTextBoxResource1"
                                                    MaxLength="100" onkeypress="return isNumberKey(event)"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop15 col-md-3">
                                            <asp:CheckBox ID="IsBlankCheckBox" runat="server" Text="Empty Data" class="pLeft5" AutoPostBack="true" />
                                        </div>
                                        <div class="text-center col-md-12 pTop5">
                                            <asp:Button ID="SearchButton" runat="server" Text="&#xf002; Search" OnClick="SearchButton_Click" SkinID="0" CssClass="btn-search btn fas" />
                                            <asp:Button ID="ExportButton" runat="server" Text="&#xf093; Export" OnClick="ExportButton_Click" CssClass="fas btn btn-examcommon" SkinID="0" />
                                            <a href="javascript:;" onclick="OpenFileUpload();" class="btn btn-browser">
                                                <i class="fas fa-upload"></i>Browse</a>
                                            <asp:FileUpload ID="flUpload" runat="server" onChange="readURL(this);" ClientIDMode="Static" Style="display: none;" />

                                            <asp:Button ID="ImportFromExcelButton" runat="server" Text="&#xf019; Import From Excel" OnClick="ImportFromExcelButton_Click"
                                                SkinID="0" CssClass="fas btn btn-examcommon" />
                                            <asp:Button ID="Button1" Text="Generate Punch Id" runat="Server" OnClick="btnGeneratePunchId_Click" SkinID="0" CssClass="btn btn-search fas" />
                                        </div>

                                        <asp:Label ID="Label2" runat="server" Text="" Style="padding-left: 10px; font-size: medium;"></asp:Label>
                                        <div align="right" class="fRight col-md-12" id="ApplyAllDiv" runat="server" visible="false" style="height: 70px; padding-top: 20px;">
                                            <div class="fleft" style="width: 100px; float: right; padding-top: -1px; padding-right: 10px">
                                                <asp:Button ID="ApplyButton" runat="server" SkinID="0" Text="Apply All" OnClick="ApplyButton_Click" CssClass="btn btn-assign fas" />
                                            </div>

                                            <div class="fleft" style="width: 207px; float: right; padding-top: 10px; padding-right: 10px">
                                                <asp:DropDownList runat="server" ID="ApplyShiftDropDownList" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control" onmouseleave="showHideTooltip()" AutoPostBack="false" onmouseenter="showHideTooltip()"
                                                    OnSelectedIndexChanged="ApplyShiftDropDownList_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="alignCenter col-md-12 center">
                                            <%--<asp:Button ID="SearchButton" Text="&#xf002; Search" TabIndex="3" runat="Server" SkinID="0"
                                                class="btn-search btn fas" OnClick="SearchButton_Click" />
                                            <asp:Button ID="ResetButton" runat="server" TabIndex="4" Text="&#xf0e2; Reset" OnClick="ResetButton_Click"
                                                SkinID="0" class="btn-reset btn fas" />--%>
                                        </div>
                                        <div class="col-md-12">
                                            <asp:Label ID="HtmlStringLabel" runat="server"></asp:Label>
                                        </div>
                                    </asp:Panel>
                                    <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                        <ContentTemplate>
                                            <div class="table-responsive col-md-12">
                                                <asp:GridView ID="StudentGridView" OnRowDataBound="StudentGridView_RowDataBound"
                                                    OnPageIndexChanging="StudentGridView_PageIndexChanging" runat="server" AutoGenerateColumns="False"
                                                    Width="100%" AllowPaging="false" DataKeyNames="Code,Id"
                                                    PagerSettings-Visible="false" EmptyDataText="No records available for the search criteria"
                                                    ShowHeader="True" CssClass="table table-striped table-bordered table-hover">
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="4%"
                                                            ItemStyle-Wrap="true">
                                                            <HeaderTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="chkCheck" runat="server" OnCheckedChanged="HeaderSelectCheckBox_checked" Enabled="true" AutoPostBack="true"
                                                                        Visible="true" />
                                                                    <span></span>
                                                                </label>
                                                            </HeaderTemplate>
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">

                                                                    <asp:HiddenField ID="StudentIdHiddenField" runat="server" Value='<%# Bind("Id") %>' />
                                                                    <asp:CheckBox ID="SelectCheckBox" runat="server" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Code" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="Code" runat="server" Text='<%# Bind("Code") %>'>' </asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Class-Div" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="ClassDivisionLabel" runat="server" Text='<%# Bind("ClassDivision") %>'>' </asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Roll No" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="RollNoLabel" runat="server" Text='<%# Bind("RollNo") %>'>' </asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <%-- <asp:BoundField HeaderText="Code" DataField="Code" 
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemStyle Width="10%" />
                                                        </asp:BoundField>--%>
                                                        <asp:TemplateField HeaderText="Student Name" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="StudentName" runat="server" Text='<%# Bind("StudentName") %>'>' </asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <%--<asp:TemplateField HeaderText="Mobile No" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="MobileNo" runat="server" Text='<%# Bind("MobileNo") %>'>' </asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>--%>
                                                        <asp:TemplateField HeaderText="PunchId" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:TextBox ID="PunchId" CssClass="col-md-3 !important" runat="server" MaxLength="50"
                                                                    SkinID="CustomWidthTextbox" Text='<%#Eval("PunchId") %>'></asp:TextBox>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                        <asp:TemplateField HeaderText="Shift" ItemStyle-Width="10%" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:HiddenField ID="PresentStatusLabel" runat="server" Value='<%# Bind("ShiftId") %>' />
                                                                <asp:DropDownList ID="ShiftDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control !important">
                                                                </asp:DropDownList>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                    </Columns>
                                                </asp:GridView>
                                            </div>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </div>
                            </div>

                        </asp:Panel>
                    </div>

                </div>
            </div>

        </ContentTemplate>
    </asp:UpdatePanel>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/import-student-cloud")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        function Check(obj) {
            var table = document.getElementById('<%=StudentGridView.ClientID %>');
            var count = document.getElementById('<%=StudentGridView.Rows.Count %>');
            var chk = false;
            if ($(obj).is(':checked'))
                chk = true;
            else
                chk = false;
            var row = obj.parentNode.parentNode.parentNode.rowIndex + 1;
            RowIndex = row - 2;

            if (row < 10)
                row = "0" + row;
            for (let i = 2; i < 10; i++) {
                $("#ctl00_CP_StudentGridView_ctl0" + i + "_SelectCheckBox").attr("Checked", true)
            }



        }
    </script>
    <%--<script data-main='<%=ResolveUrl("~/JavaScript/rjs/leave")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>--%>
</asp:Content>
