<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_AssetManagement_AssetDataUpdate, App_Web_40cvv4wy" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="DPC" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteTextBoxForGridView.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <style type="text/css">
        input:disabled + input[type=image], input:read-only + a {
            pointer-events: visible;
            cursor: pointer !important;
        }
    </style>
    <asp:UpdatePanel ID="AssetDataUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl1" ScreenGroupId="159" Visible="true" runat="server" />
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box">
                        <div class="contentHolder">
                            <div class="himssuHeader1WireBox">
                                <div class="himsBoxHeader card-head">

                                    <div class="himsBoxTitle">
                                        <div class="headerText">
                                            <header>
                                                <i class="fas fa-database"></i>
                                                <asp:Label ID="Label1" runat="server" Text="Bulk Data Update "></asp:Label>
                                            </header>
                                        </div>
                                    </div>
                                </div>
                                <div class="himsBoxContent card-body">
                                    <asp:Panel ID="DetailPanel" runat="Server">
                                        <div class="contentHolder">
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SearchCategoryLabel" Text="Category" SkinID="MandatoryLabel" runat="server"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="SearchCategoryDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        SkinID="CustomWidthDropDownList" CssClass="form-control" AutoPostBack="true" OnSelectedIndexChanged="SearchCategoryDropDownList_SelectedIndexChanged"
                                                        onmouseenter="showHideTooltip()">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SearchSubCategoryLabel" Text="Sub Category" SkinID="MandatoryLabel" runat="server"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="SearchSubCategoryDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        SkinID="CustomWidthDropDownList" CssClass="form-control" onmouseenter="showHideTooltip()">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="DepartmentLabel" runat="server" Text="Department"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList runat="server" ID="DepartmentDropDownList" SkinID="CustomWidthDropDownList"
                                                        CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SearchClassLabel" Text="Location" runat="server"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="LocationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        SkinID="CustomWidthDropDownList" CssClass="form-control"
                                                        onmouseenter="showHideTooltip()">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>

                                            <div class="outerBox pTop15 p-l-10 col-md-3">
                                                <asp:CheckBox ID="IsBlankCheckBox" runat="server" Text="Empty Data" class="pLeft5" />
                                                <%-- <asp:Label ID="IsEmptyLabel" runat="server" Text="Empty Data"></asp:Label>--%>
                                            </div>
                                            <div class="cBoth">
                                            </div>

                                            <div class="text-center col-md-12 pTop5">
                                                <asp:Button ID="SearchButton" Text="&#xf002;  Search" runat="Server" OnClick="SearchButton_Click"
                                                    SkinID="0" CssClass="btn btn-search fas" />

                                                <asp:Button ID="ResetButton" Text="&#xf0e2; Reset" runat="Server" OnClick="ResetButton_Click" SkinID="0" CssClass="fas btn btn-reset" />

                                                <%--   <asp:Button ID="GetBirthDateInWordButton" Text="Get Birth Date In Word" SkinID="0" runat="Server"  Visible="false" />--%>

                                                <asp:Button ID="ExportButton" runat="server" Text="&#xf093; Export" OnClick="ExportButton_Click" CssClass="fas btn btn-examcommon" SkinID="0" />
                                                <a href="javascript:;" onclick="OpenFileUpload();" class="btn btn-browser">
                                                    <i class="fas fa-upload"></i>Browse</a>
                                                <asp:FileUpload ID="flUpload" runat="server" onChange="readURL(this);" ClientIDMode="Static" Style="display: none;" />

                                                <asp:Button ID="ImportFromExcelButton" runat="server" Text="&#xf019; Import From Excel" SkinID="0"
                                                    CssClass="fas btn btn-examcommon" OnClick="ImportFromExcelButton_Click" />
                                            </div>
                                            <asp:Label ID="Label2" runat="server" Text="" Style="padding-left: 10px; font-size: medium;"></asp:Label>



                                            <div id="Div1" class="himssuHeader6WireBox col-md-12 pTop15" runat="server">
                                                <div id="GridViewPagerDiv" runat="server">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle">
                                                        <div class="headerText fLeft">
                                                            <asp:Label ID="GridViewLabel" Text="" runat="server" />
                                                        </div>
                                                    </div>

                                                    <div class="fRight display-flex">
                                                        <asp:TextBox ID="ApplyAllTextBox" runat="server" ClientIDMode="Static" MaxLength="100"
                                                            SkinID="CustomWidthTextBox" Width="100px"></asp:TextBox>
                                                        &nbsp;&nbsp;&nbsp;  
                                                        <asp:Button ID="ApplyAllButton" runat="server" OnClick="ApplyAllButton_Click"
                                                            Text="&#xf058; Apply All" SkinID="0" CssClass="btn btn-apply fas" />
                                                    </div>
                                                </div>
                                                <div class="col-md-12 pTop15">
                                                    <div class="himsBoxContent table-responsive ">
                                                        <asp:GridView runat="server" ID="AssetDataUpdateGridView" AutoGenerateColumns="False"
                                                            EmptyDataText="No records Found!!!" DataKeyNames="Id,SubCategory,Title" AllowPaging="False"
                                                            ShowHeader="True" OnRowDataBound="AssetDataUpdateGridView_RowDataBound" CssClass="table table-striped table-bordered">
                                                            <PagerSettings Visible="False" />
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="4%" Visible="false"
                                                                    ItemStyle-Wrap="true">
                                                                    <HeaderTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="HeaderSelectCheckBox" runat="server" Enabled="true"
                                                                                Visible="true" />
                                                                            <span></span>
                                                                        </label>
                                                                    </HeaderTemplate>
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="SelectCheckBox" runat="server" />
                                                                            <span></span>
                                                                        </label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Asset Code" meta:resourcekey="AssetCodeTemplateFieldResource1">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="AssetCodeLabel" runat="server" Text='<%#((Sapphire.Ohu.BusinessEntity.Business.FinancialManagementBE.AssetMaster)Container.DataItem).AssetCode %>' CssClass="boxEllips"></asp:Label>
                                                                    </ItemTemplate>
                                                                    <HeaderStyle HorizontalAlign="Left" />
                                                                    <ItemStyle HorizontalAlign="Left" Width="10%" />
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Title" meta:resourcekey="TemplateFieldResource1">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="TitleLabel" runat="server" Text='<%#((Sapphire.Ohu.BusinessEntity.Business.FinancialManagementBE.AssetMaster)Container.DataItem).Title %>' CssClass="boxEllips"></asp:Label>
                                                                    </ItemTemplate>
                                                                    <HeaderStyle HorizontalAlign="Left" />
                                                                    <ItemStyle HorizontalAlign="Left" Width="10%" />
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Category" meta:resourcekey="TemplateFieldResource2">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="CategoryLabel" runat="server" Text='<%# ((Sapphire.Ohu.BusinessEntity.Business.FinancialManagementBE.AssetMaster)Container.DataItem).CategoryTitle %>' CssClass="boxEllips"></asp:Label>
                                                                    </ItemTemplate>
                                                                    <HeaderStyle HorizontalAlign="Left" />
                                                                    <ItemStyle HorizontalAlign="Left" Width="30%" />
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Data" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left"
                                                                    ItemStyle-Wrap="true">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="SubCategoryDropDownList" runat="server" Visible="false" SkinID="CustomWidthDropDownList"
                                                                            onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" Width="160px">
                                                                        </asp:DropDownList>
                                                                        <asp:TextBox ID="SubCategoryTextBox" runat="server" SkinID="CustomWidthTextBox" Visible="false">
                                                                        </asp:TextBox>
                                                                        <asp:Panel ID="CheckBoxPanel" runat="server" Visible="false">
                                                                            <label class="rt-chkbox rt-chkbox-outline">
                                                                                <asp:CheckBox ID="SubCategoryCheckBox" runat="server" Visible="false" />
                                                                                <span></span>
                                                                            </label>
                                                                        </asp:Panel>
                                                                        <DPC:DatePickerControl ID="SubCategoryDatePicker" runat="server" DisplayDatePicker="true"
                                                                            Visible="false" />
                                                                        <acc:AutoCompleteControl ID="SubCategoryAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                                                            MaxLength="200" DisplayLoadingStatus="true" SkinID="CustomWidthTextBox"
                                                                            Width="154px" ValidateOnTextChanged="false" Visible="false" />
                                                                    </ItemTemplate>
                                                                    <HeaderStyle HorizontalAlign="Left" />
                                                                    <ItemStyle HorizontalAlign="Left" Width="40%" />
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerSettings Visible="False" />
                                                        </asp:GridView>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>

            </div>
            </div>
          
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/student-data-update" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/Asset-data-update")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
    </script>
</asp:Content>
