<%@ page language="C#" autoeventwireup="true" maintainscrollpositiononpostback="true" inherits="Transactions_PopUp_ShiftAllocation, App_Web_jfcqs0e1" %>

<%--<%@ Register Src="../UserControls/TA_uc_OrgLevel_Filter.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc1" %>--%>
<%--<%@ Register Src="../UserControls/TA_uc_OrgLevel_Filter_Modify.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc1" %>--%>
<%@ Register Src="../UserControls/TA_uc_OrgLevelFilter_Updated.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="htmlShiftAllocation" runat="server">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link id="stylebootstrap" rel="stylesheet" runat="server" type="text/css" />
    <link id="stylefontawesome" rel="stylesheet" runat="server" type="text/css" />
    <link id="styleAdminLTE" rel="stylesheet" runat="server" type="text/css" />
    <link id="stylecustom" rel="stylesheet" runat="server" type="text/css" />
    <link id="stylefonts" rel="stylesheet" runat="server" type="text/css" />
    <link id="styleselect2" rel="stylesheet" runat="server" type="text/css" />
    <link id="styleAutocomp" rel="stylesheet" runat="server" type="text/css" /> 
    <title>TimeCheck</title>

    <script language="javascript" type="text/javascript" src="../js/Popup.js"></script>

    <script language="javascript" type="text/javascript" src="../js/chkbox_delete.js"></script>

    <script language="javascript" src="../js/jquery.min.js" type="text/javascript"></script>

    <%--<script language="javascript" src="../js/anytime.js" type="text/javascript"></script>--%>
    <%--<script language="javascript" src="../js/fancydropdown.js" type="text/javascript"></script>--%>

    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>

    <script type="text/javascript" src="../bootstrap/js/1.4.3/jquery.min.js"></script>

    <script src="../bootstrap/js/1.8.5/jquery-ui.min.js" type="text/javascript"></script>

    <script src="../plugins/jQuery/jQuery-2.1.4.min.js" type="text/javascript"></script>

    <script src="../plugins/jquery-ui.min.js" type="text/javascript"></script>

    <%--<script>
        $.widget.bridge('uibutton', $.ui.button);
    </script>--%>

    <%--<script src="../bootstrap/js/bootstrap.min.js" type="text/javascript"></script>--%>


    <%--<script src="../dist/js/app.min.js" type="text/javascript"></script>--%>

    <script src="../plugins/select2/select2.full.min.js"></script>

    <script type="text/javascript">
        function OnClickEmpCategory() {
            var ddlEmpCatagory = document.getElementById("ddlEmpCatagory");
            var ddlEmpCatagoryValue = ddlEmpCatagory[ddlEmpCatagory.selectedIndex].value;
            var hdnEmpCategory = document.getElementById("hdnEmpCategory");
            hdnEmpCategory.value = ddlEmpCatagoryValue;
        }
    </script>

    <script type="text/javascript">
        $(function () {
            $("#<%= txtEmpCodeID.ClientID %>").autocomplete({
                source: function (request, response) {
                    $.getJSON("../AutoCompleteByEmployeeId.ashx?EmpAutoid=" + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                        term: extractLast(request.term)
                    }, response);
                },
                search: function () {
                    // custom minLength
                    var term = extractLast(this.value);
                    if (term.length < 1) {
                        return false;
                    }
                },
                focus: function () {
                    // prevent value inserted on focus
                    return false;
                },
                select: function (event, ui) {

                    var terms = split(this.value);
                    // remove the current input
                    terms.pop();
                    // add the selected item
                    terms.push(ui.item.value);
                    // add placeholder to get the comma-and-space at the end
                    terms.push("");
                    this.value = terms.join(",");
                    return false;
                }
            });
            function split(val) {
                return val.split(/,\s*/);
            }
            function extractLast(term) {
                return split(term).pop();
            }
        });

            $(function () {

                $("#<%= txtEmployeeName.ClientID %>").autocomplete({
                    source: function (request, response) {
                        $.getJSON("../AutoCompleteByName.ashx?EmpAutoid=" + '<%= Convert.ToString(Session["EmpAutoID"]) %>', {
                            term: extractLast(request.term)
                        }, response);
                    },
                    search: function () {
                        // custom minLength
                        var term = extractLast(this.value);
                        if (term.length < 1) {
                            return false;
                        }
                    },
                    focus: function () {
                        // prevent value inserted on focus
                        return false;
                    },
                    select: function (event, ui) {

                        var terms = split(this.value);
                        // remove the current input
                        terms.pop();
                        // add the selected item
                        terms.push(ui.item.value);
                        // add placeholder to get the comma-and-space at the end
                        terms.push("");
                        this.value = terms.join(",");
                        return false;
                    }
                });
                function split(val) {
                    return val.split(/,\s*/);
                }
                function extractLast(term) {
                    return split(term).pop();
                }
            });
    </script>

</head>
<body>
    <form id="aspnetForm" runat="server">
        <div class="content">
            <div class="panel-group" id="accordion">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-sm-6">
                                <h4 class="pull-left">
                                    <asp:Label ID="lblFilter" runat="server" Text="Filter"></asp:Label>
                                </h4>
                            </div>
                            <div class="col-sm-6">
                                <div class="pull-right">
                                    <h6>
                                        <span style="color: Red; padding-left: 10px">|</span><span style="padding-left: 10px; padding-right: 10px">
                                            <asp:Label ID="lbl_IndicatesMandatoryFields" runat="server">
                                            </asp:Label>
                                            (1 No.)</span>
                                    </h6>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
            <div class="emp-filter">
                <div class="row">
                    <div class="form-horizontal">
                        <div class="col-md-12">
                            <div class="row">
                                <div class="col-md-12">
                                    <uc1:TA_uc_OrgLevel_Filter ID="TA_uc_OrgLevel_Filter1" runat="server" EnableViewState="true" />
                                </div>
                            </div>
                            <div class="clearfix">
                            </div>
                            <div class="row">
                                <div class="row">
                                    <div class="line16">
                                    </div>
                                </div>
                            </div>
                            <div class="row  form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmployeeId" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtEmpCodeID" Style="resize: none;" CssClass="form-control"
                                        autocomplete="off" runat="server" TextMode="MultiLine">
                                    </asp:TextBox>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmployeeName" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtEmployeeName" runat="server" TextMode="MultiLine"
                                        OnClientPopulated="dd" CssClass="form-control" Style="resize: none;">
                                    </asp:TextBox>
                                </div>
                            </div>
                            <div class="row  form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpCategory" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:HiddenField ID="hdnEmpCategory" runat="server" Value="0" />
                                    <asp:DropDownList ID="ddlEmpCatagory" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true" OnSelectedIndexChanged="ddlEmpCatagory_SelectedIndexChanged">
                                        <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpType" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEmpType" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true" OnSelectedIndexChanged="ddlEmpType_SelectedIndexChanged">
                                        <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="row  form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblReligion" runat="server" Text="Religion"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlReligion" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="row  form-group">
                                <div class="col-md-5">
                                </div>
                                <div class="col-md-6">
                                    <div class="pull-left">
                                        <asp:Label ID="lblError" Visible="true" runat="server" Style="color: #ff0000"></asp:Label>
                                    </div>
                                    <div class="pull-right-button">
                                        <asp:LinkButton ID="butGo" CssClass="btn save-btn fa-angle-right" runat="server"
                                            CausesValidation="False" OnClick="butGo_Click" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="border-table new-space" id="Div1" runat="server" visible="false">
                <div class="table-responsive">
                    <asp:GridView CssClass="table das-table1" ID="grv_Shift" Width="100%" runat="server"
                        AllowPaging="True" AutoGenerateColumns="False" PageSize="10" OnPageIndexChanging="grv_Shift_PageIndexChanging"
                        OnRowDataBound="grv_Shift_RowDataBound" Font-Size="13px">
                        <Columns>
                            <asp:TemplateField HeaderStyle-CssClass="empheader">
                                <HeaderTemplate>
                                    <%--<asp:Label ID="lblCheckAll" runat="server"></asp:Label>--%>
                                    <asp:CheckBox ID="checkall" runat="server" Text="" AutoPostBack="true" OnCheckedChanged="grv_CheckAll_CheckedChanged"
                                        TextAlign="Right" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="deletethis" runat="server" AutoPostBack="true" OnCheckedChanged="grv_Check_CheckedChanged"></asp:CheckBox>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="center" />
                                <HeaderStyle HorizontalAlign="center" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderStyle-CssClass="empheader GridColumn50">
                                <ItemTemplate>
                                    <asp:Label ID="lbl_EmpId" Text='<%# Eval("Employee_Code_Id")%>' runat="server"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Employee Name" HeaderStyle-CssClass="empheader GridColumn50 pull-left-button">
                                <ItemTemplate>
                                    <asp:Label ID="lbl_EmpName" Text='<%# Eval("Employee Name")%>' runat="server" Style="word-wrap: break-word; display: inline-block; width: 320px;" CssClass="pull-left-button"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                        <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                        <PagerSettings FirstPageText="<<" LastPageText=">>" Mode="NumericFirstLast" NextPageText=">"
                            PreviousPageText="<" />
                        <AlternatingRowStyle BackColor="white" />
                    </asp:GridView>
                </div>
                <div class="clearfix">
                </div>
                <div class="row page-nos">
                    <div class="col-md-6">
                    </div>
                    <div class="col-md-6 page-button">
                        <asp:LinkButton ID="btn_done1" CssClass="btn save-btn fa-check-circle-o" runat="server"
                            CausesValidation="False" OnClick="btn_done1_Click" />
                    </div>
                </div>
            </div>
        </div>

        <script>
            $(".select2").select2();
        </script>

    </form>
</body>
</html>
