<%@ page title="" language="C#" masterpagefile="~/MasterFile/TimeCheck.master" autoeventwireup="true" inherits="Masters_TA_UI_Master_TaxPolicyAdd, App_Web_x4bi22qd" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxe" %>
<%@ Register TagPrefix="dxGridview" Namespace="DevExpress.Web" Assembly="DevExpress.Web.v14.2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" runat="Server">

    <script language="javascript" type="text/javascript">

        function ValidateAll() {

            var SelectCompany = "Select Company";
            var EnterPolicyName = "Enter the Policy Name";
            var alertTextFrom = "Kindly configure minimum one value of TDS Slab configuration";
            var alertTextProf = "Kindly configure minimum one value of Professional Tax configuration";
            var index = document.aspnetForm.ctl00_BodyContentPH_ddlCompany.selectedIndex;
            var company = document.aspnetForm.ctl00_BodyContentPH_ddlCompany.options[index].value;
            if (company == "0") {
                alert(SelectCompany);
                document.aspnetForm.ctl00_BodyContentPH_ddlCompany.focus();
                return false;
            }
            if ((/^(\s*)$/.test(document.aspnetForm.ctl00_BodyContentPH_txt_PolicyName.value))) {
                alert(EnterPolicyName);
                document.getElementById("ctl00_BodyContentPH_txt_PolicyName").focus();
                return false;
            }// end policy name empty
            var txtFrom = document.getElementById("ctl00_BodyContentPH_txt_TdsRangeFrom_1").value;
            var txtProf = document.getElementById("ctl00_BodyContentPH_txt_ProfRangeFrom_1").value;
            var policyname = document.aspnetForm.ctl00_BodyContentPH_txt_PolicyName.value;
            if (policyname != "") {
                if (txtFrom == "") {
                    alert(alertTextFrom);
                    return false;
                }
                if (txtProf == "") {
                    alert(alertTextProf);
                    return false;
                }

            }

            var RangeFrom = "Range From";
            var RangeTo = "Range To";
            var RangeFromMessage = "Enter the Range From in";
            var RangeTOMessage = "Enter the Range To in";
            var RangePerceMessage = "Enter the TDS % in ";
            var RangeFromValid = "Invalid Range From in";
            var RangeToValid = "Invalid Range To in";
            var RangePercevalid = "Enter the valid TDS % in";

            var RangeCessvalid = "Enter the valid Additional Cess % in below 100";
            var RangeFromToSlab = " " + toUnicodeVariant(RangeFrom, 'bold sans', 'bold') + " " + "should be next value of previous Slab" + " " + toUnicodeVariant(RangeTo, 'bold sans', 'bold');
            var RangeFromgreaterthan = toUnicodeVariant(RangeFrom, 'bold sans', 'bold') + " " + "should  not be greater than " + " " + toUnicodeVariant(RangeTo, 'bold sans', 'bold') + " " + " in";
            var RangeFromlessthan = toUnicodeVariant(RangeFrom, 'bold sans', 'bold') + " " + "should  not be less than " + " " + toUnicodeVariant(RangeTo, 'bold sans', 'bold') + " " + " in";
            var RangeTolessthen = toUnicodeVariant(RangeTo, 'bold sans', 'bold') + " " + "should  not be less than " + " " + toUnicodeVariant(RangeFrom, 'bold sans', 'bold') + " " + " in";
            var RangeToCheck = "Should  not be greaterthan Range From in";
            var MsgTdsPercentage = "TDS % Should not be less than";
            var MsgTdsCess = "Additional Cess % Should not be less than";
            var ChkFromAmount = "Please Check  From in";
            var ChkTOAmount = "Check the Range To in";
            var EqualFromTo = "Check the value Range From and Range To are equal";
            var EmptyCess = "Enter the Additional cess %";
            var RangeFromlessthan = "Range From should  not be less than Range To in";



            // Professional Tax Error Message

            var ProfTolessthan = "Range To should  not be less than Range From in";
            var ProfFromEmpty = "Enter the Range From in";
            var ProfToEmpty = "Enter the Range To in";
            var ProfTaxAmountEmpty = "Enter the Professional Tax Amount";
            var ProfFromgreaterthan = "Range From should  not be greater than Range To in";
            var MsgProfPercentage = "Professional Tax % Should not be less than";
            var RangeProfFromToSlab = toUnicodeVariant(RangeFrom, 'bold sans', 'bold') + " " + "should be next value of previous Slab" + " " + toUnicodeVariant(RangeTo, 'bold sans', 'bold') + " " + " in";
            var RangeProfPerceMessage = "Enter the Professional Tax % in ";

            var rowCount = document.getElementById("ctl00_BodyContentPH_hdnTaxPolicyCount").value;
            //var row = tableCount.rows;
            var ArrayFromBoxValue = new Array();
            ArrayFromBoxValue[0] = 0;
            var ArrayToBoxValue = new Array();
            ArrayToBoxValue[0] = 0;
            var ArrayTdsPercentage = new Array();
            ArrayTdsPercentage[0] = 0;
            var ArrayTdsCess = new Array();
            ArrayTdsCess[0] = 0;
            var ArraySlabName = new Array();
            ArraySlabName[0] = "";
            var sucessFlag = 0;



            var sucessFlag = 0;

            for (var rowId = 1; rowId <= rowCount; rowId++) {

                var txtFrom = document.getElementById("ctl00_BodyContentPH_txt_TdsRangeFrom_" + rowId).value;
                var txtTo = document.getElementById("ctl00_BodyContentPH_txt_TdsRangeTo_" + rowId).value;
                var txtTdsPercentage = document.getElementById("ctl00_BodyContentPH_txt_TdsRangePercent_" + rowId).value;
                var lblSlabName = document.getElementById("ctl00_BodyContentPH_lbl_TdsSlab" + rowId).innerText;
                var txtCess = document.getElementById("ctl00_BodyContentPH_txt_TdsCess_" + rowId).value;



                var PreviousToRange = ArrayToBoxValue.pop();
                var previousFromRange = ArrayFromBoxValue.pop();
                var previousTdsPercentage = ArrayTdsPercentage.pop();
                var previousTdsCess = ArrayTdsCess.pop();
                var PreviousSlabName = ArraySlabName.pop();
                debugger;
                if (txtFrom == "") {
                    alert(RangeFromMessage + " " + lblSlabName);
                    return false;
                }
                else {

                    if (parseInt(txtFrom) != parseInt(PreviousToRange) && rowId != 1) {

                        alert(lblSlabName + RangeFromToSlab);
                        return false;
                    }
                    if (parseInt(txtFrom) > parseInt(txtTo)) {
                        alert(RangeFromgreaterthan + " " + lblSlabName);
                        return false;
                    }
                    if (parseInt(txtFrom) == parseInt(txtTo)) {
                        alert(EqualFromTo + " " + lblSlabName);
                        return false;
                    }
                    if (txtTo == "") {
                        alert(RangeTOMessage + " " + lblSlabName);
                        return false;
                    }
                }

                if (parseFloat(txtTdsPercentage) == parseFloat(previousTdsPercentage) && parseFloat(previousTdsPercentage) != 0) {

                    alert(lblSlabName + " " + MsgTdsPercentage + " " + PreviousSlabName + " " + "TDS %");
                    return false;
                }
                if (parseFloat(txtTdsPercentage) < parseFloat(previousTdsPercentage) && parseFloat(previousTdsPercentage) != 0) {

                    alert(lblSlabName + " " + MsgTdsPercentage + " " + PreviousSlabName + " " + "TDS %");
                    return false;
                }
                if (txtTo == "") {
                    alert(RangeTOMessage + " " + lblSlabName);
                    return false;
                }
                else {
                    if (parseInt(txtTo) != "" && parseInt(txtTo) > parseInt(txtFrom)) {


                        if (txtTdsPercentage == "") {

                            alert(RangePerceMessage + " " + lblSlabName);
                            return false;
                        }

                        else if (parseFloat(txtTdsPercentage) == 0.0 && rowId != 1) {

                            alert(RangePercevalid + " " + lblSlabName);
                            return false;
                        }
                        else if (parseFloat(txtTdsPercentage) > 100) {
                            alert(RangePercevalid + " " + lblProfSlabName);
                            return false;
                        }

                    }
                    else {
                        if (parseInt(txtTo) < parseInt(txtFrom))
                            alert(RangeTolessthen + " " + lblSlabName);
                        return false;
                    }
                }

                if (txtTdsPercentage == "") {
                    alert(RangePerceMessage + " " + lblSlabName);
                    return false;
                }
                else {
                    if (txtTdsPercentage != "" && txtTdsPercentage > 0.0 && parseFloat(txtTdsPercentage) != 0 && parseFloat(txtTdsPercentage) < 100 && rowId != 1) {


                        if (txtCess == "") {

                            alert(EmptyCess + " " + lblSlabName);
                            return false;
                        }
                        if (parseFloat(txtCess) > 100) {
                            alert(RangeCessvalid + " " + lblSlabName);
                            return false;
                        }
                        if (parseFloat(txtCess) < parseFloat(previousTdsCess) && parseFloat(previousTdsCess) != 0) {

                            alert(lblSlabName + " " + MsgTdsCess + " " + PreviousSlabName + " " + "Additional Cess %");
                            return false;
                        }
                    }
                }

                if (txtFrom != "" && txtTo != "" && txtTdsPercentage != "") {

                    if (txtFrom > 0 && txtTo > 0 && txtTdsPercentage > 0.0) {
                        if (txtFrom > txtTo && txtFrom.length > txtTo.length) {
                            alert(RangeToCheck + " " + lblSlabName);
                            return false;
                        }
                        else {
                            sucessFlag = sucessFlag + 1;

                        }

                    }

                }

                ArrayFromBoxValue.push(txtFrom);
                ArrayToBoxValue.push(txtTo);
                ArrayTdsPercentage.push(txtTdsPercentage);
                ArrayTdsCess.push(txtCess);
                ArraySlabName.push(lblSlabName);
            }

            var ArrayProfFromValue = new Array();
            ArrayProfFromValue[0] = 0;
            var ArrayProfToValue = new Array();
            ArrayProfToValue[0] = 0;
            var ArrayProfPercentage = new Array();
            ArrayProfPercentage[0] = 0;
            var ArrayProfSlabName = new Array();
            ArraySlabName[0] = "";



            var ProfrowCount = document.getElementById("ctl00_BodyContentPH_hdnProfPolicyCount").value;
            var ProfArraytxtFrom = new Array();
            ProfArraytxtFrom[0] = 0;
            var ProfArraytxtTo = new Array();
            ProfArraytxtTo[0] = 0;
            var sucessProfFlag = 0;
            for (var rowId = 1; rowId <= rowCount; rowId++) {

                var txtProfFrom = document.getElementById("ctl00_BodyContentPH_txt_ProfRangeFrom_" + rowId).value;
                var txtProfTo = document.getElementById("ctl00_BodyContentPH_txt_ProfRangeTo_" + rowId).value;
                var txtProfTaxAmount = document.getElementById("ctl00_BodyContentPH_txt_ProfRangrAmount_" + rowId).value;
                var lblProfSlabName = document.getElementById("ctl00_BodyContentPH_lbl_ProfSlab" + rowId).innerText;

                var PreviousToRange = ArrayProfToValue.pop();
                var previousFromRange = ArrayProfFromValue.pop();
                var previousProfTaxAmount = ArrayProfAmount.pop();
                var PreviousSlabName = ArrayProfSlabName.pop();


                if (txtProfFrom == "") {
                    alert(ProfFromEmpty + " " + lblProfSlabName);
                    return false;
                }
                else {
                    if (txtProfTo == "") {
                        alert(RangeTOMessage + " " + lblProfSlabName);
                        return false;
                    }
                    if (parseInt(txtProfFrom) != parseInt(PreviousToRange) + 1 && rowId != 1) {

                        alert(RangeProfFromToSlab + " " + lblProfSlabName);
                        return false;
                    }
                    if (parseInt(txtProfFrom) > parseInt(txtProfTo)) {
                        alert(RangeFromgreaterthan + " " + lblProfSlabName);
                        return false;
                    }
                    if (parseInt(txtProfFrom) == parseInt(txtProfTo)) {
                        alert(EqualFromTo + " " + lblProfSlabName);
                    }
                }


                if (txtProfTo == "") {
                    alert(ProfToEmpty + " " + lblProfSlabName);
                    return false;
                }
                else {
                    if (parseInt(txtProfTo) != "" && parseInt(txtProfTo) > parseInt(txtProfFrom)) {


                        if (txtProfTaxAmount == "") {

                            alert(ProfTaxAmountEmpty + " " + lblProfSlabName);
                            return false;
                        }

                        else if (parseFloat(txtTdsPercentage) == 0.0) {

                            alert(RangePercevalid + " " + lblProfSlabName);
                            return false;
                        }
                        else if (parseFloat(txtTdsPercentage) > 100) {
                            alert(RangePercevalid + " " + lblProfSlabName);
                            return false;
                        }

                    }
                    else {
                        if (parseInt(txtProfTo) < parseInt(txtProfFrom))
                            alert(ProfTolessthan + " " + lblProfSlabName);
                        return false;
                    }
                }

                if (txtProfPercentage == "") {
                    alert(RangePerceMessage + " " + lblProfSlabName);
                    return false;
                }
                else {
                    if (parseInt(txtProfTaxAmount) == parseInt(previousProfTaxAmount) && parseInt(previousProfTaxAmount) != 0) {

                        alert(lblProfSlabName + " " + MsgProfPercentage + " " + PreviousSlabName + " " + "Professional Tax %");
                        return false;
                    }
                    if (parseInt(txtProfTaxAmount) < parseInt(previousProfTaxAmount) && parseFloat(previousProfPercentage) != 0) {

                        alert(lblProfSlabName + " " + MsgProfPercentage + " " + PreviousSlabName + " " + "Professional Tax %");
                        return false;
                    }
                }

                if (txtFrom != "" && txtTo != "" && txtProfPercentage != "") {

                    if (txtFrom > 0 && txtTo > 0 && txtTdsPercentage > 0.0) {
                        if (txtFrom > txtTo && txtFrom.length > txtTo.length) {
                            alert(RangeToCheck + " " + lblSlabName);
                            return false;
                        }
                        else {
                            sucessProfFlag = sucessProfFlag + 1;

                        }

                    }

                }

                ArrayProfFromValue.push(txtProfFrom);
                ArrayProfToValue.push(txtProfTo);
                ArrayProfPercentage.push(txtProfPercentage);
                ArrayProfSlabName.push(lblProfSlabName);
            }

            if (sucessFlag == rowCount && sucessProfFlag == ProfrowCount) {
                return true;
            }
            else {
                return false;
            }

        }

        function toUnicodeVariant(str, variant, flags) {
            const offsets = {
                m: [0x1d670, 0x1d7f6],
                b: [0x1d400, 0x1d7ce],
                i: [0x1d434, 0x00030],
                bi: [0x1d468, 0x00030],
                c: [0x1d49c, 0x00030],
                bc: [0x1d4d0, 0x00030],
                g: [0x1d504, 0x00030],
                d: [0x1d538, 0x1d7d8],
                bg: [0x1d56c, 0x00030],
                s: [0x1d5a0, 0x1d7e2],
                bs: [0x1d5d4, 0x1d7ec],
                is: [0x1d608, 0x00030],
                bis: [0x1d63c, 0x00030],
                o: [0x24B6, 0x2460],
                p: [0x249C, 0x2474],
                w: [0xff21, 0xff10],
                u: [0x2090, 0xff10]
            }

            const variantOffsets = {
                'monospace': 'm',
                'bold': 'b',
                'italic': 'i',
                'bold italic': 'bi',
                'script': 'c',
                'bold script': 'bc',
                'gothic': 'g',
                'gothic bold': 'bg',
                'doublestruck': 'd',
                'sans': 's',
                'bold sans': 'bs',
                'italic sans': 'is',
                'bold italic sans': 'bis',
                'parenthesis': 'p',
                'circled': 'o',
                'fullwidth': 'w'
            }

            // special characters (absolute values)
            var special = {
                m: {
                    ' ': 0x2000,
                    '-': 0x2013
                },
                i: {
                    'h': 0x210e
                },
                g: {
                    'C': 0x212d,
                    'H': 0x210c,
                    'I': 0x2111,
                    'R': 0x211c,
                    'Z': 0x2128
                },
                o: {
                    '0': 0x24EA,
                    '1': 0x2460,
                    '2': 0x2461,
                    '3': 0x2462,
                    '4': 0x2463,
                    '5': 0x2464,
                    '6': 0x2465,
                    '7': 0x2466,
                    '8': 0x2467,
                    '9': 0x2468,
                },
                p: {},
                w: {}
            }
            //support for parenthesized latin letters small cases 
            for (var i = 97; i <= 122; i++) {
                special.p[String.fromCharCode(i)] = 0x249C + (i - 97)
            }
            //support for full width latin letters small cases 
            for (var i = 97; i <= 122; i++) {
                special.w[String.fromCharCode(i)] = 0xff41 + (i - 97)
            }

            const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
            const numbers = '0123456789';

            var getType = function (variant) {
                if (variantOffsets[variant]) return variantOffsets[variant]
                if (offsets[variant]) return variant;
                return 'm'; //monospace as default
            }
            var getFlag = function (flag, flags) {
                if (!flags) return false
                return flags.split(',').indexOf(flag) > -1
            }

            var type = getType(variant);
            var underline = getFlag('underline', flags);
            var strike = getFlag('strike', flags);
            var result = '';

            for (var k of str) {
                let index
                let c = k
                if (special[type] && special[type][c]) c = String.fromCodePoint(special[type][c])
                if (type && (index = chars.indexOf(c)) > -1) {
                    result += String.fromCodePoint(index + offsets[type][0])
                } else if (type && (index = numbers.indexOf(c)) > -1) {
                    result += String.fromCodePoint(index + offsets[type][1])
                } else {
                    result += c
                }
                if (underline) result += '\u0332' // add combining underline
                if (strike) result += '\u0336' // add combining strike
            }
            return result
        }

        function OnlyNumberValuewithzero(e) {
            var charCode;
            if (e.keyCode > 0) {
                charCode = e.which || e.keyCode;
            }
            else if (typeof (e.charCode) != "undefined") {
                charCode = e.which || e.keyCode;
            }
            if (charCode > 31 && (charCode < 48 || charCode > 57)) {
                return false;
            }

            else {

                return true;

            }
        }

        function onlyNumbersValue(e) {

            var charCode;
            if (e.keyCode > 0) {
                charCode = e.which || e.keyCode;
            }
            else if (typeof (e.charCode) != "undefined") {
                charCode = e.which || e.keyCode;
            }
            if (charCode > 31 && (charCode < 48 || charCode > 57)) {
                return false;
            }

            else {
                if (e.srcElement.value.length == 0 && e.which == 48) {
                    e.preventDefault();
                    return false;
                }
                else {

                    return true;
                }

            }


        }

    </script>

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

    <script src="../plugins/daterangepicker/moment.js" type="text/javascript"></script>

    <script src="../plugins/datepicker/jquery-1.11.1.min.js"></script>

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

    <script src="../plugins/datepicker/bootstrap-datepicker.js"></script>

    <div class="content-header">
        <h1 style="background-image: url('../dist/img/leave-policy.png'); background-repeat: no-repeat; padding-left: 35px">
            <%--<span>
                <img src="../dist/img/policy-icon.png" style="padding-right: 10px;"></span>--%>
            <asp:Label ID="lbl_HeaderTaxPolicy" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <asp:UpdatePanel ID="upLeave" runat="server">
            <ContentTemplate>
                <asp:Panel ID="pnlProgress" runat="server" Style="display: none;">
                    <asp:Panel ID="pnlLoading" runat="server" HorizontalAlign="center">
                        <div class="InsideProgressBar">
                            <div class="row" style="margin-top: 10px">
                                <img src="../dist/img/logo-Progress.png" />
                            </div>
                            <div class="row" style="min-width: 280px">
                                <img src="../dist/img/default.gif" style="width: 100px" />
                            </div>
                            <div class="row" style="margin-bottom: 10px">
                                <asp:Label ID="lblLoading" runat="server" ForeColor="black" Style="text-align: center"
                                    Text="Please Wait..." Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial"></asp:Label>
                            </div>
                            <div class="clear clearfix">
                            </div>
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <asp:HiddenField ID="hdnProgress" runat="server" />
                <cc1:ModalPopupExtender ID="popupProgress" runat="server" TargetControlID="hdnProgress"
                    BackgroundCssClass="ModalPopup" PopupControlID="pnlProgress" BehaviorID="popupProgress">
                </cc1:ModalPopupExtender>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div id="myModal" class="modal modal-default fade" role="dialog">
            <div class="modal-dialog" style="min-width: 85%;">
                <!-- Modal content-->
                <div class="modal-content" style="margin-top: 50px">
                    <div class="modal-header">
                        <button type="button" id="closemodal" class="close" data-dismiss="modal" style="border-radius: 50px;">
                            &times;</button>
                        <h4 class="modal-title">
                            <asp:Label ID="lblSelectEmployee" runat="server" Text="Select Employee"></asp:Label></h4>
                    </div>
                    <div class="modal-body">
                        <iframe id="iframePopup" runat="server" scrolling="auto" width="100%" height="700px"
                            style="border-style: none"></iframe>
                    </div>
                    <div class="modal-footer" style="display: none">
                        <button type="button" class="btn btn-primary pull-right" data-dismiss="modal">
                            Close</button>
                    </div>
                </div>
            </div>
        </div>
        <div>
            <!--FILTERS-->
            <div class="exda-table">
                <h6>
                    <span style="color: Red">|</span>
                    <asp:Label ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                    (3 No.)</h6>
            </div>
            <!--FILTERS-->
            <div class="emp-filter">
                <div class="row">
                    <div class="form-horizontal">
                        <div class="row form-group">
                            <div class="col-md-12">
                                <div class="col-md-2">
                                    <asp:Label ID="lblCompany" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlCompany" runat="server" AppendDataBoundItems="true" CssClass="form-control select2 Man-dat">
                                        <asp:ListItem Value="0" Text="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_PolicyName" runat="server" class="control-label"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txt_PolicyName" runat="server" CssClass="form-control mandatory"
                                        MaxLength="40" oncut="return false" onDelete="return false" ondrop="return false"
                                        onkeyPress="return chkMaxLen(event,this,40,MaxLength)"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-12">
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpCategory" runat="server" class="control-label"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEmpCatagory" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true" OnDataBound="ddlEmpCatagory_DataBound">
                                        <asp:ListItem Value="0" Selected="True" Text="All"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpType" runat="server" class="control-label"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEmpType" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true" OnDataBound="ddlEmpType_DataBound">
                                        <asp:ListItem Value="0" Selected="True" Text="All"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-12">
                                <div class="col-md-2">
                                    <asp:Label ID="lblGender" runat="server" class="control-label"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlGender" runat="server" CssClass="form-control select2">
                                        <asp:ListItem Value="0" Text="Both"></asp:ListItem>
                                        <asp:ListItem Value="1" Text="Male"></asp:ListItem>
                                        <asp:ListItem Value="2" Text="Female"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>

                            </div>
                        </div>

                        <!--TABLE-->

                        <!--3-->
                        <%--  <div class="row form-group" style="margin-top: 15px">--%>
                        <div class="row ">
                            <div class="lve-polhdr1">

                                <h3>
                                    <asp:Label ID="chkTDS" runat="server"></asp:Label>
                                </h3>

                            </div>
                        </div>
                        <div class="lvepol-table">
                            <div class="row">
                                <div class="table-responsive">
                                    <asp:UpdatePanel ID="UPTdsSlab" runat="server">
                                        <ContentTemplate>
                                            <asp:Panel ID="PH_DynmCtrl" runat="server" EnableViewState="true">
                                            </asp:Panel>

                                            <div class="col-md-12">
                                                 
                                                 <div class="pull-right-button" style="position: relative; right: 20px;">

                                                    <asp:LinkButton ID="btn_AddSlab" CssClass="btn add-btn fa-plus" runat="server"
                                                        OnClick="btn_AddSlab_Click" />

                                                    <asp:HiddenField ID="hdnProfPolicyCount" runat="server" />

                                                </div>
                                           
                                               
                                            </div>
                                            <div class="col-md-9">
                                                <asp:Label ID="lbl_Note" runat="server" style="color:red">Note - For Every Individual Employee on Calculating the TDS the Additional Cess deduction % will be done based on the % mentioned under the respective TDS Slab.</asp:Label>  
                                            </div>

                                        </ContentTemplate>

                                    </asp:UpdatePanel>
                                </div>
                            </div>
                            <div class="clearfix">
                            </div>
                        </div>


                        <div class="clearfix">
                        </div>
                    </div>
                    <%--</div>--%>
                    <div style="margin-top: 15px">
                        <div class="row">
                            <div class="lve-polhdr1">
                                <h3>
                                    <asp:Label ID="chkProfessionalTax" runat="server"></asp:Label>

                                </h3>
                            </div>
                        </div>

                        <div class="row col-md-12">
                            <asp:UpdatePanel ID="up1" runat="server" style="position: relative; top: 20px;">
                                <ContentTemplate>
                                    <div class="row form-group ">
                                        <div class="col-md-12">
                                            <div class="col-md-2">
                                                <asp:Label ID="lblProfessionalType" runat="server" Text="Professional Tax Type"></asp:Label>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="col-md-3">
                                                    <asp:RadioButton ID="rbtn_Amount" runat="server" Checked="True" GroupName="ProfessinalTax"
                                                        Text="Amount" CssClass="radio radio-primary" OnCheckedChanged="rbtn_Amount_CheckedChanged" AutoPostBack="true" />
                                                </div>
                                                <div class="col-md-3">
                                                    <asp:RadioButton ID="rbtn_Percentage" runat="server" GroupName="ProfessinalTax" Text="Percentage"
                                                        CssClass="radio radio-primary" OnCheckedChanged="rbtn_Percentage_CheckedChanged" AutoPostBack="true" />
                                                </div>
                                            </div>
                                        </div>


                                    </div>
                                    <asp:Panel ID="PHProfess_DynCtrl" runat="server" EnableViewState="true">
                                    </asp:Panel>

                                    <div class="col-md-12">

                                        <div class="pull-right-button" style="position: relative; right: -20px;">

                                            <asp:LinkButton ID="btn_ProfessAddSlab" CssClass="btn add-btn fa-plus" runat="server"
                                                OnClick="btn_ProfessAddSlab_Click" />
                                            <asp:HiddenField ID="hdnTaxPolicyCount" runat="server" />

                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>

                    <div>
                    </div>
                    <div class="col-md-6">

                        <%-- <asp:UpdatePanel ID="upLeave" runat="server">
                            <ContentTemplate>
                                <asp:Panel ID="pnlProgress" runat="server" Style="display: none;">
                                    <asp:Panel ID="pnlLoading" runat="server" HorizontalAlign="center">
                                        <div class="InsideProgressBar">
                                            <div class="row" style="margin-top: 10px">
                                                <img src="../dist/img/logo-Progress.png" />
                                            </div>
                                            <div class="row" style="min-width: 280px">
                                                <img src="../dist/img/default.gif" style="width: 100px" />
                                            </div>
                                            <div class="row" style="margin-bottom: 10px">
                                                <asp:Label ID="lblLoading" runat="server" ForeColor="black" Style="text-align: center"
                                                    Text="Please Wait..." Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial"></asp:Label>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </asp:Panel>
                                <asp:HiddenField ID="hdnProgress" runat="server" />
                                <cc1:ModalPopupExtender ID="popupProgress" runat="server" TargetControlID="hdnProgress"
                                    BackgroundCssClass="ModalPopup" PopupControlID="pnlProgress" BehaviorID="popupProgress">
                                </cc1:ModalPopupExtender>
                            </ContentTemplate>
                        </asp:UpdatePanel>--%>
                    </div>

                    <div class="row" style="margin-top: 50px;">
                        <div class="col-md-12">
                            <div class="pull-right-button">
                                <asp:LinkButton ID="btn_save" CssClass="btn save-btn fa-floppy-o" runat="server"
                                    OnClick="btn_save_Click" OnClientClick="if(ValidateAll()) $find('popupProgress').show();else return false;" />
                                <asp:LinkButton ID="btn_cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                    CausesValidation="false" OnClick="btn_cancel_Click" />
                            </div>
                        </div>
                    </div>

                    <%-- <div class="col-md-6" style="margin-top: 30px; float: right">
                        <div class="filter-button">
                           <asp:updatepanel Id="upbtn" runat="server">
                               <ContentTemplate>
                                   <asp:LinkButton ID="LinkButton1" CssClass="btn save-btn fa-floppy-o" runat="server"
                                     OnClick="btn_save_Click" OnClientClick="if(ValidateAll()) $find('popupProgress').show();else return false;" />
                                    <asp:LinkButton ID="LinkButton2" CssClass="btn save-btn fa-angle-left" runat="server"
                                    CausesValidation="false" OnClick="btn_cancel_Click" />
                               </ContentTemplate>
                           </asp:updatepanel>
                            
                            <%-- Change the value to 1, it will throw the alert message 
                        </div>
                    </div>--%>
                </div>
                <!--4-->

            </div>

        </div>
    </div>

</asp:Content>
