<%@ page language="C#" masterpagefile="~/MasterFile/TimeCheck.master" autoeventwireup="true" enableeventvalidation="false" inherits="Transactions_TA_UI_Transactions_YearClosureAdd, App_Web_f1nxgpvb" %>

<%--<%@ 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" %>--%>
<asp:Content ID="ConYearClosureAdd" ContentPlaceHolderID="BodyContentPH" runat="Server">

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

        var SuccessiveYear = "Select Successive Year";
        var SelectCompany = "Select Company";
        function SetAlertMessages(successiveYear, Selectcompany) {

            SuccessiveYear = successiveYear;
            SelectCompany = Selectcompany;
        }
        function validate_Year() {

            if (document.getElementById('<%=ddlCompany.ClientID %>').selectedIndex == 0) {
                alert(SelectCompany);
                document.aspnetForm.ctl00_BodyContentPH_ddlCompany.focus();
                return false;
            }
            //if (document.getElementById('<%=ddl_SuccessiveYear.ClientID %>').value=="-Select-")
            if (document.getElementById('<%=ddl_SuccessiveYear.ClientID %>').selectedIndex == 0) {
                alert(SuccessiveYear);
                return false;
            }

        }

    </script>

    <div class="content-header">
        <h1 style="background-image: url(../dist/img/yearend.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">
        <div class="row" style="display: none">
            <div class="col-md-12" style="color: Red">
                <span class="fa fa-asterisk"></span>

                <asp:Label ID="lbl_Error" runat="server"></asp:Label>
            </div>
        </div>
        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-2">
                </div>
                <div class="col-sm-2 col-sm-offset-8">
                    <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>
                                (2 No.)</span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row">
                    <div class="col-md-12">
                        <asp:UpdatePanel ID="upOrgLevel" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <div class="form-group">
                                    <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"
                                            OnSelectedIndexChanged="ddlCompany_SelectedIndexChanged" AutoPostBack="true">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-2">
                                        <asp:Label ID="lbl_Year" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:Label ID="lblYearSetting" runat="server" CssClass="form-control"></asp:Label>
                                    </div>
                                    <div class="col-md-1">
                                    </div>
                                    <div class="col-md-2">
                                        <asp:Label ID="lbl_ClosedDate" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:Label ID="lblClosedDate" runat="server" CssClass="form-control"></asp:Label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-2">
                                        <asp:Label ID="lbl_SuccessiveYear" runat="server"></asp:Label>
                                    </div>
                                    <div class="col-md-3">
                                        <asp:DropDownList ID="ddl_SuccessiveYear" runat="server" CssClass="form-control select2 Man-dat"
                                            OnSelectedIndexChanged="ddl_SuccessiveYear_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="ddlCompany" EventName="SelectedIndexChanged" />
                                <asp:PostBackTrigger ControlID="btn_Save" />
                                <asp:PostBackTrigger ControlID="btn_Modify" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </div>
                    <div class="col-md-5">
                    </div>
                    <div class="col-md-6">
                        <div class="pull-right-button">
                            <asp:LinkButton ID="btn_Save" CssClass="btn save-btn fa-floppy-o" runat="server"
                                OnClientClick="return validate_Year();" OnClick="btn_Save_Click" />
                            <asp:LinkButton ID="btn_Modify" CssClass="btn save-btn fa-pencil-square-o" runat="server"
                                OnClick="btn_Modify_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        function LoadDropdown() {
            $(".select2").select2();
        }
    </script>

</asp:Content>
