<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FinIQ_MPGParentLevelMaster.aspx.vb" Inherits="FinIQWebApp.FinIQ_MPGParentLevelMaster" MasterPageFile="~/FiniqAppMasterPage.Master" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script src="../FinIQJS/SortFilter_Grid.js"></script>
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy>

    <style>
        .btn {
            width: 90px;
        }

        .tdBtn {
            width: 90px;
        }

        .tdSpace {
            width: 10px;
        }

        .gridCol {
            width: 100px;
        }

        .gridColLarge {
            width: 180px;
        }

        /*.tdlblRecordCnt {
            width: 120px;
        }*/

        .divLoading {
            position: absolute;
            top: 48px;
            left: 280px;
        }

        .ActiveN {
            background-color: #F7F7F7;
        }

            .ActiveN a {
                color: #0368b6;
                text-decoration: none;
                font-weight: normal;
                font-size: 11px;
            }

        .aspNetDisabled a {
            color: #000000 !important;
        }
        /*Added By: Tejas V. Bodas on 20/09/2017 to make word wrap*/
        .wrapcol {
            overflow-wrap: break-word;
        }


        /*<Start> Added by Saili D/ Akanksha P on 16 July 2020 || For text wrapping*/
        .lbl1 {
            color: inherit !important; /*Commented by Pratik S for Theme changes || 29-Sept-2021*/
            word-break:break-word !important;
        }
/*<End> Added by Saili D/ Akanksha P on 16 July 2020 || For text wrapping*/

    </style>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
        <ContentTemplate>

            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="0">
                <ProgressTemplate>
                    <div class="divLoading">
                        <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading...</span>
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>           
                <%--                <tr>
                    <td class="tdSpace"></td>

                    <td colspan="4">
                    
                    </td>
                </tr>--%>

                <%-- <Start> Changes done for message displaying below buttons || 27-May-2020 || Saili Deore --%>           
                    <table>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="lblerror" Text="" CssClass="lblError"> </asp:Label>
                            </td>
                        </tr>
                    </table>                                  
                <%-- <End> Changes done for message displaying below buttons || 27-May-2020 || Saili Deore --%>
            <table>
                <tr>
                    <td class="tdBtn">
                        <asp:Button ID="btnLoad" runat="server" CssClass="btn" Text="Load"></asp:Button>
                    </td>

                    <td class="tdBtn">
                        <asp:Button ID="btnAdd" runat="server" CssClass="btn" Text="Add"></asp:Button>
                    </td>

                    <td style="width:95px;">
                        <asp:Button ID="btnSave" runat="server" CssClass="btn" Text="Save"></asp:Button>
                    </td>

                    <td class="tdBtn" style="display: none;">
                        <asp:Button ID="btnDelete" runat="server" CssClass="btn" Text="Delete"></asp:Button>
                    </td>

                    <td style="width:72px">
                        <asp:Label runat="server" ID="lblSearch" Text="Long Name : " CssClass="lbl"/>
                    </td>

                    <td style="width:108px">
                        <asp:TextBox runat="server" ID="txtSearchLongname" onkeyup="getenterload()" onkeypress="allowAlphaSpace(event)" Width="100px"/>    <%--Added by Nikhil Mali on 30-01-2020--%>
                    </td>

                    <td>
                        <asp:Label runat="server" ID="lblRecordCnt" Text="Total Record(s) : " CssClass="lbl"></asp:Label>  <%--Added by Nikhil Mali on 30-01-2020--%>
                    </td>
                </tr>

                <tr>
                    <td colspan="6">
                        <asp:UpdatePanel ID="updatePnlPlaceHolder" runat="server" UpdateMode="Always">
                            <ContentTemplate>
                                <asp:GridView ID="gvMPGParentLevelMaster" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                    BorderStyle="Solid" BorderWidth="1px" CellPadding="3"
                                    CssClass="Grid" ShowHeaderWhenEmpty="true" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" AllowPaging="true" PageSize="20" PagerStyle-Height="32px">
                                    <SelectedRowStyle CssClass="GridItemSelect" />
                                    <RowStyle CssClass="GridItem" />
                                    <HeaderStyle CssClass="GridHeader" />
                                    <FooterStyle CssClass="GridFooter" />
                                    <%--Added BY: Tejas V. Bodas on 28/08/2017 to add paging--%>
                                    <PagerSettings Mode="NumericFirstLast"
                                        FirstPageText="First"
                                        LastPageText="Last"
                                        Position="Bottom" />
                                    <PagerStyle CssClass="GridPager" />



                                    <EmptyDataTemplate>
                                        <asp:Label ID="lblqueuedatagrid" runat="server" Text="No data found." class="lbl"></asp:Label>
                                    </EmptyDataTemplate>
                                    <Columns>

                                        <asp:TemplateField Visible="false">
                                            <%-- <HeaderTemplate>
                                                        <asp:CheckBox ID="chkAll" runat="server" OnCheckedChanged="checkAllCheckChanged" AutoPostBack="true" />
                                                    </HeaderTemplate>--%>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="ChkRow" runat="server" />
                                                <%--OnCheckedChanged="chkRowCheckChanged"--%>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <%--     <asp:TemplateField ControlStyle-Width="25">
                                            <HeaderStyle Width="25px" />
                                            <ItemStyle Width="25px" />
                                            <HeaderTemplate>
                                                <asp:CheckBox ID="checkALL" runat="server" ItemStyle-Width="25px"></asp:CheckBox>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="ChkRow" runat="server" ItemStyle-Width="25px"></asp:CheckBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>--%>

                                        <asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="Edit" UpdateText=""><%--UpdateText="Save/Update" --%>
                                            <HeaderStyle Width="40px" />
                                            <ItemStyle Wrap="true" Width="40px" HorizontalAlign="center" CssClass="wrapcol"/>
                                        </asp:CommandField>


                                        <asp:TemplateField HeaderText="Id" ControlStyle-Width="60" Visible="false">
                                            <HeaderStyle CssClass="gridCol" Width="60" Wrap="true" />
                                            <ItemStyle CssClass="gridCol wrapcol" Width="60" HorizontalAlign="Center"  Wrap="true"/>
                                            <ItemTemplate>
                                                <asp:Label ID="lblId" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_Id").ToString)%>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Code" ControlStyle-Width="70">
                                            <HeaderStyle Wrap="true"  Width="70"/>
                                            <ItemStyle  HorizontalAlign="left" Wrap="true"  Width="70" CssClass="wrapcol"/>
                                            <ItemTemplate>
                                                <asp:Label ID="lblCode" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_Code").ToString)%>' />
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtCode" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_Code").ToString)%>'></asp:TextBox>
                                            </EditItemTemplate>
                                        </asp:TemplateField>

                                    <%--<Start> Added by Saili D/ Akanksha P on 16 July 2020 || For text wrapping--%>

                                        <asp:TemplateField HeaderText="Long Name" ControlStyle-Width="200">
                                            <HeaderStyle Width="200px"  Wrap="true" />
                                            <ItemStyle  HorizontalAlign="Left" Wrap="true" Width="200px" CssClass="wrapcol"/>
                                            <ItemTemplate>
                                                <asp:Label ID="lblLongName" CssClass="lbl1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_Long_Name").ToString)%>' />
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtLongName" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_Long_Name").ToString)%>'></asp:TextBox>
                                            </EditItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Primary Exec Code" ControlStyle-Width="300">
                                            <HeaderStyle Width="300px" Wrap="true" />
                                            <ItemStyle HorizontalAlign="Left" Wrap="true"  Width="280px" CssClass="wrapcol"/>
                                            <ItemTemplate>
                                                <asp:Label ID="lblPrimaryExecCode" CssClass="lbl1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_Primary_Exec_Code").ToString)%>' />
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtPrimaryExecCode" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_Primary_Exec_Code").ToString)%>'></asp:TextBox>
                                            </EditItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="View Name" ControlStyle-Width="280">
                                            <HeaderStyle  Width="300px" Wrap="true" />
                                            <ItemStyle  Width="280px" HorizontalAlign="Left" Wrap="true" CssClass="wrapcol"/>
                                            <ItemTemplate>
                                                <asp:Label ID="lblViewName" CssClass="lbl1" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_ViewName").ToString)%>' />
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:TextBox ID="txtViewName" runat="server" CssClass="txt" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_ViewName").ToString)%>'></asp:TextBox>
                                            </EditItemTemplate>
                                        </asp:TemplateField>
                                     <%--<End> Added by Saili D/ Akanksha P on 16 July 2020 || For text wrapping--%>
                                        <asp:TemplateField HeaderText="Active YN" ControlStyle-Width="40">
                                            <HeaderStyle Width="40px" HorizontalAlign="Center" Wrap="true" />
                                            <ItemStyle Width="40px" HorizontalAlign="Center" Wrap="true" CssClass="wrapcol"/>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chkActiveYN" CssClass="chk" runat="server" ItemStyle-Width="25px" AutoPostBack="true" OnCheckedChanged="chkActiveYN_CheckedChanged"></asp:CheckBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                         
                                        <asp:TemplateField HeaderText="Created At" ControlStyle-Width="180" Visible="false">
                                            <HeaderStyle CssClass="gridColLarge wrapcol" Wrap="true" />
                                            <ItemStyle CssClass="gridColLarge" HorizontalAlign="center" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblCreatedAt" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_Created_At", "{0:dd-MMM-yyyy hh:mm:ss tt}").ToString)%>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Created By" ControlStyle-Width="110" Visible="false">
                                            <HeaderStyle CssClass="gridCol" Wrap="true" />
                                            <ItemStyle CssClass="gridCol wrapcol" HorizontalAlign="Left" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblCreatedBy" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.BPLM_Created_By").ToString)%>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>
            </table>

            <asp:HiddenField ID="hdnInsertUpdate" runat="server" Value="" />

        </ContentTemplate>
    </asp:UpdatePanel>   

<script type="text/javascript">

    function getenterload() {                      //Added by Nikhil Mali on 30-01-2020
        if (event.keyCode == 13)// Enter
        {
            document.getElementById('ctl00_MainContent_btnLoad').click();
        }
    }

    function allowAlphaSpace(e) {                          // Added By Nikhil Mali on 30-1-2020
        var code = ('charCode' in e) ? e.charCode : e.keyCode;
        if (!(code == 32) &&               // space
          !(code == 45) &&                 // '-' symbol
          !(code > 64 && code < 91) &&     // upper alpha (A-Z)
          !(code > 96 && code < 123)) {    // lower alpha (a-z)
            //!(code > 47 && code < 58) && // numeric (0-9)
            e.preventDefault();
        }
    }
	
	   //<START>---Added By Shubham Podhade on 27-Jan-2019 for JS Sorting Searching Filters
        $(document).ready(function () {
            //debugger;
            SetSorting_Filter1();
        });
        //<END>---Added By Shubham Podhade on 27-Jan-2019 for JS Sorting Searching Filters
</script>

</asp:Content>

