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

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

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="AssetMasterUpdatePanel" runat="server">
        <ContentTemplate>
            <Common:CommonSearchUserControl ID="CommonSearchControl" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <%--                                                <div class="himsBoxContent">--%>
                                    <div class="leftUlMenu">
                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="159"
                                            Visible="true" runat="server" />
                                        <%--</div>--%>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">

                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </div>
                                    <div class="fRight mt-27">
                                        <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButton_Click" SkinID="0"
                                            class="btn btn-add fas" Text="&#xf067; Add" />
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label1" Text="Asset Tag" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="SearchCodeTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthTextBox" MaxLength="50"> 
                                                </asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label2" Text="Asset Name" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:TextBox ID="SearchAssetTextBox" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" MaxLength="100"
                                                    SkinID="CustomWidthTextBox">
                                                </asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label4" Text="Source Type" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="SearchSourceTypeDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control"
                                                    OnSelectedIndexChanged="SearchSourceTypeDropDownList_SelectedIndexChanged" AutoPostBack="true">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label5" Text="Role" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="SearchroleDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList"
                                                    CssClass="form-control" OnSelectedIndexChanged="SearchroleDropDownList_SelectedIndexChanged" AutoPostBack="true">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="Label6" Text="Incharge User" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="SearchUserDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()"
                                                    SkinID="CustomWidthDropDownList" CssClass="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="alignCenter pTop5 col-md-12 center">
                                            <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="Server" OnClick="SearchButton_Click"
                                                SkinID="0" class="btn-search btn fas" />
                                            <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Clear" OnClick="ResetButton_Click"
                                                SkinID="0" class="btn-reset btn fas" />
                                        </div>

                                    </asp:Panel>
                                    <div id="Div1" class="himssuHeader7WireBox col-md-12" runat="server">
                                        <div id="NewsDetailDiv" visible="false" runat="server">

                                            <%--<div class="himsBoxHeader card-head inner" id="NewsDiv" runat="server">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle" style="width: 100%">
                                                    <div align="right" class="fRight" style="margin-top: 0px;">
                                                    </div>
                                                </div>
                                                <div class="gridHeaderText">
                                                    <header>
                                                        <asp:Label ID="AssignRouteLabel" runat="server" Text="Asset Incharge"></asp:Label>
                                                    </header>
                                                </div>
                                            </div>--%>
                                            <div class="himsBoxContent pTop10 ">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div class="himssuHeader7WireBox col-md-12 table-responsive">
                                                            <div id="Div5" runat="server" visible="false">
                                                                <asp:GridView ID="AssetInchargeListGridView" runat="server" AutoGenerateColumns="False"
                                                                    CssClass="table table-striped table-bordered table-hover"
                                                                    SkinID="" ShowHeader="true" PagerSettings-Visible="false">
                                                                    <Columns>
                                                                        <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="LinkButton" runat="server" OnClick="LinkButton_Click" Text="Select" CommandArgument='<%#Bind("AssetId") %>'></asp:LinkButton>
                                                                            </ItemTemplate>
                                                                            <HeaderStyle Width="10%" />
                                                                            <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="AssetCode" HeaderText="Asset Tag" />
                                                                        <asp:BoundField DataField="AssetName" HeaderText="Asset Name" />
                                                                        <asp:TemplateField HeaderText="Incharge User " ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left"
                                                                            ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="SearchInchargeUserLabel" runat="server" SkinID="CustomWidthLabel" Text='<%#Eval("InchargeUser") %>'>
                                                                                </asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>

                    <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server" visible="false">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <asp:Label ID="BuildingMasterLabel" runat="server" Text="Asset Incharge"></asp:Label>
                                    </header>
                                </div>
                            </div>
                            <div class="fRight mt-27 pagination display-flex">
                                <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0"
                                    class="btn btn-back fas" Text="&#xf30a; Back" />

                            </div>
                        </div>

                        <div id="StockInwardDetailDiv1" runat="server" visible="true">
                            <div class="col-md-12 bg-lghtgrey  radiobtn">
                                <span class="col-md-4">
                                    <asp:RadioButton runat="server" ID="SingleRadioButton" Text="Single" GroupName="type" Checked="true" OnCheckedChanged="SingleRadioButton_CheckedChanged" AutoPostBack="true" />
                                </span>
                                <span class="col-md-4">
                                    <asp:RadioButton runat="server" ID="BulkImportRadioButton" Text="Bulk Import" GroupName="type" OnCheckedChanged="BulkImportRadioButton_CheckedChanged" AutoPostBack="true" />
                                </span>
                                
                            </div>
                            <div id="ExaminationAreaListingGridDiv" runat="server" class="card-body">
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="CodeLabel" Text="Asset Tag" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5 display-flex">
                                    <asp:TextBox ID="CodeTextbox" runat="server" onmouseleave="showHideTooltip()"
                                        onmouseenter="showHideTooltip()"
                                        SkinID="CustomWidthTextBox" AutoPostBack="true" OnTextChanged="CodeTextbox_TextChanged"> 
                                    </asp:TextBox>
                                    <asp:HiddenField ID="AssetIdHiddenField" runat="server" />
                                    <asp:ImageButton ID="ItemCodeSearchImageButton" ToolTip="Asset Tag Search" SkinID="FindImage"
                                        OnClick="ItemCodeSearchImageButton_Click" runat="server" meta:resourcekey="ItemCodeSearchImageButtonResource1" />
                                    <asp:HiddenField ID="AssetIdHidden" runat="server" />
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="TitleLabel" Text="Asset Name" runat="server"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:TextBox ID="AssetNameTextBox" runat="server" onmouseleave="showHideTooltip()"
                                        onmouseenter="showHideTooltip()"
                                        SkinID="CustomWidthTextBox" Enabled="false">
                                    </asp:TextBox>
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="SourceTypeLabel" Text="Source Type" runat="server"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList ID="SourceTypeDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList"
                                        CssClass="form-control"
                                        OnSelectedIndexChanged="SourceTypeDropDownList_SelectedIndexChanged" AutoPostBack="true">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="RoleLabel" Text="Role" runat="server"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList ID="RoleDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                        onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList"
                                        CssClass="form-control" OnSelectedIndexChanged="RoleDropdownlist_SelectedIndexChanged" AutoPostBack="true">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="outerBox pTop5 col-md-3">
                                <div class="controlLabelWidth">
                                    <asp:Label ID="UserLocationLable" Text="Incharge User" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                </div>
                                <div class="fLeft pRight5">
                                    <asp:DropDownList ID="UserDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                        onmouseenter="showHideTooltip()" AutoPostBack="true" OnSelectedIndexChanged="UserDropdownlist_SelectedIndexChanged"
                                        SkinID="CustomWidthDropDownList" CssClass="form-control">
                                    </asp:DropDownList>
                                </div>
                            </div>

                            <div class="alignCenter pTop5 col-md-12 center">
                                <asp:Button ID="Addbutton" Text="&#xf067; Add" runat="server" OnClick="Addbutton_Click"
                                    meta:resourcekey="AddbuttonResource1" SkinID="0" class="btn btn-add fas" />
                                <asp:Button ID="ClrButton" runat="server" Text="&#xf0e2; Clear" SkinID="0"
                                    OnClick="ClrButton_Click" meta:resourcekey="ClrButtonResource1" class="btn-reset btn fas" />
                            </div>

                            <div class="himssuHeader7WireBox col-md-12" id="GridViewMaindiv"
                                runat="server">
                                <%--<div class="himsBoxHeader card-head inner" id="GridViewPagerDiv" runat="server" visible="True">--%>
                                <%--<div class="leftdiv">
                                    </div>
                                    <div class="himsBoxTitle">
                                        <div class="gridHeaderText fLeft">
                                            <header>
                                                <asp:Label ID="GridViewLabel" Text="Available Asset Incharge List" runat="server" />
                                            </header>
                                        </div>
                                        <div class="fRight mt-27">
                                            <uc1:GridViewPager ID="AssetInchargeGridViewGridViewPager" Visible="false" runat="server"
                                                ParentGridView="AssetInchargeGridView" />
                                        </div>

                                    </div>--%>
                                <div class="himsBoxContent card-body" style="height: 100%">
                                    <div class="himssuHeader7WireBox col-md-12 table-responsive">
                                        <asp:GridView ID="AssetInchargeGridView" runat="server" AutoGenerateColumns="False"
                                            ShowHeader="true" EmptyDataText="No Records Found !!" AllowPaging="False" DataKeyNames="InchargeUserId"
                                            CssClass="table table-striped table-bordered">
                                            <Columns>
                                                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="User">
                                                    <HeaderStyle HorizontalAlign="Center" Width="25%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                    <ItemTemplate>
                                                        <asp:Label ID="UserDropdownlist" runat="server" Text='<%# Eval("InchargeUser") %>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Delete"
                                                    meta:resourcekey="TemplateFieldResource5" HeaderStyle-HorizontalAlign="Center">
                                                    <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="DeleteImageButton" SkinID="DeleteImage" ToolTip="Delete" runat="server"
                                                            OnClick="DeleteImageButton_OnClick"
                                                            meta:resourcekey="DeleteImageButtonResource1"></asp:ImageButton>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <PagerSettings Visible="False" />
                                        </asp:GridView>
                                    </div>
                                    <%--</div>--%>
                                </div>
                            </div>
                        </div>
                            <div id="BulkImportDiv" runat="server" visible="false" class="card-body">

                                <div class="controlLabelWidth pTop5" style="padding-left: 10px">
                                    <a href="javascript:;" class="fas btn btn-browser" onclick="OpenFileUpload();">
                                        <i class="fas fa-upload" aria-hidden="true"></i>Browse
                                    </a>
                                    <asp:FileUpload ID="flUpload" onChange="readURL(this);" ClientIDMode="Static" runat="server" Style="display: none;" />
                                    <asp:Label ID="UploadLabel" runat="server" Text="" Style="padding-left: 10px; font-size: medium;"></asp:Label>
                                </div>
                                <br />
                                <div style="padding-left: 10px">
                                    <asp:HyperLink ID="HyperLink1" runat="server" CssClass="pointer" NavigateUrl="~/ContentTemplates/Import/AssetInCharge.xls"><i class="fas fa-angle-double-right"></i> Asset InCharge Template</asp:HyperLink>
                                </div>
                                <div class=" alignCenter col-md-12 pTop5">
                                    <asp:Button ID="ImportButton" Text="&#xf019; Import Detail" CssClass="fas btn btn-examcommon mt7 m-b-10" runat="server" SkinID="0"
                                        OnClick="ImportButton_Click" />
                                               
                                </div>
                                 <div class="himssuHeader7WireBox col-md-12" id="Div2"
                                runat="server">
                                
                                <div class="himsBoxContent card-body" style="height: 100%">
                                    <div class="himssuHeader7WireBox col-md-12 table-responsive">
                                        <asp:GridView ID="AssetInchargeDetailGridView" runat="server" AutoGenerateColumns="False"
                                            ShowHeader="true" EmptyDataText="No Records Found !!" AllowPaging="False" DataKeyNames="InchargeUserId"
                                            CssClass="table table-striped table-bordered">
                                            <Columns>
                                                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Asset Tag">
                                                    <HeaderStyle HorizontalAlign="Center" Width="25%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                    <ItemTemplate>
                                                        <asp:Label ID="AssetCode" runat="server" Text='<%# Eval("Asset Tag") %>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Asset Name">
                                                    <HeaderStyle HorizontalAlign="Center" Width="25%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                    <ItemTemplate>
                                                        <asp:Label ID="UserDropdownlist" runat="server" Text='<%# Eval("Asset Name") %>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Incharge User">
                                                    <HeaderStyle HorizontalAlign="Center" Width="25%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                    <ItemTemplate>
                                                        <asp:Label ID="UserDropdownlist" runat="server" Text='<%# Eval("Incharge User") %>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Validation">
                                                    <HeaderStyle HorizontalAlign="Center" Width="25%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                    <ItemTemplate>
                                                        <asp:Label ID="UserDropdownlist" runat="server" Text='<%# Eval("Validationstr") %>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <PagerSettings Visible="False" />
                                        </asp:GridView>
                                    </div>
                                    <%--</div>--%>
                                </div>
                            </div>
                            </div>

                        </div>

                    </div>

                </div>
            </div>
            </div>
         
        </ContentTemplate>
    </asp:UpdatePanel>

    <%--<script data-main="../../../JavaScript/rjs/encrypt/asset-master-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/asset-incharge")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        function FormatIt(obj) {
            if (obj.value.length == 2)
                obj.value = obj.value + "/";
            if (obj.value.length == 5)
                obj.value = obj.value + "/";
        }
    </script>
</asp:Content>
