<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_InstituteManagement_DivisionIncharge, App_Web_2dkx5ugp" title="Division Incharge" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl"
    TagPrefix="Date" %>
<%@ 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/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <Triggers>
            <asp:PostBackTrigger ControlID="ExportButton" runat="server" />
        </Triggers>
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">
                <!-- ContentPlaceHolder Box Starts -->

                <div class="dashBoardLeftCont" valign="top">
                    <div class="himssuHeader3WireBox">
                        <%--<div class="himsBoxHeader">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                            <asp:Label runat="server" ID="ScreenGroupNameLabel"></asp:Label>    
                                            </div>
                                        </div>
                                    </div>--%>
                        <table width="0px" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="101"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="row whiteboxpaddingleft">
                    <!-- Sub Container2 Box Start -->
                    <div class="himssuHeader5WireBox card card-box" runat="server" id="SearchDiv">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <%--<asp:Image ID="Image2" runat="server" class="fLeft" />--%>
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                        </header>
                                        <%--<cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="Server" TargetControlID="DetailPanel"
                                                        ExpandControlID="Image2" CollapseControlID="Image2" TextLabelID="Label3" Collapsed="false"
                                                        ImageControlID="Image2" ExpandedImage="~/images/buttonCollapse.gif" CollapsedImage="~/images/buttonExpand.gif"
                                                        ExpandDirection="Vertical" />--%>
                                    </div>
                                    <div class="fRight mt-27">
                                        <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButton_Click" SkinID="0" CssClass="btn btn-add fas" Text="&#xf067; Add" />
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchClassLabel" runat="server" Text="Class"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="SearchClassDropDownList" SkinID="CustomWidthDropDownList" OnSelectedIndexChanged="SearchClassDropDownList_SelectedIndexChanged"
                                                    CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" AutoPostBack="true">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchDivisionLabel" Text="Division" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList runat="server" ID="SearchDivisionDropDownList" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="cBoth">
                                        </div>
                                        <div class="alignCenter pTop5">
                                            <asp:Button ID="SearchButton" runat="Server" OnClick="SearchButton_Click" SkinID="0" CssClass="btn-search btn fas" Text="&#xf002; Search" />
                                            <asp:Button ID="ResetButton" runat="server" OnClick="ResetButton_Click" Text="&#xf0e2; Reset" CssClass="btn-reset btn fas" SkinID="0" />
                                            <asp:Button ID="ExportButton" runat="server" Text="&#xf093; Export" SkinID="0" CssClass="fas btn btn-examcommon" OnClick="ExportButton_Click1" Enabled="false"/>
                                        </div>
                                        <div class="cBoth">
                                        </div>
                                    </asp:Panel>
                                    <div id="Div1" class="himssuHeader7WireBox col-md-12" runat="server">
                                        <div id="ReasonMasterDetailDiv" visible="false" runat="server">
                                            <div class="spacer">
                                                <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/spacer.gif" />
                                            </div>
                                            <div class="himsBoxHeader" id="PatientRelationDiv" visible="false" runat="server">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle">
                                                    <%--<div class="headerText">
                                                                    <div class="fLeft">
                                                                        <asp:Label ID="GridViewLabel" Text="List" runat="server" Font-Bold="true" />
                                                                    </div>
                                                                </div>--%>
                                                    <%--<div align="right" class="fRight" style="margin-top: 0px;">
                                                                    <uc1:GridViewPager ID="DivisionMasterGridView_GridViewPager" runat="server" OnFirstRecordClick="DivisionMasterGridView_GridViewPager_FirstRecordClick"
                                                                        OnLastRecordClick="DivisionMasterGridView_GridViewPager_LastRecordClick" OnNextRecordClick="DivisionMasterGridView_GridViewPager_NextRecordClick"
                                                                        OnPrevRecordClick="DivisionMasterGridView_GridViewPager_PrevRecordClick" OnTextBoxValueChange="DivisionMasterGridView_GridViewPager_TextBoxValueChange"
                                                                        ParentGridView="DivisionMasterGridView" />
                                                                </div>--%>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div id="Div5" runat="server" visible="false">
                                                            <div id="Div4" runat="server" class="table-responsive">
                                                                <asp:GridView ID="DivisionMasterGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                    CssClass="table table-striped table-bordered table-hover" OnRowDataBound="DivisionMasterGridView_RowDataBound" OnPageIndexChanging="DivisionMasterGridView_PageIndexChanging"
                                                                    AllowPaging="false" PageSize="10" SkinID="" ShowHeader="True" PagerSettings-Visible="false"
                                                                    DataKeyNames="Id,InchargeEmployeeId,ClassId,Number">
                                                                    <Columns>
                                                                        <asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="Select" OnClick="LinkButton_Click"
                                                                                    Text="Select" CausesValidation="false"></asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Class" ItemStyle-Width="5%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="CodeLabel" runat="server" Text='<%#Eval("Code")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>



                                                                        <asp:TemplateField HeaderText="Incharge Employee Name" ItemStyle-Width="5%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="InchargeEmployeeNameLabel" runat="server" Text='<%#Eval("InchargeEmployeeName")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                         <asp:TemplateField HeaderText="Number" ItemStyle-Width="5%" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="NumberLabel" runat="server" Text='<%#Eval("Number")%>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                       
                                                                        <%--  <asp:BoundField DataField="Code" HeaderText="Code"  ItemStyle-Width = "150px" HeaderStyle-HorizontalAlign="Left" />
                                                                                    <asp:BoundField DataField="Title" HeaderText="Name"  ItemStyle-Width = "150px" HeaderStyle-HorizontalAlign="Left" />
                                                                                    <asp:BoundField DataField="DisplayTitle" HeaderText="Display Title"  ItemStyle-Width = "150px" HeaderStyle-HorizontalAlign="Left"/>
                                                                                    <asp:BoundField DataField="ClassTitle" HeaderText="Class" ItemStyle-Width = "150px" HeaderStyle-HorizontalAlign="Left"/>
                                                                                    <asp:BoundField DataField="InchargeEmployeeName" HeaderText="Incharge Employee Name" ItemStyle-Width = "200px" HeaderStyle-HorizontalAlign="Left"/>--%>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                    <!-- Sub Container2 Box Ends -->
                    <%--<div class="spacer">
                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/spacer.gif" />
                                </div>--%>
                    <!-- Sub Container1 Box Start -->
                    <div class="himssuHeader1WireBox card card-box" runat="server" id="DetailDiv" visible="false">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-users"></i>
                                        <asp:Label ID="ReasonMasterDetailLabel" runat="server" Text="Maintenance"></asp:Label>
                                    </header>
                                </div>
                            </div>
                            <div class="fRight mt-27 pagination display-flex">
                                <%-- <asp:ImageButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                                runat="server" ImageUrl="~/Images/arrowLlast.gif" OnClick="FirstRecordImageButton_Click" />
                                            <asp:ImageButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                                runat="server" ImageUrl="~/Images/arrowLeft.gif" OnClick="PreviousImageButton_Click" />
                                            <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                            <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                            <asp:Label ID="ofLabel" Text="of" runat="server" />
                                            <asp:Label ID="TotalRecord" runat="server" />
                                            <asp:ImageButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButtom"
                                                runat="server" ImageUrl="~/Images/arrowRight.gif" OnClick="NextImageButton_Click" />
                                            <asp:ImageButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                                runat="server" ImageUrl="~/Images/arrowRLast.gif" OnClick="LastRecordImageButton_Click" />
                                            <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0" CssClass="BackButton" Text="Back"/>--%>
                                <table>
                                    <tr>
                                        <td class="formLabel">
                                            <div id="NumberOfRecordDiv" class="display-flex" runat="server" visible="true">
                                                 <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page"
                                                    ID="FirstRecordImageButton" runat="server" OnClick="FirstRecordImageButton_Click">
                                                                   <i class="fa fa-fast-backward"></i>
                                                </asp:LinkButton>
                                              <%--  <asp:LinkButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                                    runat="server" CommandName="Page" CommandArgument="First"
                                                    OnClick="FirstRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                    <i class="fa fa-fast-backward"></i>
                                                </asp:LinkButton>--%>
                                                <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page"
                                                    ID="PreviousImageButton" runat="server" OnClick="PreviousImageButton_Click">
                                                                   <i class="fa fa-play fa-rotate-180"></i>
                                                </asp:LinkButton>
                                               <%-- <asp:LinkButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                                    runat="server" CommandName="Page" CommandArgument="Prev"
                                                    OnClick="PreviousImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                    <i class="fa fa-play fa-rotate-180"></i>

                                                </asp:LinkButton>--%>
                                                &nbsp;
                                                <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                                <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                                <asp:Label ID="ofLabel" Text="of" runat="server" />
                                                <asp:Label ID="TotalRecord" runat="server" />
                                                &nbsp;
                                                 <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page"
                                                        ID="NextImageButtom" runat="server" OnClick="NextImageButton_Click">
                                                       <i class="fa fa-play"></i>
                                                    </asp:LinkButton>
                                               <%-- <asp:LinkButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButtom"
                                                    runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Next"
                                                    OnClick="NextImageButton_Click">
                                                     <i class="fa fa-play"></i>
                                                </asp:LinkButton>--%>
                                                 <asp:LinkButton CssClass="btn btn-default gridviewpagerbuttonpadding" ToolTip="First page"
                                                        ID="LastRecordImageButton" runat="server" OnClick="LastRecordImageButton_Click">
                                                                       <i class="fa fa-fast-forward"></i>
                                                 </asp:LinkButton>
                                            <%--    <asp:LinkButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                                    runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Last"
                                                    OnClick="LastRecordImageButton_Click">
                                                      <i class="fa fa-fast-forward"></i>
                                                </asp:LinkButton>--%>
                                                &nbsp;  &nbsp; &nbsp;
                                            </div>
                                        </td>
                                        <td>
                                            <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0" CssClass="btn btn-back fas" Text="&#xf30a;  back" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ClassLabel" runat="server" Text="Class" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList" AutoPostBack="true"
                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" OnSelectedIndexChanged="ClassDropDownList_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </div>
                                </div>


                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="DivisionLabel" runat="server" Text="Division" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="DivisionDropDownList" SkinID="CustomWidthDropDownList" OnSelectedIndexChanged="DivisionDropDownList_SelectedIndexChanged"
                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" AutoPostBack="true">
                                        </asp:DropDownList>
                                        <asp:HiddenField ID="IdHiddenField" Value='<%# Eval("Id") %>' runat="server" />

                                    </div>
                                </div>


                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="EmployeeLabel" runat="server" Text="Employee" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList runat="server" ID="EmployeeDropDownList" SkinID="CustomWidthDropDownList"
                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                        </asp:DropDownList>
                                        <asp:HiddenField ID="HiddenField1" runat="server" />

                                    </div>
                                </div>

                                 <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="NumberLabel" runat="server" Text="Number" SkinID="MandatoryLabel"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="NumberTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            runat="server" AutoPostBack="false"
                                            SkinID="CustomWidthTextbox" onkeypress="return isNumberKey(event)"></asp:TextBox>
                                    </div>
                                </div>

                                <div class="cBoth">
                                </div>


                                <%--<div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="InchargeEmployeeCodeLabel" runat="server" Text="Incharge Employee Code" ></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                           <asp:TextBox ID="InchargeEmployeeCodeTextBox" 
                                                                SkinID="CustomWidthTextBox" Width="150px" runat="server" MaxLength="100" 
                                                                AutoPostBack="true" 
                                                                ontextchanged="InchargeEmployeeCodeTextBox_TextChanged"> </asp:TextBox>
                                                                 <asp:ImageButton SkinID="FindImage" ToolTip="Drug Search" ID="InchargeEmployeeCodeImageButton"
                                                                        runat="server" />
                                                            <asp:HiddenField ID="InchargeEmployeeIdHiddenField" runat="server" />
                                                        </div>
                                                    </div>--%>
                                <%--<div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="InchargeEmployeeNameLabel" runat="server" Text="Incharge Employee Name" ></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                           <asp:TextBox ID="InchargeEmployeeNameTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                SkinID="CustomWidthTextBox" Width="150px" runat="server" MaxLength="100"> </asp:TextBox>                               
                                
                                                        </div>
                                                    </div>--%>
                            </div>
                        </div>
                    </div>
                    <%-- </div>--%>
                    <!-- Sub Container1 Box Ends -->
                </div>

            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/assign-organization")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <%--// Function To Set Focus To Code Text Box
        function fnSetFocus() {
            gE('<%= CompanyNameTextBox.ClientID  %>').focus();
        }--%>
    <script type="text/javascript">
        function fnValidateDivMaster() {
            //debugger;
            var himsValidator = [
                               new hims_ctl_val('<%=ClassDropDownList.ClientID %>', "Class", "T", "", "", "", 20),
                               new hims_ctl_val('<%=DivisionDropDownList.ClientID %>', "Division", "T", "", "", "", 20),
                               new hims_ctl_val('<%=EmployeeDropDownList.ClientID %>', "Employee", "T", "", "", "", 20)
            ];


            if (fnDoValidate(himsValidator))
                return true;
            else
                return false;
        }

        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode
            if (charCode != 46 && charCode > 31
            && (charCode < 48 || charCode > 57))
                return false;

            return true;
        }


        function uppercase() {
            key = window.event.keyCode;
            if ((key > 0x60) && (key < 0x7B))
                window.event.keyCode = key - 0x20;
        }


    </script>
</asp:Content>
