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

<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="CountryMasterUpdatePanel" runat="server">
        <ContentTemplate>
            <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="125"
                                            Visible="true" runat="server" />
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>

                <div class="row whiteboxpaddingleft">
                    <!-- Sub Container2 Box Start -->
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="TopPanel" runat="server" meta:resourcekey="TopPanelResource1">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <%--<asp:Image ID="Image2" runat="server" class="fLeft" 
                                meta:resourcekey="Image2Resource1" />--%>
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="Label1" runat="server" Text="Search"></asp:Label>
                                        </header>
                                        <%--<cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="DetailPanel"
                                    ExpandControlID="Image2" CollapseControlID="Image2" TextLabelID="Label1" Collapsed="True"
                                    CollapsedText="Search" ExpandedText="Search" ImageControlID="Image2" ExpandedImage="~/images/buttonCollapse.gif"
                                    CollapsedImage="~/images/buttonExpand.gif" Enabled="True" />--%>
                                    </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>
                        <asp:Panel ID="DetailPanel" runat="server" meta:resourcekey="DetailPanelResource1">
                            <div class="himsBoxContent card-body">
                                <div class="contentHolder">
                                    <asp:Panel ID="SearchPanel" runat="server" meta:resourcekey="SearchPanelResource1">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchCastLabel" runat="server" Text="Family Caste" meta:resourcekey="SearchCountryTitleLabelResource1"></asp:Label>
                                                <%--changes label for mantis Id : 0043711--%>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="SearchCastTextBox" runat="server"
                                                    SkinID="CustomWidthTextbox" TabIndex="1"
                                                    onblur="return fnonTextChangeDescriptionField(this)" meta:resourcekey="SearchCountryTitleTextBoxResource1"
                                                    MaxLength="100"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3" runat="server" visible="false">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchFamilySubCastLabel" runat="server" Text="Family Sub Caste" meta:resourcekey="SearchCountryTitleLabelResource1"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="SearchFamilySubcastTextBox" runat="server"
                                                    SkinID="CustomWidthTextbox" TabIndex="1"
                                                    onblur="return fnonTextChangeDescriptionField(this)" meta:resourcekey="SearchCountryTitleTextBoxResource1"
                                                    MaxLength="100"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchCastCategoryLabel" runat="server" Text="Caste Category" meta:resourcekey="SearchCountryTitleLabelResource1"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="SearchCastCategoryDropDownList" runat="server" CssClass="form-control"></asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="cBoth">
                                        </div>
                                        <div class="alignCenter pTop5">
                                            <asp:Button ID="SearchButton" runat="server" OnClick="SearchButton_Click" CssClass="btn-search btn fas" Text="&#xf002; Search"
                                                TabIndex="2" SkinID="0" />
                                            <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" CssClass="btn-reset btn fas" SkinID="0" OnClick="ResetButton_Click"
                                                meta:resourcekey="ResetButtonResource1" />
                                        </div>
                                        <div class="cBoth">
                                        </div>
                                        <br />
                                    </asp:Panel>
                                    <div id="AvailableCountriesGridViewDiv" runat="server" visible="False">
                                        <div class="spacer">
                                            <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/spacer.gif" meta:resourcekey="Image3Resource1" />
                                        </div>
                                        <div class="himssuHeader7WireBox col-md-12" id="PatientRelationDiv"
                                            runat="server">
                                            <div class="himsBoxHeader" id="GridHeaderDiv" runat="server">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle" style="width: 99%">
                                                    <%-- <div class="headerText">
                                                <div class="fLeft">
                                                    <asp:Label ID="AvailableCountriesGridViewLabel" Text="Country List" 
                                                        runat="server" meta:resourcekey="AvailableCountriesGridViewLabelResource1" />
                                                </div>
                                            </div>--%>
                                                    <div align="right" class="fRight" style="margin-top: 0px;">
                                                        <%--<uc1:GridViewPager ID="AvailableCountriesGridViewPager" runat="server" OnFirstRecordClick="GridViewPager_FirstRecordClick"
                                                    OnLastRecordClick="GridViewPager_LastRecordClick" OnNextRecordClick="GridViewPager_NextRecordClick"
                                                    OnPrevRecordClick="GridViewPager_PrevRecordClick" OnTextBoxValueChange="GridViewPager_TextBoxValueChange"
                                                    ParentGridView="AvailableCountriesGridView" />--%>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent">
                                                <%--  <div id="DivHeader" style="vertical-align: top; width: 100%;">
                                            <asp:Table ID="AvailableCountriesGridViewTable" runat="server" CellPadding="0" CellSpacing="0"
                                                BackColor="#E8E8E8" ForeColor="Black" Width="100%" GridLines="Both" 
                                                CssClass="GridViewTableRow" 
                                                meta:resourcekey="AvailableCountriesGridViewTableResource1">
                                            </asp:Table>
                                        </div>--%>
                                                <div class="himsBoxContentMsg" id="GridContentDiv" runat="server" visible="False">
                                                </div>
                                                <%--    <div id="DivData" class="Container" style="vertical-align: top; height: 109px; width: 99.6%;">--%>
                                                <div id="Div4" runat="server" class="table-responsive">
                                                    <asp:GridView ID="AvailableCastGridView" runat="server" AutoGenerateColumns="False"
                                                        Width="100%" OnRowDataBound="AvailableCastGridView_RowDataBound" CssClass="table table-striped table-bordered table-hover"
                                                        ShowHeader="True" OnPageIndexChanging="AvailableCastGridView_OnPageIndexChanging"
                                                        EmptyDataText="No Area Available" meta:resourcekey="AvailableCountriesGridViewResource1" DataKeyNames="Id">
                                                        <Columns>
                                                            <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="EditLinkButton" runat="server" OnClick="LinkButton_Click" Text="Select"
                                                                        CausesValidation="False" ForeColor="Blue" CommandName="Select" meta:resourcekey="EditLinkButtonResource1"></asp:LinkButton>
                                                                </ItemTemplate>
                                                                <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource5">

                                                                <ItemTemplate>
                                                                    <asp:Label ID="IdLabel" runat="server" Text='<%# Bind("Id") %>' meta:resourcekey="CountryIdLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle Width="0%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Family Caste" meta:resourcekey="TemplateFieldResource2" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="CountryTitleTextBox" runat="server" CssClass="boxEllips" ToolTip='<%# Bind("FamiliyCast") %>'
                                                                        Width="200px" Text='<%# Bind("FamiliyCast") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle HorizontalAlign="Left" Width="35%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Family Sub Caste" HeaderStyle-HorizontalAlign="Left" meta:resourcekey="TemplateFieldResource3" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="FamiliySubCastLabel" runat="server" CssClass="boxEllips" ToolTip='<%# Bind("FamiliySubCast") %>'
                                                                        Width="300px" Text='<%# Bind("FamiliySubCast") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle HorizontalAlign="Left" Width="50%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Caste Category" HeaderStyle-HorizontalAlign="Center" meta:resourcekey="TemplateFieldResource4">

                                                                <ItemTemplate>
                                                                    <asp:Label ID="CastCategoryLabel" runat="server" Text='<%# Bind("CastCategory") %>'
                                                                        meta:resourcekey="ObsoleteLabelResource1"></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                            </asp:TemplateField>

                                                        </Columns>
                                                        <PagerSettings Visible="False" />
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </asp:Panel>
                    </div>
                    <!-- Sub Container2 Box Ends -->
                    <%--<div class="spacer">
                <asp:Image ID="spacerImage" runat="server" ImageUrl="~/Images/spacer.gif" 
                    meta:resourcekey="spacerImageResource1" />
            </div>--%>
                    <!-- Sub Container1 Box Start -->
                    <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server" 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="CountryDetailsLabel" runat="server" Text="Maintenance" meta:resourcekey="CountryDetailsLabelResource1"></asp:Label>
                                    </header>
                                </div>

                            </div>

                            <div class="fRight mt-27 pagination display-flex ">
                                <div id="NumberOfRecordDiv" class="display-flex" runat="server" visible="true">
                                    <%-- <asp:ImageButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                        runat="server" ImageUrl="~/Images/arrowLlast.gif" CommandName="Page" CommandArgument="First"
                                        OnClick="FirstRecordImageButton_Click" />
                                    <asp:ImageButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                        runat="server" ImageUrl="~/Images/arrowLeft.gif" CommandName="Page" CommandArgument="Prev"
                                        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" CommandName="Page" CommandArgument="Next"
                                        OnClick="NextImageButton_Click" />
                                    <asp:ImageButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                        runat="server" ImageUrl="~/Images/arrowRLast.gif" CommandName="Page" CommandArgument="Last"
                                        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="Div1" runat="server" visible="true">
                                                    <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 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 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 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>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="FamiliyCastLabel" runat="server" Text="Family Caste" SkinID="MandatoryLabel"
                                            meta:resourcekey="HeaderCountryTitleLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="FamiliyCastTextBox" runat="server"
                                            SkinID="CustomWidthTextbox" TabIndex="4"
                                            meta:resourcekey="HeaderCountryTitleTextBoxResource1"></asp:TextBox>
                                        <asp:HiddenField ID="CountryIdHiddenField" runat="server" />
                                    </div>
                                </div>

                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="ReligionIdLabel" runat="server" Text="Religion"
                                            meta:resourcekey="HeaderNationalityLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList ID="ReligionDropDownList" runat="server" CssClass="form-control"></asp:DropDownList>
                                    </div>
                                </div>

                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="OrderIndexLabel" runat="server" Text="Order Index"></asp:Label>
                                    </div>
                                    <div class="fLeft ">
                                        <asp:TextBox runat="server" ID="OrderIndexTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" onkeypress="return isNumberKey(event);"
                                            SkinID="CustomWidthTextBox"></asp:TextBox>
                                    </div>
                                </div>

                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="FamiliySubCastLabel" runat="server" Text="Family Sub Caste" SkinID="MandatoryLabel" Visible="false"
                                            meta:resourcekey="HeaderNationalityLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="FamilySubCastTextBox" runat="server" Visible="false"
                                            SkinID="CustomWidthTextbox" TabIndex="4"
                                            meta:resourcekey="HeaderCountryTitleTextBoxResource1"></asp:TextBox>
                                    </div>
                                </div>

                                <div class="cBoth">
                                </div>
                                <div class="outerBox pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="CastCategoryIdLabel" runat="server" Text="Caste Category" SkinID="MandatoryLabel"
                                            meta:resourcekey="HeaderNationalityLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList ID="CastCategoryIdDropDownList" runat="server" CssClass="form-control"></asp:DropDownList>
                                    </div>
                                </div>

                                <div class="outerBox pTop15 col-md-3">
                                    <%--  <div class="fLeft">
                                        <asp:CheckBox ID="HeaderObsoleteCheckBox" runat="server" TabIndex="6" meta:resourcekey="HeaderObsoleteCheckBoxResource1" />
                                    </div>
                                    <div class="fLeft pLeft5 pTop5">
                                        <asp:Label ID="HeaderObsoleteLabel" runat="server" Text="InActive" meta:resourcekey="HeaderObsoleteLabelResource1"></asp:Label>
                                    </div>--%>
                                    <div class="controlLabelWidth ">

                                        <asp:CheckBox ID="HeaderObsoleteCheckBox" runat="server" Text="InActive" />
                                        <asp:Label runat="server" AssociatedControlID="HeaderObsoleteCheckBox" ID="HeaderObsoleteLabel">
                                                    
                                        </asp:Label>
                                    </div>
                                </div>
                                <div class="cBoth">
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- Sub Container1 Box Ends -->

                    <%--HEDP History Ends Here--%>
                </div>
            </div>
            <div class="spacer">
                <img src="../../../Images/spacer.gif" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--  <script data-main="../../../JavaScript/rjs/encrypt/cast-master-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/cast-master")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
