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

<%@ Register Src="~/FinIQ_User_Controls/MultiselectDropDown/UC_MultiSelectDropDown.ascx" TagPrefix="uc1" TagName="UC_MultiSelectDropDown" %>




<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <asp:ScriptManagerProxy ID="ScriptManagerProxy" runat="server">
    </asp:ScriptManagerProxy>

    <style>
        .Grid {
            table-layout: fixed;
        }

            .Grid th, .Grid td {
                word-wrap: break-word;
            }

        .tableMargin {
            margin-top: 20px;
        }

        .filterSpacing1 {
            padding-left: 10px;
        }

        .filterSpacing2 {
            padding-left: 20px;
        }
           .PopupCcy {
            background-color: #FFFFFF;
            border-width: 1px;
            border-style: solid;
            border-color: #ccc;
            width: 260px;
            position: absolute;
            top: inherit;
            left: inherit;
        }
            .btnWidth {
            width: 70px;
        }

            .txtSecret{

            }

    </style>


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

            <table>

                <tr>
                    <td>
                        <asp:Label ID="lblError" runat="server" CssClass="lblError"></asp:Label>
                        <asp:Label ID="lblInfo" runat="server" CssClass="lblInfo"></asp:Label>
                        <asp:Label ID="lblSuccess" runat="server" CssClass="lblSuccess"></asp:Label>
                    </td>
                </tr>

            </table>
            <table class="tableMargin">
                <tr>
                    <td>
                        <asp:Label ID="lblBuySideCode" runat="server" CssClass="lbl" Text="Buyer"></asp:Label>
                    </td>
                    <td class="filterSpacing1">
                        <asp:DropDownList ID="ddlBuySideCode" runat="server" CssClass="ddl" Width="100px" AutoPostBack="true"></asp:DropDownList>
                    </td>    
                    <td class="filterSpacing2">
                        <asp:Label ID="lblAssetClass" runat="server" CssClass="lbl" Text="Asset"></asp:Label>
                    </td>
                    <td class="filterSpacing1">
                        <asp:DropDownList ID="ddlAssetClass" runat="server" CssClass="ddl" Width="100px"></asp:DropDownList>
                    </td>
                    <td class="filterSpacing2">
                        <asp:Button ID="btnLoad" runat="server" CssClass="btn" Text="Load" Width="100px" />
                    </td>
                          <td class="filterSpacing1">
                        <asp:Button ID="btnClear" runat="server" CssClass="btn" Text="Cancel" Width="100px" />
                    </td>
                    <td class="filterSpacing1">
                        <asp:Button ID="btnExcel" runat="server" CssClass="btnExcel" Tootltip="Export To Excel" />
                    </td>
                </tr>
            </table>

         
            <table style="margin-top:20px">
                <tr>
                    <td>
                        <asp:GridView ID="grdFixMapDetails" runat="server" AllowPaging="True" AutoGenerateColumns="False" PageSize="10" CssClass="Grid"
                            AllowSorting="true" ShowHeaderWhenEmpty="true">
                            <RowStyle CssClass="GridItem" />
                            <HeaderStyle CssClass="GridHeader" />
                            <FooterStyle CssClass="GridFooter" />
                            <PagerStyle CssClass="GridPager" />

                            <Columns>
                                <asp:CommandField ButtonType="Link" ShowEditButton="true" CancelText="Cancel" UpdateText="Update"
                                    EditText="Edit" ItemStyle-CssClass="width_16_char" HeaderStyle-CssClass="width_16_char" ItemStyle-HorizontalAlign="Center"
                                    HeaderStyle-HorizontalAlign="Center"></asp:CommandField>
                                <%--<0>--%>
                                <asp:TemplateField HeaderText="ID" ItemStyle-HorizontalAlign="Left" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblID" runat="server" Width="50px" Text='<%# Eval("ID")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <%--<1>--%>
                                <asp:TemplateField HeaderText="Buyer" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblBuyer" runat="server" Width="50px" Text='<%# Eval("BuySideCode")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:LinkButton ID="lnkBuyer" runat="server" Text='Select Buyer' Visible="true" CommandArgument='<%#Eval("BuySideCode")%>' CommandName="SelectBuyer" Width="80px"></asp:LinkButton>
                                 
                                    <asp:Label ID="lblEditBuyer" runat="server" Width="50px" Visible="false"  Text='<%# Eval("BuySideCode")%>'></asp:Label>

                                        </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<2>--%>

                                <asp:TemplateField HeaderText="Buyer ID" ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="lblBuyerID" runat="server" Width="70px" Text='<%# Eval("BuySideEntityID")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtBuyerID" runat="server" Width="70px" Enabled="false"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<3>--%>

                                <asp:TemplateField HeaderText="Issuer" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblIssuer" runat="server" Width="60px" Text='<%# Eval("SellSideCode")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:LinkButton ID="lnkIssuer" runat="server" Text='Select Issuer' Visible="true" CommandArgument='<%#Eval("SellSideCode")%>' CommandName="SelectIssuer" Width="80px"></asp:LinkButton>
                                   
                                    <asp:Label ID="lblEditIssuer" runat="server" Width="50px" Visible="false"  Text='<%# Eval("SellSideCode")%>'></asp:Label>

                                        </EditItemTemplate>
                                </asp:TemplateField>

                                <%--<4>--%>

                                <asp:TemplateField HeaderText="Issuer ID" ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="lblIssuerID" runat="server" Width="50px" Text='<%# Eval("PPID")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtIssuerID" runat="server" Width="50px" Enabled="false"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<5>--%>

                                <asp:TemplateField HeaderText="Asset" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblAsset" runat="server" Width="50px" Text='<%# Eval("AssetClass")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlAsset" runat="server" Width="60px"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<6>--%>

                                <asp:TemplateField HeaderText="SenderCompID" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblSenderComPID" runat="server" Width="150px" Text='<%# Eval("SenderComPID")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtSenderComPID" runat="server" Width="150px"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<7>--%>

                                <asp:TemplateField HeaderText="TargetCompID" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTargetComPID" runat="server" Width="150px" Text='<%# Eval("TargetComPID")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtTargetComPID" runat="server" Width="150px"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<8>--%>

                                <asp:TemplateField HeaderText="Config File Path" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblConfigFilePath" runat="server" Width="300px" Text='<%# Eval("ConfigFilePath")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtConfigFilePath" runat="server" Width="300px"></asp:TextBox>
                                        <%--<asp:RegularExpressionValidator ID="RegValidation" runat="server" ValidationExpression="^[a-zA-Z]:(\\\w+)*([\\]|[.](txt|config))?$" ControlToValidate="txtConfigFilePath" ></asp:RegularExpressionValidator>--%>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<9>--%>

                                <asp:TemplateField HeaderText="Session ID" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblSessionID" runat="server" Width="150px" Text='<%# Eval("SessionID")%>'></asp:Label>
                                    </ItemTemplate>

                                </asp:TemplateField>
                                <%--<10>--%>

                                <asp:TemplateField HeaderText="Session Status" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblSessionStatus" runat="server" Width="50px" Text='<%# Eval("SessionStatus")%>'></asp:Label>
                                    </ItemTemplate>

                                </asp:TemplateField>
                                <%--<11>--%>

                                <asp:TemplateField HeaderText="OnBehalfCompID" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblOnBehalfCompID" runat="server" Width="50px" Text='<%# Eval("OnBehalfCompID")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtOnBehalfCompID" runat="server" Width="100px"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<12>--%>

                                <asp:TemplateField HeaderText="DeliverToCompID " ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblDeliverToCompID" runat="server" Width="50px" Text='<%# Eval("DeliverToCompID")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtDeliverToCompID" runat="server" Width="100px"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<13>--%>

                                <asp:TemplateField HeaderText="Event" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblEvent" runat="server" Width="70px" Text='<%# Eval("PriceOrder")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlEvent" runat="server" Width="70px"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<14>--%>

                                <asp:TemplateField HeaderText="Product" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblProduct" runat="server" Width="200px" Text='<%# Eval("PayOffCode")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:LinkButton ID="lnkProduct" runat="server" Text='Select Product' Visible="true" CommandArgument='<%#Eval("PayOffCode")%>' CommandName="SelectProduct" Width="80px"></asp:LinkButton>
                                    
                                    <asp:Label ID="lblEditProduct" runat="server" Width="50px" Visible="false" Text='<%# Eval("PayOffCode")%>'></asp:Label>

                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <%--<15>--%>

                                <asp:TemplateField HeaderText="Integration Mode" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Label ID="lblIntegrationMode" runat="server" Width="50px" Text='<%# Eval("FIXIntegrationMode")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlIntegrationMode" runat="server" Width="50px"></asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<16>--%>

                                <asp:TemplateField HeaderText="Keystore Password" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblKeystorePassword" runat="server" Width="100px" Text='<%# Eval("JKSSecret")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtKeystorePassword" cssclass="txtSecret" onkeyup="return ConvertPWD(event, this);" runat="server" Width="100px" ></asp:TextBox>
                                        <asp:HiddenField id="hdnKeystorePassword" runat="server" Value="" />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<17>--%>
                               
                                        <asp:TemplateField HeaderText="TrustStore Password" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTrueStorePassword" runat="server" Width="100px" Text='<%# Eval("TrueStoreSecret")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtTrueStorePassword" cssclass="txtSecret" runat="server" Width="100px" onkeyup="return ConvertPWD(event, this);"></asp:TextBox>
                                          <asp:HiddenField id="hdnTrueStorePassword" runat="server" Value="" />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<19>--%>



                                <asp:TemplateField HeaderText="Password Type" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblPasswordType" runat="server" Width="120px" Text='<%# Eval("PasswordType")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlPasswordType" runat="server" Width="120px">
                                        
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<18>--%>

                                  <asp:TemplateField HeaderText="Password" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblPassword" runat="server" Width="100px" Text='<%# Eval("LogonSecret")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtPassword" runat="server" cssclass="txtSecret"  Width="100px" onkeyup="return ConvertPWD(event, this);"></asp:TextBox>
                                        <asp:HiddenField id="hdnPassword" runat="server" Value="" />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<20>--%>



                      
                                <asp:TemplateField HeaderText="User Name" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblUserName" runat="server" Width="100px" Text='<%# Eval("UserName")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtUserName" runat="server" cssclass="txtSecret"  Width="100px" onkeyup="return ConvertPWD(event, this);"></asp:TextBox>
                                         <asp:HiddenField id="hdnUserName" runat="server" Value="" />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<21>--%>

                                <asp:TemplateField HeaderText="Active Y/N" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Label ID="lblActiveYN" runat="server" Width="30px" Text='<%# Eval("ActiveYN")%>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlActiveYN" runat="server" Width="30px" Text='<%# Eval("ActiveYN")%>'>
                                            <asp:ListItem>Y</asp:ListItem>
                                            <asp:ListItem>N</asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--<22>--%>

                                <asp:TemplateField HeaderText="Created At" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCreatedAt" runat="server" Width="200px" Text='<%# Eval("CreatedAt")%>'></asp:Label>
                                    </ItemTemplate>

                                </asp:TemplateField>
                                <%--<23>--%>

                                <asp:TemplateField HeaderText="Created By" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCreatedBy" runat="server" Width="100px" Text='<%# Eval("CreatedBy")%>'></asp:Label>
                                    </ItemTemplate>

                                </asp:TemplateField>
                                <%--<24>--%>

                                <asp:TemplateField HeaderText="Updated At" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Label ID="lblUpdatedAt" runat="server" Width="200px" Text='<%# Eval("Updated_At")%>'></asp:Label>
                                    </ItemTemplate>

                                </asp:TemplateField>
                                <%--<25>--%>

                                <asp:TemplateField HeaderText="Updated By" ItemStyle-HorizontalAlign="Left">
                                    <ItemTemplate>
                                        <asp:Label ID="lblUpdatedBy" runat="server" Width="100px" Text='<%# Eval("Updated_By")%>'></asp:Label>
                                    </ItemTemplate>

                                </asp:TemplateField>
                                <%--<26>--%>

                                <asp:TemplateField HeaderText="Session Updated At" ItemStyle-HorizontalAlign="Center" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblSessionUpdatedAt" runat="server" Width="100px" Text='<%# Eval("SessionUpdatedAt")%>'></asp:Label>
                                    </ItemTemplate>

                                </asp:TemplateField>
                                <%--<27>--%>
                                <asp:TemplateField HeaderText="SV ID" ItemStyle-HorizontalAlign="Center" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblSVID" runat="server" Width="100px" Text='<%# Eval("SV_ID")%>'></asp:Label>
                                    </ItemTemplate>

                                </asp:TemplateField>
                                <%--<28>--%>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>

            <asp:UpdatePanel ID="UPFixMappingDetails" runat="server" UpdateMode="Conditional">
                <ContentTemplate>

                    <asp:Panel ID="pnlFixMappingDetails" runat="server" Visible="false" CssClass="PopupCcy SpreadEngine">
                        <table>
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="txtSearchBuyer" runat="server" Width="80px" ondragstart="return false;" ondrop="return false;" onpaste="return false" oncut="return false" oncopy="return false" onkeypress="return AllowOnlyAlphabet();"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:Button ID="btnSearchBuyer" runat="server" CssClass="btn btnWidth" Text="Search" />
                                            </td>
                                            <td id="tdBtnSubmitBuyer" runat="server">
                                                <asp:Button ID="btnSubmitBuyer" runat="server" CssClass="btn btnWidth" Text="Submit" />
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="btnCrossBuyer" runat="server" CssClass="btn btnCross" Text="X" ForeColor="#000" Width="30px" Height="10px"></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>

                            </tr>
                            <tr>
                                <td>
                                    <table style="width: 100%">
                                        <tr>

                                            <td>
                                                <asp:Panel ID="Panel1" runat="server" ScrollBars="Vertical" Height="200px">
                                                    <asp:GridView ID="grdBuyer" runat="server" CssClass="GridItem" AutoGenerateColumns="false"
                                                        AllowPaging="false" ShowHeaderWhenEmpty="true" EmptyDataText="No data found" PagerSettings-Mode="Numeric"
                                                        AllowSorting="True" ShowFooter="false">
                                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                                        <AlternatingRowStyle CssClass="GridItem" />
                                                        <RowStyle CssClass="GridItem" Wrap="true" />
                                                        <HeaderStyle CssClass="GridHeader " Font-Bold="true" Wrap="true" />
                                                        <FooterStyle CssClass="GridFooter" />
                                                        <PagerStyle CssClass="GridPager" />
                                                        <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" Position="Bottom" />
                                                        <Columns>

                                                            <asp:TemplateField HeaderText="">
                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <HeaderTemplate>
                                                                    <asp:CheckBox ID="chkSelectAllBuyer" runat="server" AutoPostBack="True" BorderStyle="None" OnCheckedChanged="chkSelectAllBuyer_CheckedChanged"  />
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:CheckBox runat="server" ID="chkSelectSingleBuyer" AutoPostBack="true" Enabled="true" OnCheckedChanged="ChkSingleBuyer_CheckedChanged" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Buyer ID" ItemStyle-Wrap="true" Visible="False">
                                                                <HeaderStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblBuyerID" runat="server" Text='<%# Eval("Entity_ID")%>' Visible="true" ToolTip='<%# Eval("Entity_ID")%>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Buyer Code" ItemStyle-Wrap="true">
                                                                <HeaderStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblBuyerCode" runat="server" Text='<%# Eval("Entity_Code")%>' Visible="true" ToolTip='<%# Eval("Entity_Code")%>'></asp:Label>

                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </asp:Panel>

                                            </td>

                                        </tr>
                                    </table>
                                </td>

                            </tr>
                        </table>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>

            <asp:UpdatePanel ID="UPIssuer" runat="server" UpdateMode="Conditional">
                <ContentTemplate>

                    <asp:Panel ID="pnlIssuer" runat="server" Visible="false" CssClass="PopupCcy  SpreadEngine ">
                        <table>
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="txtSearchIssuer" runat="server" Width="80px" ondragstart="return false;" ondrop="return false;" onpaste="return false" oncut="return false" oncopy="return false" onkeypress="return AllowOnlyAlphabet();"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:Button ID="btnSearchIssuer" runat="server" CssClass="btn btnWidth" Text="Search" />
                                            </td>
                                            <td id="tdBtnSubmitIssuer" runat="server">
                                                <asp:Button ID="btnSubmitIssuer" runat="server" CssClass="btn btnWidth" Text="Submit" />
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="btnCrossIssuer" runat="server" CssClass="btn btnCross" Text="X" Width="14px" Height="14px" ></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>

                            </tr>
                            <tr>
                                <td>
                                    <table style="width: 100%">
                                        <tr>

                                            <td>
                                                <asp:Panel ID="Panel3" runat="server" ScrollBars="Vertical" Height="200px">
                                                    <asp:GridView ID="grdIssuer" runat="server" CssClass="GridItem" AutoGenerateColumns="false"
                                                        AllowPaging="false" ShowHeaderWhenEmpty="true" EmptyDataText="No data found" PagerSettings-Mode="Numeric"
                                                        AllowSorting="True" ShowFooter="false">
                                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                                        <AlternatingRowStyle CssClass="GridItem" />
                                                        <RowStyle CssClass="GridItem" Wrap="true" />
                                                        <HeaderStyle CssClass="GridHeader " Font-Bold="true" Wrap="true" />
                                                        <FooterStyle CssClass="GridFooter" />
                                                        <PagerStyle CssClass="GridPager" />
                                                        <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" Position="Bottom" />
                                                        <Columns>

                                                            <asp:TemplateField HeaderText="">
                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <HeaderTemplate>
                                                                    <asp:CheckBox ID="chkSelectAllIssuer" runat="server" AutoPostBack="True" BorderStyle="None" />
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:CheckBox runat="server" ID="chkSelectSingleIssuer" AutoPostBack="true" Enabled="true" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Issuer ID" ItemStyle-Wrap="true" Visible="False">
                                                                <HeaderStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblIssuerID" runat="server" Text='<%# Eval("PP_ID")%>' Visible="true" ToolTip='<%# Eval("PP_ID")%>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Issuer Code" ItemStyle-Wrap="true">
                                                                <HeaderStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblIssuerCode" runat="server" Text='<%# Eval("PP_Code")%>' Visible="true" ToolTip='<%# Eval("PP_Code")%>'></asp:Label>

                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </asp:Panel>

                                            </td>

                                        </tr>
                                    </table>
                                </td>

                            </tr>
                        </table>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>

            <asp:UpdatePanel ID="UPProduct" runat="server" UpdateMode="Conditional">
                <ContentTemplate>

                    <asp:Panel ID="pnlProduct" runat="server" Visible="false" CssClass="PopupCcy  SpreadEngine ">
                        <table>
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="txtSearchProduct" runat="server" Width="80px" ondragstart="return false;" ondrop="return false;" onpaste="return false" oncut="return false" oncopy="return false" onkeypress="return AllowOnlyAlphabet();"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:Button ID="btnSearchProduct" runat="server" CssClass="btn btnWidth" Text="Search" />
                                            </td>
                                            <td id="tdBtnSubmitProduct" runat="server">
                                                <asp:Button ID="btnSubmitProduct" runat="server" CssClass="btn btnWidth" Text="Submit" />
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="btnCrossProduct" runat="server" CssClass="btn btnCross" Text="X" Width="14px" Height="14px"></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>

                            </tr>
                            <tr>
                                <td>
                                    <table style="width: 100%">
                                        <tr>

                                            <td>
                                                <asp:Panel ID="Panel5" runat="server" ScrollBars="Vertical" Height="200px">
                                                    <asp:GridView ID="grdProduct" runat="server" CssClass="GridItem" AutoGenerateColumns="false"
                                                        AllowPaging="false" ShowHeaderWhenEmpty="true" EmptyDataText="No data found" PagerSettings-Mode="Numeric"
                                                        AllowSorting="True" ShowFooter="false">
                                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                                        <AlternatingRowStyle CssClass="GridItem" />
                                                        <RowStyle CssClass="GridItem" Wrap="true" />
                                                        <HeaderStyle CssClass="GridHeader " Font-Bold="true" Wrap="true" />
                                                        <FooterStyle CssClass="GridFooter" />
                                                        <PagerStyle CssClass="GridPager" />
                                                        <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" Position="Bottom" />
                                                        <Columns>

                                                            <asp:TemplateField HeaderText="">
                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <HeaderTemplate>
                                                                    <asp:CheckBox ID="chkSelectAllProduct" runat="server" AutoPostBack="True" BorderStyle="None" />
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:CheckBox runat="server" ID="chkSelectSingleProduct" AutoPostBack="true" Enabled="true" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Product" ItemStyle-Wrap="true">
                                                                <HeaderStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemStyle Width="180px" Wrap="true" CssClass="WrapNoSpace" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblProduct" runat="server" Text='<%# Eval("Data_Value")%>' Visible="true" ToolTip='<%# Eval("Data_Value")%>'></asp:Label>

                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </asp:Panel>

                                            </td>

                                        </tr>
                                    </table>
                                </td>

                            </tr>
                        </table>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
        </ContentTemplate>
    </asp:UpdatePanel>


    <script type="text/javascript">

        //Shekhar L / Manasi A : UBPCLI-48 : To handle password mode logic while updating fix mapping details
        function ConvertPWD(event, txt) {
        // debugger;
           var star = '';
            hdnpwd = $(txt).parent().find('input[type="hidden"]');
            var pwd = $(hdnpwd).val();
            if (event.keyCode == 8 || event.keyCode == 46 ) {
                $(txt).val('');
                $(hdnpwd).val(''); 
                hdnpwd = $(txt).parent().find('input[type="hidden"]');
                pwd = $(hdnpwd).val();
                return true;
            }
            // ManasiA || 30-Aug-2021 || UBPINT-1473 : Added special characters required for password encryption 
            // ManasiA || 29-Sep-2021 || UBPCLI-228 : Modified condition to allow numlock keypad 0 character
            // event.keyCode >= 97
            if ((event.keyCode >= 96 && event.keyCode <= 122) || (event.keyCode >= 64 && event.keyCode <= 90) || event.keyCode == 33 || (event.keyCode >= 186 && event.keyCode <= 192)
                || (event.keyCode >= 35 && event.keyCode <= 38) || event.keyCode == 94 || event.keyCode == 42 || (event.keyCode >= 47 && event.keyCode <= 57) || (event.keyCode >= 219 && event.keyCode <= 222) ) {
                 
                    pwd = pwd + event.key; 
                $(hdnpwd).val(pwd); 
            } 
             for (i = 0; i < pwd.length; i++) {
                        star = star + '*'; 
                    }
            $(txt).val(star);
            return true;
        }
    </script>
</asp:Content>
