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

<%--<%@ Register Src="../UserControls/TA_uc_OrgLevel_Filter.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc1" %>--%>
<%@ Register Src="../UserControls/TA_uc_OrgLevelFilter_Updated.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="ConEncashmentAdd" ContentPlaceHolderID="BodyContentPH" runat="Server">
    <!--[if gt IE 5.5]>
	<link rel="stylesheet" type="text/css" href="../css/ProgressforIE.css" />
 <![endif]-->
    <script language="javascript" src="../js/EmployeeNameAjax.js" type="text/javascript"></script>
    <script>
        $(function () {
            $('#ctl00_BodyContentPH_TextBox9').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });
    </script>
    <script language="javascript" type="text/javascript">
        var SelLeaveType = "Select Leave Type";
        var RemainingDays = "RemainingNoOfdays Should Not Be Empty / Zero";
        var NoofDaysApply = "Number Of Days Applied Should Not be Empty";
        var ReasonNotEmpty = "Reason Should Not be Empty";
        var NoofDaysShouldNot = "Number Of Days Applied Should be greater than Remaining number of Days";
        var Confirm = "Are you sure to, Save?";
        var Fraction = "Number Of Days Applied Should be fraction of 5";
        var MaxLength = "Maximum length is ";
        var NoRecords = "No Records";
        var Errorinretrivingdetails = "Error in retriving details";
        var SelectEmployee = "Select Employee";
        var Select = "-Select-";
        function MaxLengthh(maxLength) {
            MaxLength = maxLength;
        }
        function SetAlertMessages(selLeaveType, remainingDays, NoofDaysapply, reasonNotEmpty, noofDaysShouldNot, confirm, fraction, noRecords, errorinretrivingdetails, selectEmployee, select) {
            SelLeaveType = selLeaveType;
            RemainingDays = remainingDays;
            NoofDaysApply = NoofDaysapply;
            ReasonNotEmpty = reasonNotEmpty;
            NoofDaysShouldNot = noofDaysShouldNot;
            Confirm = confirm;
            Fraction = fraction;
            NoRecords = noRecords;
            Errorinretrivingdetails = errorinretrivingdetails;
            SelectEmployee = selectEmployee;
            Select = select;
        }
        function encashmentValidation() {
            if (document.getElementById('ctl00_BodyContentPH_ddl_Leavetype').value == "-Select-") {
                alert(SelLeaveType);
                return false;
            }
            else if (document.getElementById('ctl00_BodyContentPH_txt_RemainingNoOfDays').value == "" || document.getElementById('ctl00_BodyContentPH_txt_RemainingNoOfDays').value == "0.00") {
                alert(RemainingDays);
                return false;
            }
            else if (document.getElementById('ctl00_BodyContentPH_txt_Numberofdays').value == "") {
                alert(NoofDaysApply);
                return false;
            }
            else if (document.getElementById('ctl00_BodyContentPH_txtReason').value == "") {
                alert(ReasonNotEmpty);
                return false;
            }
            else {
                if (document.getElementById('ctl00_BodyContentPH_txt_Numberofdays').value != "") {
                    var vNoOfDays = document.getElementById('ctl00_BodyContentPH_txt_Numberofdays').value % 0.5;
                    if (vNoOfDays == 0) {
                        if (parseFloat(document.getElementById('ctl00_BodyContentPH_txt_Numberofdays').value) > parseFloat(document.getElementById('ctl00_BodyContentPH_txt_RemainingNoOfDays').value)) {
                            alert(NoofDaysShouldNot);
                            return false;
                        }
                        else {
                            return confirm(Confirm);
                        }
                    }
                    else {
                        alert(Fraction);
                        return false;
                    }
                }
            }
        }
    </script>
    <div class="content-header">
        <h1 style="background-image: url('../dist/img/encashment.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_Header" 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>
            <Triggers>
                <asp:PostBackTrigger ControlID="btn_Save" />
            </Triggers>
        </asp:UpdatePanel>
        <div class="form-horizontal">
            <div class="inr-ftr">
                <div class="row">
                    <div class="col-sm-6">
                        <div class="inr-fil-text pull-left" style="width: 150px !important">
                            <asp:Label ID="lblFilter" runat="server" Text="Transfer From"></asp:Label>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="pull-right">
                            <h6>
                                <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label
                                    ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                                    (3 No.)</span>
                            </h6>
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>
                </div>
            </div>
            <div class="emp-filter">
                <div class="row form-group">
                    <div class="col-md-2">
                        <asp:Label ID="lbl_EmployeeId" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <div class="input-group input-group-sm">
                            <asp:TextBox onpaste="return true" ID="txt_EmployeeId" runat="server" CssClass="form-control man-dat"
                                MaxLength="15" onblur="EmpName('ManualTimeEntry');" onkeypress="return acceptCharsNum_MaxLength(event,this,15,MaxLength);"></asp:TextBox>
                            <span class="input-group-btn">
                                <asp:LinkButton ID="btn_Search" data-toggle="modal" data-target="#myModal" CssClass="btn save-btn btn-flat fa fa-search"
                                    runat="server" OnClientClick="return OpenWindowShiftExchange('txt_EmployeeId','ManualTimeEntry');" />
                            </span>
                        </div>
                    </div>
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-2">
                        <asp:Label ID="lbl_EmployeeName" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox onpaste="return true" CssClass="form-control" ID="txt_Name" runat="server"
                            ReadOnly="True"></asp:TextBox>
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-md-2">
                        <asp:Label ID="lblCurDeprtlblNme" Text="Current Department" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox onpaste="return true" CssClass="form-control" ID="TextBox1" runat="server"
                            ReadOnly="True"></asp:TextBox>
                    </div>
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-2">
                        <asp:Label ID="lblCurDesgnton" Text="Current Designation" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox onpaste="return true" CssClass="form-control" ID="TextBox2" runat="server"
                            ReadOnly="True"></asp:TextBox>
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-md-2">
                        <asp:Label ID="lblReprtTo" Text="Reporting To" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox onpaste="return true" CssClass="form-control" ID="TextBox3" runat="server"
                            ReadOnly="True"></asp:TextBox>
                    </div>
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-2">
                        <asp:Label ID="lblApprvlAuthrty" Text="Approval Authority" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox onpaste="return true" CssClass="form-control" ID="TextBox4" runat="server"
                            ReadOnly="True"></asp:TextBox>
                    </div>
                </div>
                <div class="clearfix">
                </div>
                <div class="config-hdr con-spc">
                    <div class="row">
                        <div class="col-md-12">
                            <h3>
                                <asp:Label Font-Bold="true" ID="lblTransfrToHdr" runat="server" Text="Transferred To"></asp:Label></h3>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <asp:UpdatePanel ID="upOrgLevel" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:PlaceHolder ID="PlaceHolderLateEntry" runat="server">
                                    <uc1:TA_uc_OrgLevel_Filter ID="ucOrganizationLevel" runat="server" />
                                </asp:PlaceHolder>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-md-2">
                        <asp:Label ID="Label1" Text="New Designation" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:DropDownList ID="ddl_Designation" CssClass="form-control select2 Man-dat" EnableViewState="true"
                            runat="server" AppendDataBoundItems="true" onchange="return GetEmployeeInfo('1',ErrorretrievingdatafromAuthority);">
                            <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-2">
                        <asp:Label ID="Label3" Text="Entry Date" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox onpaste="return true" CssClass="form-control" ID="txtEntryDate" runat="server"
                            ReadOnly="True"></asp:TextBox>
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-md-2">
                        <asp:Label ID="Label5" Text="New Reporting To" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:DropDownList ID="ddl_ReportingTo" CssClass="form-control select2" runat="server"
                            AppendDataBoundItems="true" onchange="return GetEmployeeInfo('2',ErrorretrievingdatafromAuthority);">
                            <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-2">
                        <asp:Label ID="Label7" Text="New Approval Authority" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:DropDownList ID="ddl_LeaveSancAuthority" CssClass="form-control select2" runat="server"
                            AppendDataBoundItems="true">
                            <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
                <div class="row form-group">
                    <div class="col-md-2">
                        <asp:Label ID="Label9" Text="Transfer Date" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox onpaste="return true" CssClass="form-control" ID="TextBox9" runat="server"></asp:TextBox>
                    </div>
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-2">
                        <asp:Label ID="Label11" Text="Remarks" runat="server"></asp:Label>
                    </div>
                    <div class="col-md-3">
                        <asp:TextBox Style="resize: none;" onpaste="return true" ID="txtReason" runat="server"
                            onkeypress="return chkMaxLen(event,this,50,MaxLength)" CssClass="form-control man-dat"
                            MaxLength="50" TextMode="MultiLine"></asp:TextBox>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-5">
                    </div>
                    <div class="col-md-6">
                        <div class="pull-right-button">
                            <asp:HiddenField ID="Hidden1" runat="server" />
                            <asp:LinkButton ID="btn_Save" runat="server" CssClass="btn save-btn fa-floppy-o"
                                OnClick="btn_Save_Click" OnClientClick="if(encashmentValidation()) $find('popupProgress').show();else return false;" />
                            <asp:LinkButton ID="btn_Back" runat="server" CausesValidation="False" CssClass="btn save-btn fa-angle-left"
                                OnClick="btn_Back_Click" />
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</asp:Content>
