<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Hrm_Employee_ClubHouseCommiteeBulk, App_Web_jam230py" 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" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <%--    <script>
        function fnCheckAmount(e) {
            alert(1);
            var t = e.search("[^0-9,.]");
            return e.length > 0 && t >= 0 || e.indexOf(".") != e.lastIndexOf(".") ? !1 : !0
        }
    </script>--%>
  <%--  <style>
        .display-flex.outerBox11 {
            width: 125px;
        }
    </style>--%>
    <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>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont" valign="top">
                    <div class="himssuHeader3WireBox">
                        <table width="0px" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="164"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="row whiteboxpaddingleft">
                    <div class="himssuHeader2WireBox ">
                        <div class="contentHolder" style="padding-top: 0px; padding-left: 0px; padding-right: 0px">
                            <div class="himssuHeader1WireBox card card-box">
                                <div class="himsBoxHeader card-head">
                                    <div class="leftdiv">
                                    </div>
                                    <div class="himsBoxTitle">
                                        <div class="headerText">
                                            <header>
                                                <i class="fas fa-search"></i>
                                                <asp:Label ID="Label1" runat="server" Text="Search"></asp:Label>
                                            </header>
                                        </div>
                                    </div>
                                </div>

                                <div class="himsBoxContent card-body">
                                    <asp:Panel ID="DetailPanel" runat="Server">
                                        <div class="contentHolder">
                                            <div class="cBoth">
                                            </div>
                                            <asp:Panel ID="SearchCriteriaPanel" runat="Server">

                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="DepartmentLabel" runat="server" Text="Department" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="DepartmentDropDownList" SkinID="CustomWidthDropDownList"
                                                            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="TypeLabel" runat="server" Text="Type" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList runat="server" ID="TypeDropDownList" SkinID="CustomWidthDropDownList"
                                                            AutoPostBack="true" onmouseleave="showHideTooltip()" CssClass="form-control" onmouseenter="showHideTooltip()"
                                                            OnSelectedIndexChanged="TypeIdDropDownList_SelectedIndexChanged">
                                                            <asp:ListItem Text="-Select-" Value="-1"></asp:ListItem>
                                                            <asp:ListItem Text="Club" Value="1"></asp:ListItem>
                                                            <asp:ListItem Text="House" Value="2"></asp:ListItem>
                                                            <asp:ListItem Text="Commitee" Value="3"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                </div>


                                            </asp:Panel>

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="TypeDetailLabel" runat="server" Text="Type Detail" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList runat="server" ID="TypeDetailDropDownList" SkinID="CustomWidthDropDownList"
                                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        AutoPostBack="true">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="cBoth">
                                            </div>
                                            <div class="alignCenter pTop5">
                                                <asp:Button ID="SaveButton" Text="&#xf0c7; Save" runat="Server" OnClick="SaveButton_Click" CssClass="fas btn btn-save" SkinID="0" />
                                                <asp:Button ID="ApplyButton" Text="Apply" runat="Server" OnClick="ApplyButton_Click" CssClass="btn-apply btn fas" SkinID="0" />
                                                <asp:Button ID="ClearButton" Text="&#xf12d; Clear" SkinID="0" runat="server" OnClick="ClearButton_Click" CssClass="btn btn-clear 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;" AllowMultiple="true"/>
                                                 <asp:Button ID="ImportFromExcelButton" runat="server" Text="&#xf019; Import From Excel"
                                                    SkinID="0" CssClass="fas btn btn-examcommon" OnClick="ImportFromExcelButton_Click" />
                                            </div>
                                             <asp:Label ID="Label2" runat="server" Text="" Style="padding-left: 10px; font-size: medium;"></asp:Label>
                                            <div class="cBoth">
                                            </div>
                                            
                                            <div class="spacer">
                                                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/spacer.gif" />
                                            </div>
                                            <div id="Div1" class="himssuHeader1WireBox col-md-12" runat="server" visible="false">
                                                <div id="GridViewPagerDiv" runat="server" visible="True">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                    </div>
                                                    <div class="fRight mt-28 display-flex">
                                                        <asp:DropDownList ID="ApplyDropDownList" runat="server" CssClass="form-control mt-10"
                                                            onmouseleave="showHideTooltip()"
                                                            onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList"
                                                            OnSelectedIndexChanged="ApplyDropDownList_SelectedIndexChanged">
                                                            <asp:ListItem Text="- Select -" Value="-1" Selected="True"></asp:ListItem>
                                                            <asp:ListItem Text="TypeDetail"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                                <asp:DropDownList runat="server" ID="GridTypeDetailDropDownLists" CssClass="form-control" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" Visible="true">
                                                </asp:DropDownList>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                                       <%-- <asp:TextBox ID="ApplyAllTextBox" runat="server" ClientIDMode="Static" MaxLength="50"
                                                            SkinID="CustomWidthTextBox" Style="margin-top: 14px"></asp:TextBox>--%>
                                                        <asp:Button ID="ApplyAllButton" runat="server" CssClass="btn btn-apply" SkinID="0" class="form-control" OnClick="ApplyAllButton_Click"
                                                            Text="Apply All" Style="margin-bottom: 8px" />
                                                    </div>
                                                </div>
                                                <div class="himsBoxContent">
                                                    <div id="GridViewMessageDiv" class="himsBoxContentMsg" runat="server" visible="False">
                                                    </div>
                                                    <div id="Div4" runat="server" class="table-responsive">
                                                        <asp:GridView ID="ClubHouseCommiteeBulkGridView" runat="server" Width="100%" CssClass="table table-striped table-bordered table-hover" AutoGenerateColumns="False"
                                                            EmptyDataText="No Records Found !!" AllowPaging="false" ShowHeader="true" DataKeyNames="Id,EmployeeId"
                                                            OnRowDataBound="ClubHouseCommiteeGridView_RowDataBound">
                                                            <Columns>
                                                                <asp:TemplateField HeaderStyle-HorizontalAlign="Center">
                                                                    <HeaderTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="HeaderSelectCheckBox" onclick="CheckAll(this);" AutoPostBack="true" runat="server" OnCheckedChanged="SelectAllCheckBox_Checked" />
                                                                            <span></span>
                                                                        </label>
                                                                    </HeaderTemplate>
                                                                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="SelectCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="SelectCheckBox_CheckedChanged" />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>

                                                                <asp:TemplateField HeaderText="Code" ItemStyle-Width="5%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="Idlabel" runat="server" Text='<%#Eval("Code") %>'></asp:Label>

                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Name" ItemStyle-Width="5%">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="NameLabel" runat="server" Text='<%#Eval("Name") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Type detail" ItemStyle-Wrap="true" ItemStyle-Width="20%" HeaderStyle-HorizontalAlign="Center">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList runat="server" ID="TypeDetailDropDownLists"
                                                                            CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Enabled="false">
                                                                        </asp:DropDownList>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>

                                                                <%--<asp:BoundField DataField="Type" HeaderText="Type" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left"></asp:BoundField>--%>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="spacer">
                        <asp:Image ID="Image4" runat="server" ImageUrl="~/Images/spacer.gif" />
                    </div>
                </div>

            </div>
            <div class="spacer">
                <img src="../../Images/spacer.gif" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%-- <script data-main="../../JavaScript/rjs/encrypt/bonafide-bulk-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/clubhousecommiteebulk")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
       
        //var reader = new FileReader();
        //reader.onload = function (e) {
        //}
        //function readURL(input) {
        //    if (input.files && input.files[0]) {
        //        reader.readAsDataURL(input.files[0]);
        //        ajaxFileUpload();
        //    }
        //}
        //function OpenFileUpload() {
        //    $('#flUpload').click();
        //}
        //function LoadingMessage(msg1, msg2) {
        //    $('#dvTestLoadingmsg').show();
        //    $('#spn1msg').html(msg1);
        //    $('#spn2msg').html(msg2);
        //    $('.hls-bg').show();
        //}
        //function CloseLoadingpopup() {
        //    $('#dvTestLoadingmsg').hide();
        //    $('.hls-bg').hide();
        //}
        //function ajaxFileUpload() {
        //    debugger;
        //    if (ValidateImageDetails()) {
        //        LoadingMessage('Uploading', '<b>Please Wait</b>');
        //        $("#loading").ajaxStart(function () {
        //            $(this).show();
        //        }).ajaxComplete(function () {
        //            $(this).hide();
        //        });
        //        $.ajaxFileUpload({
        //            url: '/UserControls/MultiFileUpload/common-file-upload.ashx',
        //            secureuri: false,
        //            fileElementId: 'flUpload',
        //            dataType: 'text',
        //            contentType: "application/json; charset=utf-8",
        //            data: { name: 'logan', id: 'id', hdn: '1' },
        //            success: function (response, status) {
        //                if (response == "-007") {
        //                    alert('Cannot upload file as the used space exceeds allocated space')
        //                    return
        //                }
        //                if (response == "-008") {
        //                    alert('Invalid Extention')
        //                    return
        //                }
        //                if (response == "-009") {
        //                    alert('Cannot include / or .. in a filename')
        //                    return;
        //                }
        //                //alert(response);
        //                $("#ctl00_CP_Label3").text("Uploaded Successfully");
        //                /*var str = response;
        //                str = str.replace('<pre style="word-wrap: break-word; white-space: pre-wrap;">','');
        //                str = str.replace('</pre>','');				
        //                $('#hdnFileName').val(str);*/
        //                window.setTimeout(function () {
        //                    CloseLoadingpopup();
        //                    $("#ctl00_CP_Label3").text("Uploaded Successfully");
        //                }, 100);
        //            },
        //            error: function (response, status, e) {
        //                window.setTimeout(function () {
        //                    CloseLoadingpopup();
        //                }, 100);
        //            }
        //        })
        //        return false;
        //    }
        //}

        //function ValidateImageDetails() {
        //    var fields;
        //    fields = "";
        //    var file = document.getElementById('flUpload').value;
        //    //if (isFile(document.getElementById('flUpload').value) == false || document.getElementById('flUpload').value == null) {
        //    //    fields = fields + "\n-- Invalid file --";
        //    //}
        //    if (fields != "") {
        //        fields = "Please fill in the following details:\n------------------------------------" + fields;
        //        alert(fields);
        //        return false;
        //    }
        //    else {
        //        return true;
        //    }
        //}
    </script>
</asp:Content>
