<%@ page language="C#" autoeventwireup="true" inherits="Transactions_TA_UI_Transactions_LeaveApplicationView, App_Web_f1nxgpvb" %>

<%@ Register Src="../UserControls/TA_uc_OrgLevel_Filter.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" runat="server" id="htmlLeaveView">
<head id="Head1" runat="server">
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
        name="viewport" />
    <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" />
    <title>
        <asp:label id="lbl_HeaderLeaveApplication" runat="server"></asp:label>
    </title>

    <script type="text/javascript">
        var SelectLeaveType = "Select Leave Type";
        var SelectLeaveorHoliday = "Select Leave/Restricted Holiday";
        var FillFromDate = "Fill From Date";
        var FillToDate = "Fill To Date";
        var SelectFromSession = "Select From Session";
        var SelectToSession = "Select To Session";
        var FillReason = "Fill Reason";
        var NumberofDaysEmpty = "Number of Days Applied Should Not Be Empty";
        var NumberofDaysZero = "Number of Days Applied Should Not Be Zero";
        var Confirm = "Are you sure to, Save?";
        function SetAlertMessages(selectLeavePolicy, selectLeaveorHoliday, fillFromDate, fillToDate, selectFromSession, selectToSession, fillReason, numberofDaysEmpty, numberofDaysZero, confirm) {
            SelectLeaveType = selectLeavePolicy;
            SelectLeaveorHoliday = selectLeaveorHoliday;
            FillFromDate = fillFromDate;
            FillToDate = fillToDate;
            SelectFromSession = selectFromSession;
            SelectToSession = selectToSession;
            FillReason = fillReason;
            NumberofDaysEmpty = numberofDaysEmpty;
            NumberofDaysZero = numberofDaysZero;
            Confirm = confirm;
        }
        function LeaveApplicationModifyClear() {
            document.aspnetForm.ctl00_BodyContentPH_ddl_SessionFrom.selectedIndex = 0;
            document.aspnetForm.ctl00_BodyContentPH_ddl_SessionTo.selectedIndex = 0;
            document.aspnetForm.ctl00_BodyContentPH_txt_Numberofdays.value = "";
        }
        function Validation() {
            var LTypeIndex = document.aspnetForm.ctl00_BodyContentPH_ddl_LeaveType.selectedIndex;
            var LeaveType = document.aspnetForm.ctl00_BodyContentPH_ddl_LeaveType.options[LTypeIndex].value;
            var TypeIndex = document.aspnetForm.ctl00_BodyContentPH_ddl_Type.selectedIndex;
            var Type = document.aspnetForm.ctl00_BodyContentPH_ddl_Type.options[TypeIndex].value;
            if (LeaveType == "-Select-") {
                alert(SelectLeaveType);
                return false;
            }
            else if (Type == "-Select-") {
                alert(SelectLeaveorHoliday);
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value == "") {
                alert(FillFromDate);
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txtToDate.value == "") {
                alert(FillToDate);
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_ddl_SessionFrom.selectedIndex == 0) {
                alert(SelectFromSession);
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_ddl_SessionTo.selectedIndex == 0) {
                alert(SelectToSession);
                return false;
            }
            else if (trim(document.aspnetForm.ctl00_BodyContentPH_txtReason.value) == "") {
                alert(FillReason);
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_Numberofdays.value == "") {
                alert(NumberofDaysEmpty);
                return false;
            }
            else if (document.aspnetForm.ctl00_BodyContentPH_txt_Numberofdays.value == "0") {
                alert(NumberofDaysZero);
                return false;
            }
            else {
                return confirm(Confirm);
            }
        }
        function assignEmployeeId(empid) {
            document.getElementById('ctl00_BodyContentPH_hdnEmployeeId').value = empid;
            document.getElementById('ctl00_BodyContentPH_ddl_Type').focus();
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="content">
            <div class="emp-filter">
                <div class="form-horizontal">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_EmployeeID1" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_EmployeeID" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_EmployeeName1" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_EmployeeName" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_LeaveRestrictedHoliday" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lblType" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_LeaveType" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lblLeaveType" runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"
                                        CssClass="form-control"> </asp:Label>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_LeaveApplicationDate1" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lbl_LeaveApplicationDate" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_From" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lblFromDate" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_To" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lblToDate" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_FromSession" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lblSessionFrom" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_ToSession" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lblSessionTo" runat="server" CssClass="form-control"></asp:Label>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_Reason" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lblReason" runat="server" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"
                                        CssClass="form-control"></asp:Label>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_Numberofdaysapplied" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:Label ID="lblNumberofdaysapplied" runat="server" CssClass="form-control"></asp:Label>
                                    <input id="Hidden1" type="hidden" value='<% Response.Write(Convert.ToString(Session["IDateFormat"])); %>' />
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-12">
                                    <div id="divLeaveConversation" runat="server">
                                    </div>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-12">
                                    <div id="divLeaveQuotaDetails" runat="server">
                                    </div>
                                </div>
                            </div>
                            <div class="row form-group" id="divPrint" runat="server" style="display: none">
                                <div class="col-md-8">
                                </div>
                                <div class="col-md-3">
                                    <div class="pull-right-button">
                                        <asp:LinkButton ID="btn_print" CssClass="btn save-btn fa-print" runat="server"
                                            Text="&nbsp;&nbsp;Print" OnClick="btn_print_Click" OnClientClick="javascript:if(confirm('Do you want to print this leave application')){return true}else {return false;}" />
                                    </div>
                                </div>
                            </div>
                            <div class="row" style="display: none">
                                <div class="col-md-12">
                                    <asp:Button ID="btn_Delete" CssClass="but" runat="server" CausesValidation="False"
                                        TabIndex="11" OnClick="btn_Delete_Click" />
                                    <asp:Button ID="btn_Cancel" CssClass="but" runat="server" CausesValidation="False"
                                        TabIndex="12" OnClick="btn_Cancel_Click" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
