<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="SSI.aspx.vb" Inherits="FinIQWebApp.SSI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register Src="~/FinIQ_User_Controls/DateControl.ascx" TagPrefix="uc1" TagName="DateControl" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>SSI Setup</title>

    <%-- Javed--on 9-Nov-2016--%>
	<%--Change done by Nitin N on 22-Nov-2021 : black theme compatibility changes--%>

    <link href="../../FinIQJS/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="../../FinIQJS/external/jquery/jquery.js" type="text/javascript"></script>
    <script src="../../FinIQJS/jquery-ui.js" type="text/javascript"></script>     
    <link  href="../../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <script src="../../FinIQJS/finiqcommon.js" type="text/javascript"></script>
<%--    <script src="../../FinIQJS/conformationBox.js"></script>
    <link href="../../FinIQJS/jquery-ui.min.css" rel="stylesheet" />
    <script src="../../FinIQJS/FinIQCommon.js"></script>
    <script src="../../FinIQJS/external/jquery/jquery.min.js"></script>
    <link href="../../FinIQJS/jquery-ui.min.css" rel="stylesheet" />
    <script src="../../FinIQJS/jquery-ui.min.js"></script>
    <script src="../../FinIQJS/popup.js"></script>
    <script src="../../FinIQJS/popup_detail.js"></script>--%>


    <script language="javascript" type="text/javascript" src='<%=ResolveClientUrl("~/FinIQJS/CalendarPopup.js")%>'></script>
<%--    <link href="../../App_Themes/Style1.css" rel="stylesheet" type="text/css" />--%>
<%--/Change done by Nitin N on 22-Nov-2021 : black theme compatibility changes--%>
    <script type="text/javascript">

      

        function displayProtfolioDetails(RowP) {
        
            document.getElementById("overlayDiv").style.display = "block";

            document.getElementById('<%=btnLoadProftfolio.ClientID%>').click()

        }

       

        function isNumberKey(evt) {
            // 
            var charCode = (evt.which) ? evt.which : evt.keyCode;
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
        function isAlphaNumeric(evt) {
            var keycode = (evt.which) ? evt.which : evt.keyCode;
            if ((keycode >= 65 && keycode <= 90) || (keycode >= 97 && keycode <= 122) || (keycode >= 48 && keycode <= 57))
                return true;
            else
                return false;
        }

    </script>
    <script type="text/javascript">

        //var request = Sys.WebForms.PageRequestManager.getInstance();
        function pageLoad_SSI(sender, args) {


            $("input").focusout(function () {
                //  alert("Keyup detected!");
            });

            $('input[type = "text"]').each(function () {
                w = $(this).width();

                $(this).width(Number(Number(w) - 3) + "px");
            });

            $('select').each(function () {
                var onChange = $(this).attr('onchange');
                if (onChange == undefined) {
                    $(this)
                        .selectmenu({
                            style: 'popup',
                            width: $(this).width(),
                            maxHeight: 150
                        })
                    //.addClass("overflow");
                }

                else {
                    $(this)
                        .selectmenu({
                            style: 'popup',
                            width: $(this).width(),
                            maxHeight: 150,
                            change: function () { eval(onChange); }
                        })
                    //.addClass("overflow");
                }

            });


            /* */
            Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(EndRequestHandler);
            Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler)
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
            Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(initializeRequestHandler)
            Sys.WebForms.PageRequestManager.getInstance().remove_initializeRequest(initializeRequestHandler)
        }

        function initializeRequestHandler(sender, args) {
            // request.get_isInAsyncPostBack() && args.set_cancel(false);
        }

        function beginRequestHandler(sender, args) {

            document.onkeypress = function (event) {
                e = event || window.event;
                (e.preventDefault) ? e.preventDefault() : e.returnValue = false;
                if (e.stopPropagation) {
                    e.stopPropagation();
                } else {
                    e.returnValue = false;
                }
                // event.stopImmediatePropagation();
                // request.get_isInAsyncPostBack() && args.set_cancel(false);
                return false;

            }
            $(window).keypress = function (event) {
                e = event || window.event;
                (e.preventDefault) ? e.preventDefault() : e.returnValue = false;
                if (e.stopPropagation) {
                    e.stopPropagation();
                } else {
                    e.returnValue = false;
                }
                // event.stopImmediatePropagation();
                //  request.get_isInAsyncPostBack() && args.set_cancel(false);
                return false;

            }

        }


        function EndRequestHandler(sender, args) {

            document.onkeypress = function (event, args) {

                return true;
            }
            $(window).keypress = function (event, args) {

                return true;
            }
            //  request.get_isInAsyncPostBack() && args.set_cancel(true);
        }

    </script>
    <style>
         .CloseButton {
            float: right;
        }
          
        .Visible {
            display: block;
        }

        .PopUpPosition {
            position: absolute;
            top: 39%;
            left: 42%;
            margin-top: -50px;
            margin-left: -50px;
            width: 100px;
            height: 100px;
        }
           .btnDetailsDiv {
            background-color: #FFF;
            height: auto;
        }
        .invisible {
            display: none;
        }

          .ProtfolioPopup {
            z-index: 10000000 !important;
        }

           .groupBoxProtfolio {
            position: absolute;
            /*left: 580px;
            top: 250px;*/
            height: auto;
            border: solid 1px #ccc;
            border-radius: 12px;
        }

             .beutifyPopUp {
            border-radius: 8px;
            box-shadow: 0 0 10px #000000;
        }
        .btnProtfolio {
            width: 70px;
        }

        .FilterPad {
            padding: 5px 5px 5px 10px;
        }

        .FilterPadNew {
            padding: 5px 10px 5px 20px;
        }

        .ddlWidth {
            width: 150px;
        }

        .HeaderOrder {
            font: normal 13px/28px verdana !important;
            color: #000000 !important;
            height: 28px;
            /*background-color: #FFFFFF; //<Change done by Nitin N on 22-Nov-2021 : black theme compatibility changes> */
        }

        .labels {
            width: 64px;
        }

        .labelsValue {
            width: 240px;
        }

        .labelsValueShort {
            width: 90px;
        }

        .labelsValueLong {
            width: 200px;
        }
    </style>
</head>
<body onload="this.window.focus();">
    <form id="form1" runat="server">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <table class="FilterPadNew">
                    <tr>
                        <td>
                            <table class="FilterPad">
                                <tr>
                                    <td colspan="7">
                                        <asp:Label ID="lblError" runat="server" CssClass="lblerror"></asp:Label>
                                        <asp:ScriptManager ID="ScriptManager1" runat="server" LoadScriptsBeforeUI="false"
                                            EnableHistory="true" ScriptMode="Release">
                                        </asp:ScriptManager>
                                        <br />
                                        <br />
                                        <asp:Label ID="LbllnkEdit" runat="server" Text="Click edit link to edit&nbsp;"></asp:Label>
                                        <br />
                                        <asp:Label ID="LblPending" runat="server" Text="On Add/Edit of SSI the customer account status will be set as Pending."></asp:Label>
                                    </td>
                                    <td align="right">
                                        <a id="A1" visible="false" runat="server" href="" onclick="window.close()" class="link"
                                            style="width: 75px">ReCheckDuplicate_SSI_Recordsturn</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="8" style="height: 10px;"></td>
                                </tr>


                                <tr>
                                    <td style="padding-right: 15px;">
                                        <asp:Label ID="lblEntity" runat="server" Text="<%$ Resources:LocalizedText, Entity %>" CssClass="lbl">

                                        </asp:Label>
                                    </td>
                                    <td style="padding-right: 30px;">
                                        <asp:Label ID="lbl_Entity" runat="server" CssClass="lbl"></asp:Label>
                                    </td>
                                    <td style="padding-right: 15px;">Currency
                                    </td>
                                    <td style="padding-right: 30px;">
                                        <asp:DropDownList ID="drd_Currency" runat="server" AutoPostBack="true" CssClass="ddl" Width="200px">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="padding-right: 15px;">

                                        <asp:CheckBox ID="chkActive" runat="server" Text="Active" Checked="True" CssClass="lbl"></asp:CheckBox>
                                    </td>
                                    <td>
                                        <asp:Button ID="btn_Add" runat="server" Text="Add" CssClass="btn" Width="70px"></asp:Button>
                                    </td>
                                    <td style="padding-right: 30px;">
                                        <asp:Button ID="btn_Save" runat="server" Text="Save" Enabled="False" Style="width: 70px;" CssClass="btn"></asp:Button>
                                    </td>
                                    <%--added new on 16th june 2017--%>
                                    <%--<td>
                                <asp:Button ID="btn_default" runat="server" Text="Default" Enabled="False" CssClass="btn ddlWidth"></asp:Button>
                            </td>--%>
                                </tr>


                                <tr>
                                    <td style="padding-right: 15px;">Customer
                                    </td>
                                    <td style="padding-right: 30px;">
                                        <asp:Label ID="lbl_Customer" runat="server" CssClass="lbl"></asp:Label>
                                    </td>
                                    <td style="padding-right: 15px;">Product
                                    </td>
                                    <td style="padding-right: 30px;">
                                        <asp:DropDownList ID="drd_Product" runat="server" AutoPostBack="true" CssClass="ddl" Width="200px">
                                            <asp:ListItem Value="ALL">Default</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="padding-right: 15px;">

                                        <asp:CheckBox ID="chkDeActive" runat="server" Text="Inactive" CssClass="lbl"></asp:CheckBox>

                                    </td>
                                    <td>
                                        <asp:Button ID="btn_Load" runat="server" Text="Load" CssClass="btn" Style="width: 70px;"></asp:Button>
                                    </td>
                                    <td style="padding-right: 30px;">
                                        <asp:Button ID="btn_Cancel" runat="server" CssClass="btn" Style="width: 70px;" Text="Cancel"></asp:Button>
                                    </td>
                                </tr>



                                <tr>
                                    <td style="padding-right: 15px;">
                                        <asp:Label ID="lblPAN" runat="server" CssClass="lbl"></asp:Label>
                                    </td>
                                    <td style="padding-right: 30px;">
                                        <asp:Label ID="lblPANValue" runat="server" CssClass="lbl"></asp:Label>
                                    </td>



                                    <td style="padding-right: 15px;">Type
                                    </td>
                                    <td style="padding-right: 30px;" colspan="4">
                                        <asp:DropDownList ID="drd_Type" runat="server" AutoPostBack="true" CssClass="ddl" Width="200px">
                                        </asp:DropDownList>

                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 10px;"></td>
                    </tr>
                    <tr>
                        <td>

                            <% Dim scrollPosURL1 As String = "ScrollPos.htc"%>
                            <div style="behavior: url(<%= ResolveUrl(scrollPosURL1)%>); height: 158px; width: 1900px;"
                                scrollpos="<%= saveScrollPos1.value%>" persistid="<%= saveScrollPos1.UniqueID%>" id="div_ssi" visible="false" runat="server">
                                <%-- overflow: scroll;--%>


                                <table>
                                    <tr>
                                        <td class="HeaderOrder">
                                            <asp:Label runat="server" ID="lblNewSSI" Text="New SSI Details" CssClass="lbl"></asp:Label>
                                        </td>
                                    </tr>
                                    <%--       <tr >
                                <th align="left" valign="middle" class="lbl">Product
                                </th>
                                <th align="left" valign="middle" class="lbl">Holding Type
                                </th>
                                <th align="left" valign="middle" class="lbl">Account Type
                                </th>
                                <th align="left" valign="middle" class="lbl">Asset
                                </th>
                                <th align="left" valign="middle" class="lbl">Account No
                                </th>
                                <th align="left" valign="middle" class="lbl">Default
                                </th>
                                <th align="left" valign="middle" class="lbl">Tenor
                                </th>
                                <th align="left" valign="middle" class="lbl">Bank
                                </th>
                                <th align="left" valign="middle" class="lbl">Swift Code
                                </th>
                                <th align="left" valign="middle" class="lbl">City
                                </th>
                                                   
                                <th align="left" valign="middle" class="lbl">Portfolio
                                </th>
                                <th align="left" valign="middle" class="lbl">FacilityType
                                </th>
                                <th align="left" valign="middle" class="lbl">FacilityLinkNo
                                </th>
                                <th align="left" valign="middle" class="lbl">AccountName
                                </th>
                                <th align="left" valign="middle" class="lbl">Market
                                </th>
                                <th align="left" valign="middle" class="lbl">CustodianName
                                </th>
                          <td align="left" valign="middle" class="lbl" Visible ="false">Intermediary Acc No.
                                </td>
                                <td align="left" valign="middle" class="lbl">Chips Code
                                </td>
                                <td align="left" valign="middle" class="lbl">Sort Code
                                </td>
                                <td align="left" valign="middle" class="lbl">Intermediary Sort Code
                                </td>
                                <td align="left" valign="middle" class="lbl">Available Balance
                                </td>
                                <td align="left" valign="middle" class="lbl">NCSD BIC(94F)
                                </td>
                                <td align="left" valign="middle" class="lbl">95C
                                </td>
                                <td align="left" valign="middle" class="lbl">DEAG/REAG
                                </td>
                                <td align="left" valign="middle" class="lbl">95Q
                                </td>
                                <td align="left" valign="middle" class="lbl">95R
                                </td>
                                <td align="left" valign="middle" class="lbl">95S
                                </td>
                                <td align="left" valign="middle" class="lbl">97A
                                </td>
                                <td align="left" valign="middle" class="lbl">Description
                                </td>
                                <td align="left" valign="middle" class="lbl">BkrCode
                                </td>
                                <td align="left" valign="middle" class="lbl">BkrGroup
                                </td>
                                <td align="left" valign="middle" class="lbl">BkrSettBankName
                                </td>
                                <td align="left" valign="middle" class="lbl">BkrSettName
                                </td>
                                <td align="left" valign="middle" class="lbl">BkrSettBankAcct
                                </td>

                                <th align="left" valign="middle" class="lbl">Start Date
                                </th>
                                <th align="left" valign="middle" class="lbl">End Date
                                </th>
                            </tr>
                            <tr>
                                <td align="left" valign="middle">
                                    <asp:DropDownList ID="f_drd_Product" runat="server" CssClass="ddl" Width="80px" AutoPostBack="true">
                                        <asp:ListItem Value="Default">Default</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td align="left" valign="middle">
                                    <asp:DropDownList ID="f_drd_Type" runat="server" AutoPostBack="true" CssClass="ddl" Width="100px" Enabled="true">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" valign="middle">
                                    <asp:DropDownList ID="f_drd_Acctype" runat="server" AutoPostBack="true" CssClass="ddl" Width="160px">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" valign="middle">
                                    <asp:DropDownList ID="f_drd_Asset" runat="server" AutoPostBack="true" CssClass="ddl" Width="160px">
                                    </asp:DropDownList>
                                </td>
                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_Accountno" runat="server" Width="100px" CssClass="txt" onkeypress="return isNumberKey(event)"></asp:TextBox>                                    
                                </td>
                                <td align="left" valign="middle">
                                    <asp:DropDownList ID="ddlDefault" runat="server" CssClass="ddl" Width="50px">
                                        <asp:ListItem Selected="True" Text="" Value=""></asp:ListItem>
                                        <asp:ListItem Text="Y" Value="Y"></asp:ListItem>
                                        <asp:ListItem Text="N" Value="N"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_Tenor" MaxLength="8" runat="server" Width="70px" CssClass="txt" onkeypress="return isAlphaNumeric(event)"></asp:TextBox>
                                  
                                </td>
                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_Bank" MaxLength="50" runat="server" Width="70px" CssClass="txt"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_Swiftcode" MaxLength="100" runat="server" Width="70px" CssClass="txt"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_City" MaxLength="50" runat="server" Width="70px" CssClass="txt"></asp:TextBox>
                                </td>
                           
                                <td align="left" valign="middle">
                                <asp:DropDownList ID="f_drd_Portfolio" runat="server" AutoPostBack="true" CssClass="ddl" Width="100px">
                                    </asp:DropDownList>
                  
                                    <asp:TextBox ID="f_drd_Portfolio" MaxLength="50" runat="server" Width="70px" CssClass="txt"></asp:TextBox>
                                   
                                </td>
                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_FacilityType" MaxLength="50" runat="server" Width="70px" CssClass="txt"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_FacilityLinkNo" MaxLength="50" runat="server" Width="70px" ReadOnly="true"  CssClass="txt"></asp:TextBox>
                                </td>
                                 

                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_AccName" MaxLength="50" runat="server" Width="70px" CssClass="txt"></asp:TextBox>
                                </td>

                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_Market" MaxLength="50" runat="server" Width="70px" CssClass="txt"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_CustName" MaxLength="50" runat="server" Width="70px" CssClass="txt"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_IntAccNo" MaxLength="50" runat="server" Width="100px" CssClass="txt"  ></asp:TextBox>
                                </td>

                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_Chipcode" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_Sortcode" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>

                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_IntSortCode" MaxLength="50" runat="server" Width="95px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_AvailBal" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_NCSD" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_95C" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                              <td align="left" valign="middle">
                                    <asp:TextBox ID="f_txt_95P" MaxLength="50" runat="server" Width="70px" CssClass="txt"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_DEAG_REAG" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_95Q" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_95R" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_95S" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_IntchipsCode" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_Desc" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_BkrCode" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_BkrGroup" MaxLength="50" runat="server" Width="70px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_BkrSettBankName" MaxLength="50" runat="server" Width="100px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_BkrSettName" MaxLength="50" runat="server" Width="90px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>
                                <td align="left" valign="middle" style="display :none ;">
                                    <asp:TextBox ID="f_txt_BkrSettBAcct" MaxLength="50" runat="server" Width="90px" CssClass="txt" Visible ="false"></asp:TextBox>
                                </td>

                                <td align="left" valign="middle">
                                    <uc1:DateControl ID="f_txt_Start_Date" runat="server" CalenderCss="btn1" TextBoxCss="txt"
                                        TextBoxSize="88" SetDefaultDate="False" />
                                </td>

                                <td align="left" valign="middle">
                                    <uc1:DateControl ID="f_txt_End_Date" runat="server" CalenderCss="btn1" TextBoxCss="txt"
                                        TextBoxSize="88" SetDefaultDate="False" />
                                </td>
                            </tr>--%>
                                </table>
                                <%--</asp:Panel>--%>
                                <table>
                                    <asp:GridView ID="dgvAddSSI" runat="server" AutopostBack="true" HeaderStyle-Font-Bold="false" CssClass="Grid"
                                        AutoGenerateColumns="false" AllowSorting="true"
                                        AllowPaging="False" ShowHeaderWhenEmpty="true" Visible="true">
                                        <RowStyle CssClass="GridItem" />
                                        <HeaderStyle CssClass="GridHeader"/>
                                        <PagerStyle CssClass="GridPager" />

                                        <Columns>
                                            <asp:TemplateField HeaderText="Product">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="200"></HeaderStyle>
                                                <EditItemTemplate>
                                                    <asp:DropDownList ID="f_drd_Product" runat="server" AutoPostBack="true" CssClass="ddl" Width="200"></asp:DropDownList>
                                                </EditItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Holding Type">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <EditItemTemplate>
                                                    <asp:DropDownList ID="f_drd_Type" runat="server" AutoPostBack="true" CssClass="ddl" Width="100" OnSelectedIndexChanged="f_drd_Type_SelectedIndexChanged"></asp:DropDownList>
                                                </EditItemTemplate>
                                            </asp:TemplateField>



                                            <asp:TemplateField HeaderText="Asset">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="90"></HeaderStyle>
                                                <EditItemTemplate>
                                                    <asp:DropDownList ID="f_drd_Asset" runat="server" CssClass="ddl" AutoPostBack="true" Width="90">
                                                    </asp:DropDownList>
                                                </EditItemTemplate>
                                            </asp:TemplateField>



                                            <asp:TemplateField HeaderText="Default">
                                                <ItemTemplate>
                                                    <asp:DropDownList ID="ddlDefault" runat="server" CssClass="ddl" Width="60px">
                                                        <asp:ListItem Selected="True" Text="" Value=""></asp:ListItem>
                                                        <asp:ListItem Text="Y" Value="Y"></asp:ListItem>
                                                        <asp:ListItem Text="N" Value="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Account Type">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <EditItemTemplate>
                                                    <asp:DropDownList ID="f_drd_Acctype" runat="server" AutoPostBack="true" CssClass="ddl" Width="100">
                                                    </asp:DropDownList>
                                                </EditItemTemplate>
                                            </asp:TemplateField>


                                            <asp:TemplateField HeaderText="Account No (97A)">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="150"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_Accountno" MaxLength="13" runat="server" Width="150px" onkeypress="return isNumberKey(event)"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Portfolio">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="200"></HeaderStyle>
                                                <%--code changes by RutujaH on 20.07.2018 as told by TruptiJ--%>
                                                <%--<ItemTemplate>
                                        <asp:TextBox ID="f_drd_Portfolio" MaxLength="50" runat="server"  Width ="200" ></asp:TextBox>
                                    </ItemTemplate>--%>
                                                <EditItemTemplate>
                                                 <%--   <asp:DropDownList ID="f_drd_Portfolio" runat="server" AutoPostBack="true" CssClass="ddl" Width="200" OnSelectedIndexChanged="f_drd_Portfolio_SelectedIndexChanged">
                                                    </asp:DropDownList>--%>
                                                        <asp:TextBox ID="f_drd_Portfolio" runat="server" Width ="250"  CssClass="txt" ReadOnly="true"></asp:TextBox>

                                                </EditItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Facility Type">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_FacilityType" MaxLength="50" runat="server" Width="250"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Facility Link No">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_FacilityLinkNo" MaxLength="50" runat="server" ReadOnly="true" Width="150"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>


                                            <asp:TemplateField HeaderText="Swift Code (95P)">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="120"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_Swiftcode" MaxLength="100" runat="server" Width="120"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>



                                            <asp:TemplateField HeaderText="Tenor">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_Tenor" MaxLength="8" runat="server" Width="100" onkeypress="return isAlphaNumeric(event)"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Bank">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="120"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_Bank" MaxLength="50" runat="server" Width="120"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>


                                            <asp:TemplateField HeaderText="City">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="120"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_City" MaxLength="50" runat="server" Width="120"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>



                                            <asp:TemplateField HeaderText="Account Name">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="150"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_AccName" MaxLength="50" runat="server" Width="150"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Market" Visible ="false" >
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_Market" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Custodian" Visible ="false">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_CustName" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Intermediary Bank Name" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_IntBankName" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Intermediary Acc No." Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_IntAccNo" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Chips Code" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_Chipcode" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Sort Code" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_Sortcode" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Intermediary Sort Code" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_IntSortCode" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Available Balance" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_AvailBal" MaxLength="50" AutoPostBack ="true" OnTextChanged ="AvailBal_TextChanged" runat="server" Width="120"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="NCSD BIC(94F)" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_NCSD" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="95C" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_95C" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                           <%-- <asp:TemplateField HeaderText="DEAG/REAG" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_DEAG_REAG" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>--%>

                                            <asp:TemplateField HeaderText="Intermediary Bank Code" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" Wrap="true" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_IntBankCode" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="95Q" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_95Q" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="95R" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_95R" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="95S" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_95S" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="97A" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_IntchipsCode" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Description" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_Desc" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="BkrCode" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_BkrCode" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="BkrGroup" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_BkrGroup" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="BkrSettBankName" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_BkrSettBankName" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="BkrSettName" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_BkrSettName" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="BkrSettBankAcct" Visible="true">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="f_txt_BkrSettBAcct" MaxLength="50" runat="server" Width="100"></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Start Date">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <uc1:DateControl ID="f_txt_Start_Date" runat="server" CalenderCss="btn1" Width="100" TextBoxCss="txt" TextBoxSize="88" DoPostBack="true" />
                                                    <%--    <uc1:DateControl ID="calStartDate" runat="server" CalenderCss="btn1" TextBoxCss="txt" autopostback="false" />--%>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="End Date">
                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100"></HeaderStyle>
                                                <ItemTemplate>
                                                    <uc1:DateControl ID="f_txt_End_Date" runat="server" CalenderCss="btn1" Width="100" TextBoxCss="txt"
                                                        TextBoxSize="88" SetDefaultDate="False" />
                                                </ItemTemplate>
                                            </asp:TemplateField>





                                        </Columns>

                                    </asp:GridView>
                                </table>
                            </div>
                            <input id="saveScrollPos1" type="hidden" name="saveScrollPos1" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 10px;"></td>
                    </tr>

                    <tr>
                        <td>
                            <%--   <% Dim scrollPosURL As String = "ScrollPos.htc"%>
                    <div style="behavior: url(<%= ResolveURL(scrollPosURL)%>); overflow: scroll; margin-left:15px;"
                        scrollpos="<%= saveScrollPos.value %>" persistid="<%= saveScrollPos.UniqueID %>">--%>

                            <table class="FilterPadNew">
                                <tr>
                                    <td class="HeaderOrder">
                                        <asp:Label runat="server" ID="lblExistingSSI" Text="Existing SSI Details" CssClass="lbl"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                            <table class="FilterPadNew">
                                <tr>
                                    <td>
                                        <asp:GridView ID="grdssi" runat="server" AutoGenerateColumns="False" ShowHeaderWhenEmpty="True"
                                            OnRowEditing="grdssi_RowEditing" CssClass="Grid">
                                            <HeaderStyle CssClass="GridHeader" />
                                            <RowStyle CssClass="GridItem"  />
                                            <PagerStyle CssClass="GridPager" />
                                            <Columns>
                                                <%-- Javed--on 9-Nov-2016--%>
                                                <%-- Javed--on 9-Nov-2016--%>
                                                <asp:CommandField ShowEditButton="True" ButtonType="Link"
                                                    ItemStyle-HorizontalAlign="Center" ValidationGroup="EditValidationControls">
                                                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                </asp:CommandField>
                                                <asp:ButtonField ButtonType="Link" Text="D" CommandName="deleteRecord" HeaderText="Delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" />




                                                <asp:TemplateField HeaderText="SSI ID" SortExpression="SSI ID">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblssi" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.InstructionId")%>'>  <%--'SSI ID--%>
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Right" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Parent SSI ID" SortExpression="SSI ID">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblparentssi" runat="server" Width="30px" Text='<%# DataBinder.Eval(Container, "DataItem.ParentSSID") %>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="30px" HorizontalAlign="Center" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Right" Width="30px" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Product" SortExpression="Product">
                                                    <EditItemTemplate>
                                                        <asp:DropDownList ID="u_ddl_product" CssClass="ddl" Width="180px" runat="server">
                                                            <%--  <asp:ListItem>Default</asp:ListItem>--%>
                                                        </asp:DropDownList>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblproduct" runat="server" Width="150px" Text='<%# DataBinder.Eval(Container, "DataItem.Product") %>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" Width="90px" />
                                                    <ItemStyle Wrap="False" Width="90px" HorizontalAlign="Left" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Holding Type" SortExpression="HoldingType">
                                                    <EditItemTemplate>
                                                        <asp:DropDownList CssClass="ddl" ID="u_ddl_holdingtype" Width="90px" runat="server" OnSelectedIndexChanged="u_ddl_holdingtype_SelectedIndexChanged"
                                                            AutoPostBack="True">
                                                            <asp:ListItem Value="Cash">Cash</asp:ListItem>
                                                            <asp:ListItem Value="Share">Share</asp:ListItem>
                                                        </asp:DropDownList>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbldirection" runat="server" Width="90px" Text='<%# DataBinder.Eval(Container, "DataItem.Direction")%>'> <%--SI_Direction_Type--%>
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="90px" />
                                                    <ItemStyle Wrap="False" Width="90px" HorizontalAlign="Left" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Asset" SortExpression="Asset">
                                                    <EditItemTemplate>
                                                        <asp:DropDownList CssClass="ddl" ID="u_ddl_asset" Width="90px" runat="server">
                                                        </asp:DropDownList>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblcurrency" runat="server" Width="90px" Text='<%# DataBinder.Eval(Container, "DataItem.SICurrency")%>'>
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" Width="90px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="90px" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Default" SortExpression="SIDefault">
                                                    <EditItemTemplate>
                                                        <asp:DropDownList CssClass="ddl" Width="45px" ID="u_ddl_default" runat="server">
                                                            <asp:ListItem Selected="True" Text="" Value=""></asp:ListItem>
                                                            <asp:ListItem Text="Y" Value="Y"></asp:ListItem>
                                                            <asp:ListItem Text="N" Value="N"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSiDefault" runat="server" Width="30px" Text='<%# DataBinder.Eval(Container, "DataItem.SIDefault") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" Width="30px" />
                                                    <ItemStyle Wrap="False" Width="30px" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Account Type / Custodian" SortExpression="Account Type">
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="80px" VerticalAlign="Middle" />
                                                    <EditItemTemplate>
                                                        <asp:DropDownList ID="u_ddl_accounttype" runat="server" AutoPostBack="true" CssClass="ddl" OnSelectedIndexChanged="u_ddl_accounttype_SelectedIndexChanged" Width="120px">
                                                        </asp:DropDownList>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblaccounttype" runat="server" Width="120px" Text='<%# DataBinder.Eval(Container, "DataItem.AccountType")%>'>
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" />
                                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="50px" Wrap="False" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Account No (97A)" SortExpression="Default">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Accountno" CssClass="txt" runat="server" Width="150px" Text='<%# DataBinder.Eval(Container, "DataItem.AccountNo")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblaccountno" runat="server" Width="150px" Text='<%# DataBinder.Eval(Container, "DataItem.AccountNo")%>'>
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" HorizontalAlign="Center" Width="100px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Right" Width="100px" VerticalAlign="Middle" />
                                                </asp:TemplateField>


                                                <asp:TemplateField HeaderText="Branch Name" SortExpression="Branch No">
                                                    <ItemTemplate>
                                                        <asp:Label ID="u_txt_Branchno" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Branch_Code")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Right" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Active YN" SortExpression="ActiveYN" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:DropDownList ID="u_ddl_ActiveYN" Width="45px" CssClass="ddl" runat="server">
                                                            <asp:ListItem Value="Y"></asp:ListItem>
                                                            <asp:ListItem Value="N"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblActiveYN" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ActivationFlag")%>'><%--ActiveYN--%>
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" />
                                                    <ItemStyle Wrap="False" Width="45px" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Portfolio" SortExpression="Facility_Description" >
                                                    <%-- <EditItemTemplate>
                                <asp:DropDownList ID="u_ddl_Portfolio" runat="server" AutoPostBack="true" CssClass="ddl" OnSelectedIndexChanged="u_ddl_accounttype_SelectedIndexChanged" Width="200px">
                                </asp:DropDownList>
                            </EditItemTemplate>--%>

                                                    <HeaderStyle Wrap="False" />
                                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="250px" Wrap="true" />
                                                    <EditItemTemplate>
                                                    <%--    <asp:DropDownList CssClass="ddl" ID="u_ddl_Portfolio" runat="server" Width="200px" AutoPostBack="true" OnSelectedIndexChanged="u_ddl_Portfolio_SelectedIndexChanged">
                                                        </asp:DropDownList>--%>
                                                           <asp:TextBox ID="u_ddl_Portfolio" runat="server" CssClass="txt" Width="250px" Text='<%# DataBinder.Eval(Container, "DataItem.Facility_Description")%>'></asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblPortfolio" runat="server"  Width="250px" Text='<%# DataBinder.Eval(Container, "DataItem.Facility_Description")%>'>
                                                        </asp:Label>
                                                    </ItemTemplate>
                                              
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Facility Type" SortExpression="Facility_Type">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Facility_Type" CssClass="txt" Width="250px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Facility_Type")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblFacility_Type" runat="server"  Width="250px" Text='<%# DataBinder.Eval(Container, "DataItem.Facility_Type")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="30px" />
                                                    <ItemStyle Wrap="true" HorizontalAlign="Left" Width="30px" VerticalAlign="Middle"  />
                                                </asp:TemplateField>


                                                <asp:TemplateField HeaderText="Facility Link No" SortExpression="Facility_Link_No">
                                                    <%--                      <EditItemTemplate>
                                    <asp:TextBox ID="u_txt_Facility_Link_No" CssClass="txt" MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Facility_Link_No")%>'>
                                    </asp:TextBox>
                                </EditItemTemplate>--%>
                                                    <ItemTemplate>
                                                        <asp:Label ID="u_txt_Facility_Link_No" runat="server" Width="150px" Text='<%# DataBinder.Eval(Container, "DataItem.Facility_Link_No")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="40px" />
                                                    <ItemStyle Wrap="true" HorizontalAlign="Left" Width="150px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Swift Code (95P)" SortExpression="Swift Code">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_SwiftCode" CssClass="txt" Width="70px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Swift_Code")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblswiftcode" runat="server" Width="70px" Text='<%# DataBinder.Eval(Container, "DataItem.Swift_Code")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Active" SortExpression="ActivationFlag" Visible="false">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_ActivationFlag" CssClass="txt" Width="40px"  MaxLength="1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ActivationFlag")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblActivationFlag" runat="server" Width="40px" Text='<%# DataBinder.Eval(Container, "DataItem.ActivationFlag")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="40px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Center" Width="40px" VerticalAlign="Middle" />
                                                </asp:TemplateField>


                                                <asp:TemplateField HeaderText="Tenor" SortExpression="A/C Tenor">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Tenor" CssClass="txt" MaxLength ="8" Width="40px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.AC_Tenor")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lbltenor" runat="server" Width="40px" Text='<%# DataBinder.Eval(Container, "DataItem.AC_Tenor")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" Width="40px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="40px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Intermediary Bank Name" SortExpression="Intermediary_Bank_Name" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Intermediary_Bank_Name" CssClass="txt" Width="80px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_Bank_Name")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblIntermediary_Bank_Name" runat="server" Width="80px" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_Bank_Name")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="80px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="80px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Intermediary Account No." SortExpression="Intermediary_Bank_Cpty_AC_No" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Intermediary_Bank_Cpty_AC_No" CssClass="txt" Width="80px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_Bank_Cpty_AC_No")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblIntermediary_Bank_Cpty_AC_No" runat="server" Width="80px" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_Bank_Cpty_AC_No")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="80px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="80px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="CHIPS Code" SortExpression="CHIP_Code" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_CHIP_Code" CssClass="txt" Width="80px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.CHIP_Code")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCHIP_Code" runat="server" Width="80px" Text='<%# DataBinder.Eval(Container, "DataItem.CHIP_Code")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="80px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="SORT Code" SortExpression="SORT_Code" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_SORT_Code" CssClass="txt" Width="80px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.SORT_Code")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSORT_Code" runat="server" Width="80px" Text='<%# DataBinder.Eval(Container, "DataItem.SORT_Code")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="80px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="80px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Intermediary SORT Code" SortExpression="Intermediary_SORT_Code" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Intermediary_SORT_Code"  MaxLength="50" CssClass="txt" Width="80px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_SORT_Code")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblIntermediary_SORT_Code" runat="server" Width="80px" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_SORT_Code")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="80px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Available Balance" SortExpression="AvailableBalance" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_AvailableBalance" AutoPostBack ="true"  CssClass="txt" Width="120px" runat="server" OnTextChanged="AvailableBalance_TextChanged" Text='<%# DataBinder.Eval(Container, "DataItem.AvailableBalance")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblAvailableBalance" runat="server" Width="120px" Text='<%# DataBinder.Eval(Container, "DataItem.AvailableBalance")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="right" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="NCSD BIC(94F)" SortExpression="BIC_Code" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_BIC_Code" CssClass="txt"  MaxLength="50" Width="70px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.BIC_Code")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblBIC_Code" runat="server" Width="70px" Text='<%# DataBinder.Eval(Container, "DataItem.BIC_Code")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="95C" SortExpression="Code_95C" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Code_95C" CssClass="txt"  MaxLength="50" Width="70px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Code_95C")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCode_95C" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Code_95C")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Intermediary Bank Code" SortExpression="Intermediary_Bank_Code" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Intermediary_Bank_Code" CssClass="txt" MaxLength ="32" Width="120px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_Bank_Code")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblIntermediary_Bank_Code" runat="server" Width="70px" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_Bank_Code")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="95Q" SortExpression="Code_95Q" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Code_95Q" CssClass="txt" Width="70px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Code_95Q")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCode_95Q" runat="server" Width="70px" Text='<%# DataBinder.Eval(Container, "DataItem.Code_95Q")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="95R" SortExpression="Code_95R" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Code_95R" CssClass="txt" Width="70px"   MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Code_95R")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCode_95R" runat="server" Width="70px" Text='<%# DataBinder.Eval(Container, "DataItem.Code_95R")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="95S" SortExpression="Code_95S" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Code_95S" CssClass="txt" Width="70px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Code_95S")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCode_95S" runat="server" Width="70px" Text='<%# DataBinder.Eval(Container, "DataItem.Code_95S")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Intermediary CHIPS Code (97A)" SortExpression="Intermediary_CHIP_Code" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Intermediary_CHIP_Code" CssClass="txt" Width="70px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_CHIP_Code")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblIntermediary_CHIP_Code" runat="server" Width="80px" Text='<%# DataBinder.Eval(Container, "DataItem.Intermediary_CHIP_Code")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="BkrCode" SortExpression="Broker_Code" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Broker_Code" CssClass="txt" Width="70px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.BKRCodeCOL")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblBroker_Code" runat="server" Width="70px" Text='<%# DataBinder.Eval(Container, "DataItem.BKRCodeCOL")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="BkrGroup" SortExpression="Broker_Group" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Broker_Group" CssClass="txt" Width="100px"  MaxLength="50" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.BKRGroupCOL")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblBroker_Group" Width="100px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.BKRGroupCOL")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="100px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="100px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="BkrSettBankName" SortExpression="Broker_Settlement_Bank_Name" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Broker_Settlement_Bank_Name"  MaxLength="100" CssClass="txt" Width="80px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.BKRSettBankCOL")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblBroker_Settlement_Bank_Name" runat="server" Width="100px" Text='<%# DataBinder.Eval(Container, "DataItem.BKRSettBankCOL")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="100px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="BkrSettName" SortExpression="Broker_Settlement_Name" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Broker_Settlement_Name" CssClass="txt"  MaxLength="50" Width="80px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.BKRSettCOL")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblBroker_Settlement_Name" Width="80px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.BKRSettCOL")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="BkrSettBankAcct" SortExpression="Broker_Settlement_Bank_Account" Visible="true">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Broker_Settlement_Bank_Account" MaxLength="50" CssClass="txt" Width="80px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.BKRSettBankAcctCOL")%>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblBroker_Settlement_Bank_Account" Width="70px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.BKRSettBankAcctCOL")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="70px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="70px" VerticalAlign="Middle" />
                                                </asp:TemplateField>



                                                <asp:TemplateField HeaderText="Bank" SortExpression="Bank">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_Bank" CssClass="txt" Width="100px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Bank") %>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblbank" runat="server" Width="100px" Text='<%# DataBinder.Eval(Container, "DataItem.Bank") %>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="100px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="100px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="City" SortExpression="City">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_City" CssClass="txt" Width="100px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.City") %>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblcity" runat="server" Width="100px" Text='<%# DataBinder.Eval(Container, "DataItem.City") %>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="100px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="100px" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Start Date" SortExpression="Start Date">
                                                    <EditItemTemplate>
                                                        <uc1:DateControl ID="u_txt_Start_Date" runat="server" CalenderCss="btn1" TextBoxCss="txt"
                                                            TextBoxSize="88px" SetDefaultDate="False" />
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblStartDate" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.StartDate")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Right" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="End Date" SortExpression="End Date">
                                                    <EditItemTemplate>
                                                        <uc1:DateControl ID="u_txt_End_Date" runat="server" CalenderCss="btn1" TextBoxCss="txt"
                                                            TextBoxSize="88px" SetDefaultDate="False" />
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblEndDate" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.EndDate")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Right" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Reason" SortExpression="Remark">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="u_txt_remark" CssClass="txt" Width="120px" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Reason") %>'>
                                                        </asp:TextBox>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblReason" runat="server" Width="120px" Text='<%# DataBinder.Eval(Container, "DataItem.Reason") %>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="100px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <%-- Javed--on 9-Nov-2016--%>
                                                <asp:TemplateField HeaderText="Verified Y/N" SortExpression="Remark" Visible="true">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblVerified_YN" runat="server" Width="40px" Text='<%# DataBinder.Eval(Container, "DataItem.Verified_YN")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="40px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Center" Width="40px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Rejected At" SortExpression="Remark" Visible="true">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblRejected_At" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Rejected_At")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="False" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Rejected By" SortExpression="Remark" Visible="true">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblRejected_By" runat="server" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem.Rejected_By")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="50px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="50px" VerticalAlign="Middle" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Rejected Reason" SortExpression="Remark" Visible="true">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblRejected_Reason" runat="server" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem.Rejected_Reason")%>'> 
                                                        </asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Wrap="true" Width="50px" />
                                                    <ItemStyle Wrap="False" HorizontalAlign="Left" Width="50px" VerticalAlign="Middle" />
                                                </asp:TemplateField>

                                                <%-- newly added--%>
                                            </Columns>
                                            <AlternatingRowStyle CssClass="AlternatItemStyle" />
                                        </asp:GridView>
                                    </td>
                                </tr>


                            </table>
                            <%--   </div>--%>
                            <input id="saveScrollPos" type="hidden" name="saveScrollPos" runat="server" />
                            <input id="tag" type="hidden" runat="server" />
                            <input id="hdnAcNumber" type="hidden" runat="server" />
                        </td>
                    </tr>
                </table>

                
            <asp:Panel ID="grpProftfolio" runat="server" CssClass="invisible">
                <div id="divProftfolio" width="500px" runat="server" class="btnDetailsDiv groupBoxProtfolio beutifyPopUp">
                    <div id="divProftfolioDetails">
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="lblProtfolioInfo" runat="server" CssClass="lbl" Text="Protfolio Details"></asp:Label>
                                </td>
                            </tr>

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

                            <tr>
                                <td>
                                      <asp:Label ID="lblFacilityDesc" runat="server" CssClass="lbl" Text="Find Facility Desc."></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtProtfolio_popup" runat="server"></asp:TextBox></td>
                                <td>
                                    <asp:Button ID="btnLoadProftfolio" runat="server" Text="Load" CssClass="btn btnProtfolio" /></td>
                                <td>
                                    <asp:Button ID="btnSaveProtfolioDetails" runat="server" Text="Save" CssClass="btn btnProtfolio" /></td>
                                <td>
                                    <asp:Button ID="btnCloseProtfolio" runat="server" Text="X" CssClass="btn CloseButton" /></td>
                            </tr>
                        </table>
                    </div>
                    <div id="divProtfolioGrid">
                        <asp:GridView ID="dgv_Protfolio" runat="server" AllowSorting="True" PageSize="10" PagerStyle-Height="32px" AllowPaging="false"
                            AutoGenerateColumns="False" CssClass="Grid" ShowHeaderWhenEmpty="True" EmptyDataText="No Records Found" Width="500px" EnableViewState="true">
                            <HeaderStyle CssClass="GridHeader" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false" />
                            <Columns>
                                <asp:TemplateField ControlStyle-Width="25px">
                                    <HeaderStyle HorizontalAlign="Center" Width="25px" Wrap="True" />
                                    <ItemStyle HorizontalAlign="Center" Width="25px" Wrap="True" />
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="chkbox_ProtfolioAll" EnableViewState="true" runat="server"  OnCheckedChanged ="chkbox_ProtfolioAll_CheckedChanged"  AutoPostBack="true" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkbox_Protfolio" EnableViewState="true" runat="server" OnCheckedChanged="chkbox_Protfolio_CheckedChanged" AutoPostBack="true" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                  <asp:TemplateField HeaderText="Facility Link No">
                                    <ItemTemplate>
                                        <asp:Label ID="lblFacilityLinkNo" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ld_id").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtFacilityLinkNo" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Facility Code">
                                    <ItemTemplate>
                                        <asp:Label ID="lblFacilityType" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ld_facility_code").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtU_ID_UserDetails" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Facility Description">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_FacDesc" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FacDesc").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txt_FacDesc" runat="server" CssClass="txt" AutoPostBack="true"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                               
                            </Columns>
                        </asp:GridView>
                    </div>

                </div>
                <div id="overlayDiv" class="overlaySearch"></div>
            </asp:Panel>

            </ContentTemplate>
              
        </asp:UpdatePanel>
    </form>
</body>
</html>
