<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Common_Master_HolidayMaster, App_Web_pnlltqcr" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DataPickerControl"
    TagPrefix="HIMS" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager"
    TagPrefix="uc1" %>
<asp:Content ContentPlaceHolderID="CP" ID="CntHolidayMaster" runat="server">
    <asp:UpdatePanel ID="updtHoliday" runat="server">
        <ContentTemplate>
            <!-- Sub Container2 Box Start -->
            <div class="himssuHeader2WireBox">
                <div class="himsBoxHeader">
                    <asp:Panel ID="TopPanel" runat="server" meta:resourcekey="TopPanelResource1">
                        <div class="leftdiv">
                        </div>
                        <div class="himsBoxTitle">
                            <asp:Image ID="Image1" runat="server" class="fLeft" 
                                meta:resourcekey="Image1Resource1" />
                            <div class="headerText">
                                <asp:Label ID="Label3" runat="server" Text="Search" 
                                    meta:resourcekey="Label3Resource1"></asp:Label>
                                <cc1:CollapsiblePanelExtender ID="cpe" runat="server" TargetControlID="DetailPanel"
                                    ExpandControlID="Image1" CollapseControlID="Image1" TextLabelID="Label3" Collapsed="True"
                                    ImageControlID="Image1" ExpandedImage="~/images/buttonCollapse.gif" 
                                    CollapsedImage="~/images/buttonExpand.gif" Enabled="True" />
                            </div>
                        </div>
                    </asp:Panel>
                </div>
                <asp:Panel ID="DetailPanel" runat="server" 
                    meta:resourcekey="DetailPanelResource1">
                    <div class="himsBoxContent">
                        <div class="contentHolder">
                            <asp:Panel ID="SearchCriteriaPanel" runat="server" 
                                meta:resourcekey="SearchCriteriaPanelResource1">
                                <div class="outerBox pTop5">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="HolCodeLabel" Text="Name" runat="server" 
                                            meta:resourcekey="HolCodeLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="HolCodeTextBox" TabIndex="1" onkeypress="return fnKeyPressForNameField(event)"
                                            onblur="return fnonTextChangeNameField(this)" runat="server" Text="*" 
                                            meta:resourcekey="HolCodeTextBoxResource1"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="outerBoxPreBtn pTop5">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="HolTypeLabel" Text="Type" runat="server" 
                                            meta:resourcekey="HolTypeLabelResource1"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:DropDownList ID="HolTypeDropDownList" DataValueField="Id" DataTextField="Title"
                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" runat="server"
                                            TabIndex="2" meta:resourcekey="HolTypeDropDownListResource1">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="outerBox pTop5">
                                    <div class="searchBoxBtn">
                                        <asp:Button ID="SearchButton" CausesValidation="False" Text="Search" runat="server"
                                            OnClick="SearchButton_Click" TabIndex="3" SkinID="0" CssClass="PrimaryButton"/>
                                        <asp:Button ID="ClearSearchButton" CausesValidation="False" Text="Clear" runat="server"
                                            OnClick="ClearSearchButton_Click" onblur="fnClearTabIndexChange()" 
                                            TabIndex="4" meta:resourcekey="ClearSearchButtonResource1" />
                                    </div>
                                </div>
                                <div class="cBoth">
                                </div>
                            </asp:Panel>
                            <div id="MainDiv" runat="server" visible="False">
                                <div class="spacer">
                                    <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/spacer.gif" 
                                        meta:resourcekey="Image3Resource1" />
                                </div>
                                <div class="himssuHeader1WireBox">
                                    <div class="himsBoxHeader" id="HolidayDiv" visible="False" runat="server">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle" style="width: 99%">
                                            <div class="headerText">
                                                <div class="fLeft">
                                                    List
                                                </div>
                                            </div>
                                            <div align="right" class="fRight" style="margin-top: -3px;">
                                                <uc1:GridViewPager ID="HolidayMasterGridViewPager" runat="server" ParentGridView="grdHolidays"
                                                    OnFirstRecordClick="GridViewPager_FirstRecordClick" OnLastRecordClick="GridViewPager_LastRecordClick"
                                                    OnNextRecordClick="GridViewPager_NextRecordClick" OnPrevRecordClick="GridViewPager_PrevRecordClick"
                                                    OnTextBoxValueChange="GridViewPager_TextBoxValueChange" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="himsBoxContent">
                                        <div id="DivHeader" style="vertical-align: top; width: 100%;">
                                            <asp:Table ID="grdHolidaysTable" runat="server" CellPadding="0" CellSpacing="0" BackColor="#E8E8E8"
                                                ForeColor="Black" Width="100%" GridLines="Both" 
                                                CssClass="GridViewTableRow" meta:resourcekey="grdHolidaysTableResource1">
                                            </asp:Table>
                                        </div>
                                        <div class="himsBoxContentMsg" id="GridMessageDiv" runat="server" 
                                            visible="False">
                                        </div>
                                        <div id="DivData" class="Container" style="vertical-align: top; height: 100px; width: 99.6%;">
                                            <asp:GridView Width="100%" ID="grdHolidays" runat="server" BackColor="White" BorderColor="#3398CC"
                                                BorderStyle="Solid" GridLines="None" AutoGenerateColumns="False" AllowSorting="True"
                                                PageSize="5" OnSelectedIndexChanged="grdHolidays_SelectedIndexChanged" AllowPaging="True"
                                                EmptyDataText="No records found" ShowHeader="False"
                                                DataKeyNames="HolidayTypeID" meta:resourcekey="grdHolidaysResource1">
                                                <Columns>
                                                    <asp:CommandField ShowSelectButton="True" 
                                                        meta:resourcekey="CommandFieldResource1" >
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                    </asp:CommandField>
                                                    <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource1">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblHolidayID" runat="server" Text='<%# Bind("HolidayID") %>' 
                                                                meta:resourcekey="lblHolidayIDResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle Width="0%" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="HolidayTypeID" Visible="False" 
                                                        meta:resourcekey="BoundFieldResource1" >
                                                        <ItemStyle Width="0%" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="HolidayDate" DataFormatString="{0:d}" 
                                                        HeaderText="Date" meta:resourcekey="BoundFieldResource2" >
                                                        <ItemStyle Width="15%" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="Name" meta:resourcekey="TemplateFieldResource2">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblHolidayName" Width="100px" CssClass="boxEllips" ToolTip='<%# Bind("HolidayName") %>'
                                                                runat="server" Text='<%# Bind("HolidayName") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle Width="20%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Type" meta:resourcekey="TemplateFieldResource3">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblHolidayType" Width="150px" CssClass="boxEllips" ToolTip='<%# Bind("HolidayTypeDescription") %>'
                                                                runat="server" Text='<%# Bind("HolidayTypeDescription") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle Width="25%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Remark" 
                                                        meta:resourcekey="TemplateFieldResource4">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblHolidayReason" Width="150px" CssClass="boxEllips" ToolTip='<%# Bind("HolidayReason") %>'
                                                                runat="server" Text='<%# Bind("HolidayReason") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle Width="20%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="InActive" 
                                                        meta:resourcekey="TemplateFieldResource5">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="IsObsoleteCheckBox" Enabled="False" Visible="False" Checked='<%# Eval("IsObsolete") %>'
                                                                runat="server" meta:resourcekey="IsObsoleteCheckBoxResource1" />
                                                            <asp:Label ID="lblIsInactive" runat="server" Text='<%# Bind("IsInactive") %>' 
                                                                meta:resourcekey="lblIsInactiveResource1"></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:Panel>
            </div>
            <!-- Sub Container2 Box Ends -->
            <div class="spacer">
                <asp:Image ID="spacerImage" runat="server" ImageUrl="~/Images/spacer.gif" 
                    meta:resourcekey="spacerImageResource1" />
            </div>
            <!-- Sub Container1 Box Start -->
            <div class="himssuHeader1WireBox">
                <div class="himsBoxHeader">
                    <div class="leftdiv">
                    </div>
                    <div class="himsBoxTitle">
                        <div class="headerText">
                            Maintainance</div>
                    </div>
                </div>
                <div class="himsBoxContent">
                    <div class="contentHolder">
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="Label2" runat="server" Text="Name" SkinID="MandatoryLabel" 
                                    meta:resourcekey="Label2Resource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:TextBox ID="txtHolidayName" OnTextChanged="txtHolidayName_OnTextChanged" MaxLength="30"
                                    AutoPostBack="True" onkeypress="return fnKeyPressForNameField(event)" onblur="return fnonTextChangeNameField(this)"
                                    TabIndex="5" runat="server" Width="150px" onmouseleave="showHideTooltip()" 
                                    onmouseenter="showHideTooltip()" meta:resourcekey="txtHolidayNameResource1"></asp:TextBox>
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="Label1" runat="server" Text="Type" SkinID="MandatoryLabel" 
                                    meta:resourcekey="Label1Resource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:DropDownList DataValueField="HolidayTypeID" onmouseleave="showHideTooltip()"
                                    onmouseenter="showHideTooltip()" DataTextField="HolidayTypeDescription" ID="drpHolidayType"
                                    runat="server" Width="150px" TabIndex="6" onblur="fnTypeTabIndexChange()" 
                                    meta:resourcekey="drpHolidayTypeResource1">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="Label4" runat="server" Text="Date" SkinID="MandatoryLabel" 
                                    meta:resourcekey="Label4Resource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <HIMS:DataPickerControl ID="txtDate" DisplayDatePicker="true" runat="server" DateTabIndex="7"
                                    CalendarTabIndex="8" Width="100px" OnTextChanged="txtDate_TextChanged" />
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="controlLabelWidth">
                                <asp:Label ID="Label5" runat="server" Text="Remark" 
                                    meta:resourcekey="Label5Resource1"></asp:Label>
                            </div>
                            <div class="fLeft pRight5">
                                <asp:TextBox ID="txtReason" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                    runat="server" Width="150px" TabIndex="9" 
                                    meta:resourcekey="txtReasonResource1"></asp:TextBox>
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                        <div class="outerBox pTop5">
                            <div class="fLeft">
                                <asp:CheckBox ID="chkObsolete" Enabled="False" Visible="False" runat="server" 
                                    TabIndex="10" meta:resourcekey="chkObsoleteResource1" />
                            </div>
                            <div class="fLeft pLeft5 pTop5">
                                <asp:Label ID="Label6" runat="server" Text="InActive" Visible="False" 
                                    meta:resourcekey="Label6Resource1"></asp:Label>
                            </div>
                        </div>
                        <div class="cBoth">
                        </div>
                    </div>
                </div>
            </div>
            <!-- Sub Container1 Box Ends -->
        </ContentTemplate>
    </asp:UpdatePanel>
  <%--  <script data-main="../../../JavaScript/rjs/encrypt/holiday-master-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
      <script data-main='<%=ResolveUrl("~/JavaScript/rjs/holiday-master")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>