<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="FinIQ_EventsCalendar.aspx.vb" Inherits="FinIQWebApp.FinIQ_IM_EventsCalendar" MasterPageFile="~/FiniqAppMasterPage.Master" Title="Events Diary" %>

<%@ Register Src="../FinIQ_User_Controls/DateControl.ascx" TagName="DateControl"
    TagPrefix="uc1" %>

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

<%@ Register Src="../FinIQ_User_Controls/Smart_Search_Customer_Control/FinIQ_Customer_SmartSearch.ascx" TagPrefix="uc2" TagName="FinIQ_Customer_SmartSearch" %>
<%@ Register Src="~/FinIQ_User_Controls/ShareSearch/UCP_CounterParty_Client.ascx" TagPrefix="uc1" TagName="UCP_CounterParty_Client" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">

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

    <script src="EventsCalendar.js" type="text/javascript"></script>
    <link type="text/css" rel="stylesheet" href="EventsCalendar.css" />

<%--    Added by Aniruddha J --%>
        <script type="text/javascript" src="../FinIQJS/SortFilter_Grid.js"></script>


    <style>
        .EventCal_Grid td {
            background-color: #FFFFFF !important;
        }

        .EventCal_Grid select {
            background-color: #F7F7F7 !important;
            float: right;
        }

        .EventCal_Grid table tr td a:link {
            text-align: right !important;
            width: auto;
        }

        select, HtmlSelect {
            border-collapse: collapse;
            border: solid 1px #dddddd;
        }

        .EventCal_Grid td div td {
            white-space: nowrap;
            padding: 0px !important;
            margin: 0px !important;
        }

        .EventCal_Grid td div {
            border: solid 1px #F7F7F7;
            height: 85px !important;
            width: 120px !important;
            overflow: hidden !important;
        }

        .eventList {
            padding: 0px !important;
            margin: 0px !important;
            border-collapse: collapse;
            border: none 0px #444444 !important;
            line-height: normal;
        }

            .eventList td {
                line-height: 14px;
                padding: 0px !important;
                margin: 0px !important;
                font-size: 11px !important;
            }

        .EventCal_Grid td div table, .EventCal_Grid td div table td {
            border: none 0px #444444 !important;
            padding: 1px !important;
            margin: 0px !important;
            float: left;
        }

            .EventCal_Grid td div table td {
                height: 12px !important;
            }


        .TodayDayStyle, .TodayDayStyle a:link {
            font: bold 12px/24px verdana !important;
        }

        .OtherMonthDayStyle {
            background-color: #FFFFFF;
            border: solid 1px #DDDDDD;
            Color: #DDDDDD !important;
        }

        .TitleStyle, .EventCal_Grid .TitleStyle td {
            color: #000000 !important;
            font: normal 14px/28px verdana !important;
            height: 28px;
            width: 100%;
            padding: 0px;
            border: none 0px #DDDDDD !important;
            background-color: #FFFFFF;
        }

            .TitleStyle a:link {
                color: #333333 !important;
                font: normal 11px !important;
                text-decoration: none !important;
            }

            .TitleStyle a:hover {
                color: #DDDDDD !important;
                font: normal 11px !important;
            }

            .TitleStyle td {
                text-align: center;
            }

        .DayHeaderStyle, .DayHeaderStyle th {
            color: #000000 !important;
            font: normal 11px/22px verdana !important;
            height: 22px;
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#F7F7F7', endColorstr='#DDDDDD') !important; /* for IE */
            background: -webkit-gradient(linear, left top, left bottom, from(#F7F7F7), to(#DDDDDD)) !important; /* for webkit browsers */
            background: #FFFFFF !important; /* for firefox 3.6+ */
            border: solid 1px #DDDDDD !important;
        }

        .readMore, .readMore a:link, .readMore a:visited, .readMore a:hover {
            color: #00CCFF !important;
            cursor: pointer;
            text-decoration: none;
        }

        .DayStyle, .EventCal_Grid td .DayStyle {
            font: normal 13px verdana !important;
            border: solid 1px #DDDDDD !important;
            height: 80px;
            width: 120px;
        }

            .DayStyle a:link {
                font: normal 13px verdana !important;
                text-decoration: none !important;
                padding: 2px;
            }

            .DayStyle a:hover {
                font: bold 11px verdana !important;
                text-decoration: underline !important;
            }

        .DayStyleCustomerStatment a:hover {
            font: bold 20px verdana !important;
            text-decoration: underline !important;
            padding: 2px;
        }

        .DayStyleCustomerStatment a:link {
            font: bold 18px verdana !important;
            text-decoration: none !important;
            padding: 2px;
            font-size: 18px !important;
        }

        .Grid td {
            white-space: normal;
        }

        fieldset {
            border: 1px solid #ddd !important;
        }

        fieldset {
            position: relative;
        }

        input[type=radio] {
            vertical-align: middle;
            position: relative;
            bottom: 1px;
        }

        #ctl00_MainContent_oProductSearchControl_autompleteprod1 {
            width: 180px !important;
        }

        #ctl00_MainContent_chkDatefilter {
            padding-left: 5px !important;
        }
    </style>

    <script>
        function SetpnlPayShedulePosition() {
            var p = $("#ctl00_MainContent_pnlPaymentSchedule");
            var position = p.position();

            document.getElementById('<%=HiddenField1.ClientID %>').value = position.top;
            document.getElementById('<%=HiddenField2.ClientID %>').value = position.left;

            $("hiddenButton").click();

        }
    </script>

    <asp:UpdatePanel ID="UpdatePanelCP" runat="server" class="PanelPad" UpdateMode="Conditional">

        <ContentTemplate>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanelCP"
                DisplayAfter="0">
                <ProgressTemplate>
                    <div class="divLoading">
                        <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px; margin-left: 200px;" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>

            <asp:UpdatePanel ID="updPnlLblMessages" runat="server" class="PanelPad">
                <ContentTemplate>
                    <table>
                        <tr>
                            <td colspan="10">
                                <asp:Label runat="server" ID="lblInfo" CssClass="lblError"> </asp:Label>
                                <asp:Label ID="lblSuccess" runat="server" ForeColor="#008000" CssClass="lbl"></asp:Label>
                                <asp:Label ID="lblError" runat="server" ForeColor="#ff4e4e" CssClass="lbl"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>

            <asp:HiddenField ID="HiddenFieldEventArgs" runat="server" />

            <table>
                <tr>
                    <td style="vertical-align: top;">
                        <asp:Panel ID="pnlMainFilters" runat="server" CssClass="MainFilters">
                            <table>
                                <tr>
                                    <td colspan="2" style="padding-bottom: 10px; padding-top: 10px;">
                                        <asp:Button ID="btnLoad" runat="server" class="btn" Text="Load" Width="73px"></asp:Button>
                                    </td>
                                </tr>

                                <tr>
                                    <asp:Button ID="hiddenButton" runat="server" Style="display: none"></asp:Button>

                                    <td class=" lblBoltterPaddingRight">
                                        <asp:Label ID="lblEntity" class="lbl" runat="server" Text="Entity"></asp:Label>
                                    </td>

                                    <td class="ctlBoltterPaddingRight">
                                        <asp:DropDownList ID="ddlEntity" CssClass="ddl width2" runat="server" AutoPostBack="true">
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblTemplate" class="lbl" runat="server" Text="Template"></asp:Label>
                                    </td>

                                    <td class="ctlBoltterPaddingRight">
                                        <asp:DropDownList ID="ddlTemplate" CssClass="ddl width2" runat="server" AutoPostBack="true">
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblMonth" class="lbl" runat="server" Text="Month"></asp:Label>
                                    </td>

                                    <td class=" ctlBoltterPaddingRight">
                                        <asp:DropDownList ID="ddlMonth" CssClass="ddl" runat="server" AutoPostBack="true" Width="92px">
                                        </asp:DropDownList>&nbsp;
                                <asp:DropDownList ID="ddlYear" CssClass="ddl ddlYear" runat="server" AutoPostBack="true" Width="80px">
                                </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblHolidayDate" runat="server" CssClass="lbl">From</asp:Label>
                                    </td>

                                    <td id="dptfromdate" class="ctlBoltterPaddingRight">

                                        <uc1:DateControl ID="fromDate" runat="server" TabIndex="11" CalenderCss="btn1" TextBoxCss="txt" TextBoxSize="92" />
                                    </td>
                                </tr>

                                <tr>

                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblToDate" runat="server" CssClass="lbl">To</asp:Label>
                                    </td>
                                    <td class=" ctlBoltterPaddingRight">
                                        <uc1:DateControl ID="toDate" runat="server" TabIndex="12" CalenderCss="btn1" TextBoxCss="txt" TextBoxSize="92" />
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblEvent" class="lbl" runat="server" Text="Event"></asp:Label>
                                    </td>

                                    <td class=" ctlBoltterPaddingRight">
                                        <uc1:UC_MultiSelectDropDown runat="server" ID="ddlevent_mul" Enabled="true" Width="180px" />
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblIssuer" class="lbl" runat="server" Text="Issuer"></asp:Label>
                                    </td>

                                    <td class="ctlBoltterPaddingRight">
                                        <asp:DropDownList ID="ddlIssuer" CssClass="ddl width2" runat="server" AutoPostBack="true">
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblProduct" runat="server" Text="Product"></asp:Label>
                                    </td>

                                    <td class="ctlBoltterPaddingRight">
                                        <uc1:ProductSearchControl ID="oProductSearchControl" runat="server" EnableViewState="true" />
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblRm" class="lbl" runat="server" Text="RM"></asp:Label>
                                    </td>

                                    <td class="ctlBoltterPaddingRight">
                                        <asp:DropDownList ID="ddlRM" CssClass="ddl width2" runat="server" AutoPostBack="true">
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblCust" runat="server" Style="" Text="Customer"></asp:Label>
                                    </td>

                                    <td class="ctlBoltterPaddingRight">
                                        <uc1:UCP_CounterParty_Client runat="server" ID="UCP_CounterParty_Client" CustomerMode="Client" OnTextChanged="FindCustSmart_UC_Postback" CustomerWidth="180" />
                                        <asp:TextBox ID="txtcustomer" runat="server" Visible="false" CssClass="wordbreak width2"></asp:TextBox>
                                    </td>
                                </tr>

                                <tr runat="server" id="trPortfolio" style="display: none">
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="Label39" runat="server" Style="" Text="Portfolio"></asp:Label>
                                    </td>

                                    <td class="ctlBoltterPaddingRight">
                                        <asp:DropDownList runat="server" ID="ddlPortfolio" CssClass="ddl width2" AutoPostBack="true"></asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblViewBy" class="lbl" runat="server" Text="View By"></asp:Label>
                                    </td>

                                    <td class=" ctlBoltterPaddingRight">
                                        <asp:DropDownList ID="cboEventPayment" CssClass="ddl width2" runat="server" AutoPostBack="true">
                                            <asp:ListItem Value="Schedule" Text="Schedule Date"></asp:ListItem>
                                            <asp:ListItem Value="Payment" Text="Payment Date"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblProcessed" class="lbl" runat="server" Text="Processed"></asp:Label>
                                    </td>

                                    <td class="ctlBoltterPaddingRight">
                                        <asp:DropDownList ID="ddlProcessed" CssClass="ddl width2" runat="server" AutoPostBack="true">
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr style="display: none;">
                                    <td class="lblBoltterPaddingRight">
                                        <asp:Label ID="lblProductCode" class="lbl" runat="server" Text="Product Id" Visible="false"></asp:Label>
                                    </td>

                                    <td class="ctlBoltterPaddingRight">
                                        <asp:TextBox ID="txtProductCode" runat="server" Visible="false" CssClass="width2" />
                                    </td>
                                </tr>

                                <tr style="display: none;">
                                    <td>
                                        <asp:DropDownList ID="ddlEvent" CssClass="ddl" runat="server" AutoPostBack="true" Visible="false">
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td colspan="2" style="padding-top: 10px;">
                                        <asp:CheckBox ID="chkDatefilter" runat="server" CssClass="chkBox" Text="Hide Monthly View" AutoPostBack="true" Style="width: 150px;"></asp:CheckBox>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>

                    </td>

                    <td id="PENav" runat="server" onclick="ToggleNAVClass(this);">
                        <input id="txtSliderPosition" type="hidden" runat="server" value="1" />
                    </td>

                    <td style="vertical-align: top;">

                        <asp:Panel runat="server" ID="grpData" class="grpData">
                            <table class="CalAndEventTable">
                                <tr>
                                    <td style="width: auto; white-space: nowrap">
                                        <asp:UpdatePanel ID="updPnlEvtcal" runat="server" class="PanelPad" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <asp:UpdateProgress ID="UpdateProgress4" runat="server" AssociatedUpdatePanelID="updPnlEvtcal"
                                                    DisplayAfter="0">
                                                    <ProgressTemplate>
                                                        <div class="divLoading">
                                                            <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px; margin-left: 200px;" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                                        </div>
                                                    </ProgressTemplate>
                                                </asp:UpdateProgress>

                                                <asp:Button ID="Button1" runat="server" Text="Button" Style="display: none;" />

                                                <asp:Panel ID="pnlEvtcal" runat="server">

                                                    <fieldset class="Calendar">
                                                        <legend>Event Calendar</legend>
                                                        <asp:Calendar ID="Cal_Events" runat="server" CellPadding="1" CellSpacing="0"
                                                            CssClass="EventCal_Grid CalMargin" DayHeaderStyle-Font-Bold="false" DayHeaderStyle-Font-Italic="False"
                                                            DayHeaderStyle-ForeColor="Black" DayHeaderStyle-VerticalAlign="Middle" DayNameFormat="Short"
                                                            FirstDayOfWeek="Default" Font-Size="14px" NextMonthText=" > "
                                                            PrevMonthText=" < " NextPrevStyle-HorizontalAlign="Center" NextPrevStyle-VerticalAlign="Middle"
                                                            SelectedDayStyle-BackColor="" SelectedDayStyle-BorderStyle="NotSet" SelectedDayStyle-BorderWidth="2"
                                                            SelectedDayStyle-Font-Bold="true" SelectedDayStyle-Width="1" SelectMonthText="M"
                                                            SelectorStyle-BackColor="#FFFFFF" SelectorStyle-Font-Bold="True" SelectWeekText="W"
                                                            ShowGridLines="true" TitleFormat="MonthYear" TitleStyle-BorderStyle="Inset" TitleStyle-BorderWidth="1"
                                                            TitleStyle-Font-Bold="false" TitleStyle-VerticalAlign="Top" TodayDayStyle-Font-Bold="True"
                                                            WeekendDayStyle-Font-Italic="false" WeekendDayStyle-ForeColor="Red" Width="450px"
                                                            Height="240px" ClientIDMode="AutoID" BackColor="#FFFFFF" BorderColor="#DDDDDD">
                                                            <TodayDayStyle CssClass="TodayDayStyle" />
                                                            <SelectorStyle CssClass="SelectorStyle" Font-Bold="True" />
                                                            <NextPrevStyle BorderColor="#009999" HorizontalAlign="Center" VerticalAlign="Middle"
                                                                CssClass="TitleStyle" />
                                                            <DayHeaderStyle CssClass="DayHeaderStyle" Height="22px" />
                                                            <TitleStyle CssClass="TitleStyle" Height="28px" />
                                                            <WeekendDayStyle ForeColor="Red" />
                                                            <OtherMonthDayStyle CssClass="OtherMonthDayStyle" />
                                                            <DayStyle CssClass="DayStyle" Height="25px" />
                                                        </asp:Calendar>
                                                    </fieldset>

                                                </asp:Panel>

                                            </ContentTemplate>
                                        </asp:UpdatePanel>

                                        <asp:UpdatePanel ID="updPnlChart" runat="server" class="PanelPad" UpdateMode="Conditional">

                                            <ContentTemplate>
                                                <asp:UpdateProgress ID="UpdateProgress5" runat="server" AssociatedUpdatePanelID="updPnlChart"
                                                    DisplayAfter="0">
                                                    <ProgressTemplate>
                                                        <div class="divLoading">
                                                            <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px; margin-left: 200px;" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                                        </div>
                                                    </ProgressTemplate>
                                                </asp:UpdateProgress>

                                                <asp:Chart ID="Chart1" runat="server" Width="450px" Height="300px" BackGradientStyle="None" Style="margin-left: 130px"
                                                    ImageStorageMode="UseHttpHandler" EnableViewState="true" BackColor="#FFFFFF" Palette="BrightPastel" PaletteCustomColors="">
                                                    <Legends>
                                                        <asp:Legend Name="Default">
                                                        </asp:Legend>
                                                    </Legends>
                                                    <Titles>
                                                        <asp:Title Name="ChartTitle">
                                                        </asp:Title>
                                                    </Titles>
                                                    <Series>
                                                        <asp:Series ChartType="Doughnut" Name="Series1" ChartArea="Default" Legend="Default">
                                                        </asp:Series>
                                                    </Series>
                                                    <ChartAreas>
                                                        <asp:ChartArea Name="Default" BackColor="#FFFFFF" Area3DStyle-Enable3D="true" AlignmentStyle="Position">
                                                            <AxisY LineDashStyle="Solid" LineColor="#999999" LineWidth="1">
                                                                <MajorGrid Enabled="true" LineDashStyle="Dot" LineColor="#F7F7F7" LineWidth="0"></MajorGrid>
                                                                <MajorTickMark Enabled="false" />
                                                            </AxisY>
                                                            <AxisX LineWidth="1" LineDashStyle="Solid" LineColor="#999999" IsStartedFromZero="false" IntervalAutoMode="VariableCount">
                                                                <MajorGrid Enabled="false"></MajorGrid>
                                                                <MajorTickMark Enabled="false" />
                                                            </AxisX>
                                                        </asp:ChartArea>
                                                    </ChartAreas>
                                                </asp:Chart>

                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </td>

                                    <tr>
                                        <td style="width: auto; padding-top: 15px;">
                                            <asp:UpdatePanel ID="updProductEventPln" runat="server" class="PanelPad" UpdateMode="Conditional">

                                                <ContentTemplate>
                                                    <asp:UpdateProgress ID="UpdateProgress6" runat="server" AssociatedUpdatePanelID="updProductEventPln"
                                                        DisplayAfter="0">
                                                        <ProgressTemplate>
                                                            <div class="divLoading">
                                                                <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px; margin-left: 200px;" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                                            </div>
                                                        </ProgressTemplate>
                                                    </asp:UpdateProgress>

                                                    <asp:Panel ID="ProductEventPln" runat="server">

                                                        <fieldset class="ProductEvent">
                                                            <legend>
                                                                <asp:Label ID="Label1" CssClass="lbl" runat="server" Text=" Product and Event List Details" />
                                                                <asp:Label ID="lblEventDate" CssClass="lbl lblevent" runat="server" Text="Event Date" />
                                                            </legend>

                                                            <table id="Table1" runat="server" cellpadding="0" cellspacing="0">
                                                                <tr>
                                                                    <td>
                                                                        <table>
                                                                            <tr>
                                                                                <td id="td5" class="ctlBoltterPaddingRight">
                                                                                    <asp:Button ID="btnProcess" runat="server" class="btn" Text="Process" Width="70px"></asp:Button>
                                                                                </td>

                                                                                <td style="width: 100px">
                                                                                    <asp:Label ID="totalRecords" Text="Total Record(s)" runat="server"></asp:Label>
                                                                                </td>

                                                                                <td style="width: 43px">
                                                                                    <asp:Label ID="TtlRecords" runat="server"></asp:Label>
                                                                                </td>

                                                                                <td style="width: 120px">
                                                                                    <asp:Label ID="selRecord" Text="Selected Record(s)" runat="server"></asp:Label>
                                                                                </td>

                                                                                <td style="width: 190px">
                                                                                    <asp:Label ID="TtlSelectRecord" runat="server"></asp:Label>
                                                                                </td>

                                                                                <td>
                                                                                    <input type="button" id="btnShowSort1" style="" value="" runat="server" class="btnMax" onclick="ShowSortFilter();" />
                                                                                    <asp:Button ID="btnShowEvent" runat="server" Visible="false" />
                                                                                </td>

                                                                                <td>
                                                                                    <input type="button" id="btnHideSort1" style="" value="" runat="server" class="btnMin" onclick="HideSortFilter();" />
                                                                                    <asp:Button ID="btnHideEvent" runat="server" Visible="false" />
                                                                                </td>

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

                                                            <div id="SortTableToHide" runat="server" style="display: none;">
                                                                <table class="filter" style="padding: 5px">
                                                                    <tr style="height: 25px">
                                                                        <td class="lblBoltterPaddingRight">
                                                                            <asp:Label ID="lblSort1" CssClass="lbl" runat="server" Text="Sort by #1" />
                                                                        </td>

                                                                        <td class="lblBoltterPaddingRight">
                                                                            <asp:DropDownList ID="ddlSortgrdProductEvent1" Style="padding-left: 20px;" CssClass="dropdown" runat="server" AutoPostBack="true" Width="137px">
                                                                                <asp:ListItem Value="EventName" Text="Event Name"></asp:ListItem>
                                                                                <asp:ListItem Value="RS_Schedule_PreDate" Text="Payment Date"></asp:ListItem>
                                                                                <asp:ListItem Value="RS_Status" Text="Processing Status"></asp:ListItem>
                                                                                <%--23-Jun-2020 || Prachi || Start--%>
                                                                                <asp:ListItem Value="Series_No" Text="FinIQ Product Ref"></asp:ListItem>
                                                                                <%--<asp:ListItem Value="Strategy_Code" Text="Product Code"></asp:ListItem>--%>
                                                                                <%--23-Jun-2020 || Prachi || End--%>
                                                                                <asp:ListItem Value="Product_Name" Text="Product Name"></asp:ListItem>
                                                                                <asp:ListItem Value="RS_Schedule_Date" Text="Schedule Date"></asp:ListItem>
                                                                            </asp:DropDownList>
                                                                        </td>

                                                                        <td class="ctlBoltterPaddingRight">
                                                                            <asp:RadioButton ID="rdoAsc1" runat="server" GroupName="1"
                                                                                CssClass="RadioBtn" AutoPostBack="True" />
                                                                            <asp:Label ID="Label16" runat="server" Text="Asc"></asp:Label>&nbsp;
                                        <asp:RadioButton ID="rdoDec1" runat="server" GroupName="1"
                                            CssClass="RadioBtn" AutoPostBack="True" />
                                                                            <asp:Label ID="Label18" runat="server" Text="Desc"></asp:Label>&nbsp;
                                                                        </td>

                                                                        <td class="lblBoltterPaddingRight">
                                                                            <asp:Label ID="lblViewStyle" CssClass="lbl" runat="server" Text="View style" />
                                                                        </td>

                                                                        <td class="ctlBoltterPaddingRight" colspan="2">
                                                                            <asp:DropDownList ID="ddlPagination" CssClass="dropdown" runat="server" AutoPostBack="true" Width="97px">
                                                                                <asp:ListItem Value="Pagination" Text="Pagination"></asp:ListItem>
                                                                                <asp:ListItem Value="Scrolling" Text="Scrolling"></asp:ListItem>
                                                                            </asp:DropDownList>
                                                                        </td>

                                                                    </tr>

                                                                    <tr style="height: 35px">
                                                                        <td class="lblBoltterPaddingRight">
                                                                            <asp:Label ID="lblSort2" CssClass="lbl" runat="server" Text="Sort by #2" />
                                                                        </td>

                                                                        <td class="lblBoltterPaddingRight">
                                                                            <asp:DropDownList ID="ddlSortgrdProductEvent2" Style="padding-left: 20px;" CssClass="dropdown" runat="server" AutoPostBack="true" Width="137px">
                                                                                <asp:ListItem Value="EventName" Text="Event Name"></asp:ListItem>
                                                                                <asp:ListItem Value="RS_Schedule_PreDate" Text="Payment Date"></asp:ListItem>
                                                                                <asp:ListItem Value="RS_Status" Text="Processing Status"></asp:ListItem>
                                                                                <%--23-Jun-2020 || Prachi || Start--%>
                                                                                <asp:ListItem Value="Series_No" Text="FinIQ Product Ref"></asp:ListItem>
                                                                                <%--<asp:ListItem Value="Strategy_Code" Text="Product Code"></asp:ListItem>--%>
                                                                                <%--23-Jun-2020 || Prachi || End--%>
                                                                                <asp:ListItem Value="Product_Name" Text="Product Name"></asp:ListItem>
                                                                                <asp:ListItem Value="RS_Schedule_Date" Text="Schedule Date"></asp:ListItem>
                                                                                <%--   mayuri c on 23 th aug 2018 as per discuss with shital w  for remove rm description coloumn --%>
                                                                                <%-- <asp:ListItem Value ="RM_Description" Text ="RM Description"></asp:ListItem>--%>
                                                                            </asp:DropDownList>
                                                                        </td>

                                                                        <td class="ctlBoltterPaddingRight">
                                                                            <asp:RadioButton ID="rdoAsc2" runat="server" GroupName="2"
                                                                                CssClass="RadioBtn" AutoPostBack="True" />
                                                                            <asp:Label ID="Label20" runat="server" Text="Asc"></asp:Label>&nbsp;
                                        <asp:RadioButton ID="rdoDec2" runat="server" GroupName="2"
                                            CssClass="RadioBtn" AutoPostBack="True" />
                                                                            <asp:Label ID="Label22" runat="server" Text="Desc"></asp:Label>&nbsp;
                                                                        </td>

                                                                        <td class="lblBoltterPaddingRight">
                                                                            <span class="lbl">Rows per page</span>
                                                                        </td>

                                                                        <td>
                                                                            <asp:TextBox runat="server" ID="txtRowsPerPage" MaxLength="3" Width-="32px" CssClass="txt" AutoPostBack="true" onkeydown="OnTextChanged(this);" Text="10"></asp:TextBox>
                                                                        </td>

                                                                        <td>
                                                                            <asp:Button ID="btnEvtExporttoExcel" runat="server" CssClass="btn btnExcel" Width="28px" Text="" title="Export To Excel"></asp:Button>
                                                                        </td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td class="lblBoltterPaddingRight">
                                                                            <asp:Label ID="lblSort3" CssClass="lbl" runat="server" Text="Sort by #3" />
                                                                        </td>

                                                                        <td class="lblBoltterPaddingRight">
                                                                            <asp:DropDownList ID="ddlSortgrdProductEvent3" Style="padding-left: 20px;" CssClass="dropdown" runat="server" AutoPostBack="true" Width="137px">
                                                                                <asp:ListItem Value="EventName" Text="Event Name"></asp:ListItem>
                                                                                <asp:ListItem Value="RS_Schedule_PreDate" Text="Payment Date"></asp:ListItem>
                                                                                <asp:ListItem Value="RS_Status" Text="Processing Status"></asp:ListItem>
                                                                                <%--23-Jun-2020 || Prachi || Start--%>
                                                                                <asp:ListItem Value="Series_No" Text="FinIQ Product Ref"></asp:ListItem>
                                                                                <%--<asp:ListItem Value="Strategy_Code" Text="Product Code"></asp:ListItem>--%>
                                                                                <%--23-Jun-2020 || Prachi || End--%>
                                                                                <asp:ListItem Value="Product_Name" Text="Product Name"></asp:ListItem>
                                                                                <asp:ListItem Value="RS_Schedule_Date" Text="Schedule Date"></asp:ListItem>
                                                                            </asp:DropDownList>
                                                                        </td>

                                                                        <td class="ctlBoltterPaddingRight">
                                                                            <asp:RadioButton ID="rdoAsc3" runat="server" GroupName="3"
                                                                                CssClass="RadioBtn" AutoPostBack="True" />
                                                                            <asp:Label ID="Label24" runat="server" Text="Asc"></asp:Label>&nbsp;
                                        <asp:RadioButton ID="rdoDec3" runat="server" GroupName="3"
                                            CssClass="RadioBtn" AutoPostBack="True" />
                                                                            <asp:Label ID="Label25" runat="server" Text="Desc"></asp:Label>&nbsp;
                                                                        </td>

                                                                        <td class="ctlBoltterPaddingRight">
                                                                            <asp:Button ID="btnPreview" runat="server" class="btn" Text="Preview" Width="97px"></asp:Button>
                                                                        </td>

                                                                        <td class="ctlBoltterPaddingRight" colspan="2">
                                                                            <asp:Button ID="btnEmail" runat="server" class="btn" Text="Email" Width="97px" OnClick="btnEmail_Click1"></asp:Button>
                                                                        </td>
                                                                    </tr>

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

                                                            <div id="grdProductEventGrid" class="divProductEvent" runat="server">
                                                                <asp:GridView ID="grdProductEvent" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3" PageSize="10" AllowPaging="True"
                                                                    CssClass="Grid" ShowHeaderWhenEmpty="true" Style="width: 980px !important">

                                                                    <SelectedRowStyle CssClass="GridItemSelect" />
                                                                    <RowStyle CssClass="GridItem" />
                                                                    <HeaderStyle CssClass="GridHeader" />
                                                                    <FooterStyle CssClass="GridFooter" />
                                                                    <PagerStyle CssClass="GridPager" />

                                                                    <PagerSettings Mode="NumericFirstLast"
                                                                        FirstPageText="First"
                                                                        LastPageText="Last"
                                                                        Position="Bottom" />

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

                                                                    <Columns>
                                                                        <asp:TemplateField>
                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                            <HeaderTemplate>
                                                                                <asp:CheckBox ID="checkALL" runat="server" ItemStyle-Width="25px" OnCheckedChanged="checkAllCheckChanged" AutoPostBack="true" Style="margin-left: -2px !important"></asp:CheckBox>
                                                                            </HeaderTemplate>
                                                                            <ItemTemplate>
                                                                                <asp:CheckBox ID="checkBox_COL" runat="server" ItemStyle-Width="25px" OnCheckedChanged="checkBox_COL_CheckedChanged" AutoPostBack="true" EnableViewState="true"></asp:CheckBox>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Sr. No." Visible="false" ItemStyle-Width="100px" runat="server">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="SrNo_COL" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SrNo_COL").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="FinIQ Product Ref" runat="server" HeaderStyle-CssClass="width1" ItemStyle-CssClass="width1" ItemStyle-HorizontalAlign="Right"><%--23-Jun-2020 || Prachi--%>
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="Series_No" runat="server" CssClass="lnkBtn" Text='<%# DataBinder.Eval(Container, "DataItem.Series_No")%>' CommandArgument='<%# DataBinder.Eval(Container, "DataItem.SrNo_COL")%>' CommandName="Select"> </asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Product Name" ItemStyle-Width="330px" runat="server">
                                                                            <ItemStyle Wrap="true" />
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="ProductName_COL" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Product_Name").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Event Name" ItemStyle-Width="80px" runat="server">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="EventName_COL" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.EventName").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="ProductID" Visible="false" ItemStyle-Width="80px" runat="server">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="ProductID_COL" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ProductID").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Frequency" Visible="false" ItemStyle-Width="80px" runat="server">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="RMFreq_Col" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RM_Frequency").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Link Id" Visible="false" ItemStyle-Width="109px" runat="server">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="RS_Link_Id" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RS_Link_Id").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Schedule Date" ItemStyle-Width="90px" runat="server" ItemStyle-HorizontalAlign="Center">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="RS_Schedule_Date" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RS_Schedule_Date").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Payment Date" ItemStyle-Width="90px" runat="server" ItemStyle-HorizontalAlign="Center">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="RS_Schedule_PreDate" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RS_Schedule_PreDate").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Product Code" ItemStyle-Width="80px" runat="server" Visible="false">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Strategy_Code" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Strategy_Code").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="ISIN" ItemStyle-Width="80px" runat="server">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="lblISIN" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.ISIN").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Processing Status" ItemStyle-Width="80px" runat="server" HeaderStyle-Width="90px">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="Processing_Status" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RS_Status").ToString)%>' />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>

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

                                                </ContentTemplate>

                                                <Triggers>
                                                    <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
                                                </Triggers>

                                            </asp:UpdatePanel>
                                        </td>
                                    </tr>
                                </tr>

                                <tr>
                                    <td colspan="2">
                                        <asp:UpdatePanel ID="updGrpDealDetails" runat="server" class="PanelPad" UpdateMode="Conditional">

                                            <ContentTemplate>
                                                <asp:UpdateProgress ID="UpdateProgress7" runat="server" AssociatedUpdatePanelID="updGrpDealDetails"
                                                    DisplayAfter="0">
                                                    <ProgressTemplate>
                                                        <div class="divLoading">
                                                            <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px; margin-left: 200px;" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                                        </div>
                                                    </ProgressTemplate>
                                                </asp:UpdateProgress>

                                                <asp:Panel ID="grpDealDetails" runat="server">
                                                    <fieldset class="DealDetails">
                                                        <legend>
                                                            <asp:Label ID="Label36" CssClass="lbl" runat="server" Text="Deal Details" Style="margin-right: 20px" />
                                                            <asp:Label ID="Label35" CssClass="lbl" runat="server" Text="NM ID # " Style="margin-right: 5px" />
                                                            <asp:Label ID="lblNoteMasterID" CssClass="lbl" runat="server" Text="" />
                                                            <asp:Label ID="lblProductName1" CssClass="lbl" runat="server" Text="" />
                                                        </legend>

                                                        <table id="tbDealDetailsButton" runat="server" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td colspan="4" style="height: 6px;"></td>
                                                            </tr>

                                                            <tr>
                                                                <td style="width: 100px">
                                                                    <asp:Label ID="lblTotalRecord" Text="Total Record(s)" runat="server"></asp:Label>
                                                                </td>

                                                                <td style="width: 462px">
                                                                    <asp:Label ID="lblTtlRecordDeal" runat="server"></asp:Label>
                                                                </td>

                                                                <td>
                                                                    <input type="button" id="btnDealShow" runat="server" style="" value="" class="btnMax1" onclick="ShowDealSortFilter();" />
                                                                </td>

                                                                <td>
                                                                    <input type="button" id="btnDealHide" runat="server" style="" value="" class="btnMin1" onclick="HideDealSortFilter();" />
                                                                </td>
                                                            </tr>

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

                                                        <div id="divDealDetailsGrid" runat="server">
                                                            <table class="filter" style="padding: 5px">
                                                                <tr>
                                                                    <td class="lblBoltterPaddingRight">
                                                                        <asp:Label ID="Label26" CssClass="lbl" runat="server" Text="Sort by #1" />
                                                                    </td>

                                                                    <td class="lblBoltterPaddingRight">
                                                                        <asp:DropDownList ID="ddlSortDeal1" Style="padding-left: 20px;" CssClass="dropdown" runat="server" AutoPostBack="true" Width="137px">
                                                                            <asp:ListItem Value="Note_deal_id" Text="Deal No"></asp:ListItem>
                                                                            <asp:ListItem Value="note_ccy" Text="Ccy"></asp:ListItem>
                                                                            <asp:ListItem Value="nominal_amt" Text="Nominal Amount"></asp:ListItem>
                                                                            <asp:ListItem Value="Issuer_Name" Text="Issuer"></asp:ListItem>
                                                                            <asp:ListItem Value="note_product_name" Text="Note Product"></asp:ListItem>
                                                                            <asp:ListItem Value="Maturity_date" Text="Maturity Date"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </td>

                                                                    <td class="ctlBoltterPaddingRight">
                                                                        <asp:RadioButton ID="RdobtnDeal1Asc" runat="server" GroupName="4"
                                                                            CssClass="RadioBtn" AutoPostBack="True" />
                                                                        <asp:Label ID="Label27" runat="server" Text="Asc"></asp:Label>&nbsp;
                                        <asp:RadioButton ID="RdobtnDeal1Desc" runat="server" GroupName="4"
                                            CssClass="RadioBtn" AutoPostBack="True" />
                                                                        <asp:Label ID="Label28" runat="server" Text="Desc"></asp:Label>&nbsp;
                                                                    </td>

                                                                    <td class="lblBoltterPaddingRight">
                                                                        <asp:Label ID="lblViewByDeal" CssClass="lbl" runat="server" Text="View style" />
                                                                    </td>

                                                                    <td class="ctlBoltterPaddingRight">
                                                                        <asp:DropDownList ID="ddlDealPagination" CssClass="dropdown" runat="server" AutoPostBack="true" Width="97px">
                                                                            <asp:ListItem Value="Pagination" Text="Pagination"></asp:ListItem>
                                                                            <asp:ListItem Value="Scrolling" Text="Scrolling"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </td>

                                                                    <td id="td1" runat="server" style="width: 43px">
                                                                        <asp:Button ID="btnToExcelDeal" runat="server" CssClass="btn btnExcel" Width="28px" Text="" title="Export To Excel"></asp:Button>
                                                                    </td>
                                                                </tr>

                                                                <tr>
                                                                    <td style="height: 1px"></td>
                                                                </tr>

                                                                <tr>
                                                                    <td style="width: 72px">
                                                                        <asp:Label ID="Label29" CssClass="lbl" runat="server" Text="Sort by #2" />
                                                                    </td>

                                                                    <td class="lblBoltterPaddingRight">
                                                                        <asp:DropDownList ID="ddlSortDeal2" Style="padding-left: 20px;" CssClass="dropdown" runat="server" AutoPostBack="true" Width="137px">
                                                                            <asp:ListItem Value="Note_deal_id" Text="Deal No"></asp:ListItem>
                                                                            <asp:ListItem Value="note_ccy" Text="Ccy"></asp:ListItem>
                                                                            <asp:ListItem Value="nominal_amt" Text="Nominal Amount"></asp:ListItem>
                                                                            <asp:ListItem Value="Issuer_Name" Text="Issuer"></asp:ListItem>
                                                                            <asp:ListItem Value="note_product_name" Text="Note Product"></asp:ListItem>
                                                                            <asp:ListItem Value="Maturity_date" Text="Maturity Date"></asp:ListItem>

                                                                        </asp:DropDownList>
                                                                    </td>

                                                                    <td class="lblBoltterPaddingRight">
                                                                        <asp:RadioButton ID="RdobtnDeal2Asc" runat="server" GroupName="5"
                                                                            CssClass="RadioBtn" AutoPostBack="True" />
                                                                        <asp:Label ID="Label30" runat="server" Text="Asc"></asp:Label>&nbsp;
                                        <asp:RadioButton ID="RdobtnDeal2Desc" runat="server" GroupName="5"
                                            CssClass="RadioBtn" AutoPostBack="True" />
                                                                        <asp:Label ID="Label31" runat="server" Text="Desc"></asp:Label>&nbsp;
                                                                    </td>
                                                                </tr>

                                                                <tr>
                                                                    <td style="height: 1px"></td>
                                                                </tr>

                                                                <tr>
                                                                    <td class="lblBoltterPaddingRight">
                                                                        <asp:Label ID="Label32" CssClass="lbl" runat="server" Text="Sort by #3" />

                                                                    </td>

                                                                    <td class="lblBoltterPaddingRight">
                                                                        <asp:DropDownList ID="ddlSortDeal3" Style="padding-left: 20px;" CssClass="dropdown" runat="server" AutoPostBack="true" Width="137px">
                                                                            <asp:ListItem Value="Note_deal_id" Text="Deal No"></asp:ListItem>
                                                                            <asp:ListItem Value="note_ccy" Text="Ccy"></asp:ListItem>
                                                                            <asp:ListItem Value="nominal_amt" Text="Nominal Amount"></asp:ListItem>
                                                                            <asp:ListItem Value="Issuer_Name" Text="Issuer"></asp:ListItem>
                                                                            <asp:ListItem Value="note_product_name" Text="Note Product"></asp:ListItem>
                                                                            <asp:ListItem Value="Maturity_date" Text="Maturity Date"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </td>

                                                                    <td class="lblBoltterPaddingRight">
                                                                        <asp:RadioButton ID="RdobtnDeal3Asc" runat="server" GroupName="6"
                                                                            CssClass="RadioBtn" AutoPostBack="True" />
                                                                        <asp:Label ID="Label33" runat="server" Text="Asc"></asp:Label>&nbsp;
                                        <asp:RadioButton ID="RdobtnDeal3Desc" runat="server" GroupName="6"
                                            CssClass="RadioBtn" AutoPostBack="True" />
                                                                        <asp:Label ID="Label34" runat="server" Text="Desc"></asp:Label>&nbsp;
                                                                    </td>
                                                                </tr>

                                                                <tr>
                                                                    <td style="height: 5px"></td>
                                                                </tr>
                                                            </table>
                                                        </div>

                                                        <div class="divDealDetails" id="grddivDealDetails" runat="server">
                                                            <asp:GridView ID="grdDealDetails" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3" PageSize="10" AllowPaging="True"
                                                                CssClass="Grid" ShowHeaderWhenEmpty="true" Width="980px">
                                                                <HeaderStyle CssClass="GridHeader" />
                                                                <SelectedRowStyle CssClass="GridItemSelect" BackColor="#f7f7f7" />
                                                                <RowStyle CssClass="GridItem" />
                                                                <HeaderStyle CssClass="GridHeader" />
                                                                <FooterStyle CssClass="GridFooter" />
                                                                <PagerStyle CssClass="GridPager" />

                                                                <PagerSettings Mode="NumericFirstLast"
                                                                    FirstPageText="First"
                                                                    LastPageText="Last"
                                                                    Position="Bottom" />

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

                                                                    <asp:TemplateField HeaderText="Actions" runat="server">
                                                                        <ItemTemplate>
                                                                            <asp:LinkButton ID="lnkDealDetails" CssClass="lnkBtn" CommandName="DealDetails" runat="server" Text='Deal Details ' CommandArgument='<%# DataBinder.Eval(Container, "DataItem.Note_deal_id")%>' />
                                                                            <asp:LinkButton ID="lnkPaymentSchedule" CssClass="lnkBtn" CommandName="PaymentSchedule" runat="server" Text=' Payment Schedule' CommandArgument='<%# DataBinder.Eval(Container, "DataItem.Note_deal_id")%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Deal No." runat="server">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="DealNo" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Note_deal_id").ToString)%> ' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Customer Name" runat="server" Visible="false">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="CustomerName" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.customer_name").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Ccy" runat="server" ItemStyle-HorizontalAlign="Center">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="Ccy" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.note_ccy").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Nominal Amount" runat="server" ItemStyle-HorizontalAlign="Right">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="NominalAmount" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.nominal_amt").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Note Product " runat="server">
                                                                        <ItemStyle Wrap="true" Width="370px" />
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="note_product_name" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.note_product_name").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Email ID" Visible="false" runat="server">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="EmailID" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Emailid").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Start Date" runat="server" ItemStyle-HorizontalAlign="Center" Visible="false">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="StartDate" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.start_date").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>

                                                                    <asp:TemplateField HeaderText="Maturity Date" runat="server" ItemStyle-HorizontalAlign="Center">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="MaturityDate" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Maturity_date").ToString)%>' />
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                    </fieldset>
                                                </asp:Panel>
                                            </ContentTemplate>

                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="grdProductEvent" EventName="RowCommand" />
                                                <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
                                            </Triggers>

                                        </asp:UpdatePanel>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="ctlBoltterPaddingRight" colspan="2">
                                        <asp:UpdatePanel ID="udpPnlchkShowFinSPL" runat="server" class="PanelPad" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <asp:UpdateProgress ID="UpdateProgress3" runat="server" AssociatedUpdatePanelID="udpPnlchkShowFinSPL"
                                                    DisplayAfter="0">
                                                    <ProgressTemplate>
                                                        <div class="divLoading">
                                                            <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px; margin-left: 200px;" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                                        </div>
                                                    </ProgressTemplate>
                                                </asp:UpdateProgress>

                                                <asp:CheckBox ID="chkShowFinSPL" runat="server" CssClass="chkBox" Text="Show FinSPL" AutoPostBack="true" Style="width: 150px"></asp:CheckBox>

                                            </ContentTemplate>

                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="grdProductEvent" EventName="RowCommand" />
                                                <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
                                            </Triggers>

                                        </asp:UpdatePanel>
                                    </td>
                                </tr>

                                <tr>
                                    <td>
                                        <asp:UpdatePanel ID="updPnlFINSPLtd" runat="server" class="PanelPad" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <asp:UpdateProgress ID="UpdateProgress8" runat="server" AssociatedUpdatePanelID="updPnlFINSPLtd"
                                                    DisplayAfter="0">
                                                    <ProgressTemplate>
                                                        <div class="divLoading">
                                                            <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px; margin-left: 200px;" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                                        </div>
                                                    </ProgressTemplate>
                                                </asp:UpdateProgress>

                                                <div runat="server" id="divsyntaxHighlighterFINSPL">
                                                    <fieldset class="finsplgrid" id="syntaxHighlighterFINSPL" runat="server" style="width: 980px !important;">
                                                        <legend>
                                                            <asp:Label ID="Label38" runat="server" Text="FinSPL (ReadOnly)" Style="margin-right: 20px" />
                                                            <asp:Label ID="Label37" runat="server" Text="NM ID # " Style="margin-right: 5px" />
                                                            <asp:Label ID="lblNMID" runat="server" Text="" />
                                                        </legend>
                                                        <div style="overflow: auto; height: 356px;">
                                                            <asp:Label ID="lblWTMSearch" runat="server"></asp:Label>
                                                        </div>
                                                    </fieldset>
                                                </div>
                                            </ContentTemplate>

                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="grdProductEvent" EventName="RowCommand" />
                                                <asp:AsyncPostBackTrigger ControlID="chkShowFinSPL" EventName="CheckedChanged" />
                                                <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
                                            </Triggers>

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

                        <asp:Panel runat="server" ID="filter" CssClass="fldsetFilter">
                            <table>
                                <tr>
                                    <td colspan="4" style="text-align: center; padding: 6px;">
                                        <asp:Label ID="lblFltr" CssClass="lbl" runat="server" Text="Customer, Book && RM Filter without LRC" />
                                    </td>
                                </tr>

                                <tr>
                                    <td>
                                        <asp:CheckBox ID="chkCustomer" runat="server" CssClass="chkBox"></asp:CheckBox>
                                    </td>
                                    <td>
                                        <asp:Label ID="lblCustomer" CssClass="lbl" runat="server" Text="Customer" />
                                    </td>
                                    <td>
                                        <asp:TextBox runat="server" ID="txtCustID" class="txt" Width="125px" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="cboCust" CssClass="dropdown" runat="server" AutoPostBack="true" Width="125px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td>
                                        <asp:CheckBox ID="chkBook" runat="server" CssClass="chkBox"></asp:CheckBox>
                                    </td>
                                    <td>
                                        <asp:Label ID="lblBook" CssClass="lbl" runat="server" Text="Book" />
                                    </td>
                                    <td>
                                        <asp:TextBox runat="server" ID="txtBook" class="txt" Width="125px" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="cboBook" CssClass="dropdown" runat="server" AutoPostBack="true" Width="125px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td>
                                        <asp:CheckBox ID="chkMainRM" runat="server" CssClass="chkBox"></asp:CheckBox>
                                    </td>
                                    <td>
                                        <asp:Label ID="lblMainRM" CssClass="lbl" runat="server" Text="Main RM" />
                                    </td>
                                    <td>
                                        <asp:TextBox runat="server" ID="txtMainRM_ID" class="txt" Width="125px" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="cboMainRM" CssClass="dropdown" runat="server" AutoPostBack="true" Width="125px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>

                                <tr>
                                    <td colspan="2"></td>
                                    <td>
                                        <asp:Button ID="btnApply" runat="server" class="btn" Text="Apply" Width="125px"></asp:Button>
                                    </td>

                                    <td>
                                        <asp:Button ID="btnCancel" runat="server" class="btn" Text="Cancel" Width="125px"></asp:Button>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>

                        <%--------------------------------- SEARCH PANEL ----------------------------------------------------%>

                        <asp:Panel ID="searchPanel" runat="server" CssClass="pnlPopUpProduct draggable">
                            <table class="fldPopUpUpper" cellspacing="2" style="width: 100%;">
                                <tr>
                                    <td style="text-align: left;">
                                        <asp:Label ID="lblProductSrch" class="lbl" runat="server" Text="Product"></asp:Label>

                                    </td>
                                    <td>
                                        <asp:TextBox runat="server" ID="txtSearch" class="txtBox txt" Width="160px" onkeydown="return SearchBoxEnterEvent(event)" /></td>
                                    <td>
                                        <asp:Button ID="btnSearch" runat="server" class="btn" Text="Search"></asp:Button></td>
                                    <td>
                                        <asp:Button ID="btnLoadAll" runat="server" class="btn" Text="Load All"></asp:Button></td>
                                    <td>
                                        <asp:Button ID="btnApplySchBx" runat="server" class="btn" Text="Apply"></asp:Button></td>
                                    <td>
                                        <asp:Button ID="btnCloseSearch" runat="server" class="btn btnCloseSearch" Text="X"></asp:Button></td>
                                </tr>
                            </table>

                            <table class="fldPopUpLower">
                                <asp:GridView ID="grdProductSearch" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3"
                                    CssClass="Grid" PageSize="8" AllowPaging="true" ShowHeaderWhenEmpty="true">

                                    <SelectedRowStyle CssClass="GridItemSelect wid" BackColor="#f7f7f7" />
                                    <RowStyle CssClass="GridItem" />
                                    <HeaderStyle CssClass="GridHeader" />
                                    <FooterStyle CssClass="GridFooter" />
                                    <PagerStyle CssClass="GridPager" />

                                    <PagerSettings Mode="NumericFirstLast"
                                        FirstPageText="First"
                                        LastPageText="Last"
                                        Position="Bottom" />

                                    <EmptyDataTemplate>
                                        <asp:Label ID="lblqueuedatagrid" runat="server" Text="No data found."></asp:Label>
                                    </EmptyDataTemplate>
                                    <Columns>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="intcheckbox" runat="server" CssClass="checkbx"></asp:CheckBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="ID" runat="server">
                                            <ItemTemplate>
                                                <asp:Label ID="lblProductID" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Note_Master_ID").ToString)%>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                        <asp:TemplateField HeaderText="Product Name" runat="server">
                                            <ItemTemplate>
                                                <asp:Label ID="lblProduct_Name" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Product_Name").ToString)%>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>

                                    </Columns>
                                </asp:GridView>
                            </table>
                        </asp:Panel>

                        <%------------------------------------------- PAYMENT SCHEDULE ---------------------------------------------------------------------%>

                        <asp:UpdatePanel ID="updPnlPaymentSchedule" runat="server" class="PanelPad" UpdateMode="Conditional">

                            <ContentTemplate>
                                <asp:UpdateProgress ID="UpdateProgress10" runat="server" AssociatedUpdatePanelID="updPnlPaymentSchedule"
                                    DisplayAfter="0">
                                    <ProgressTemplate>
                                        <div class="divLoading">
                                            <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px; margin-left: 200px;" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                        </div>
                                    </ProgressTemplate>
                                </asp:UpdateProgress>

                                <asp:Panel ID="pnlPaymentSchedule" runat="server" CssClass="pnlPopUp pnlPaySc draggable">
                                    <table class="fldPopUpUpper" style="width: 100%;">
                                        <tr>
                                            <asp:Label ID="lblErrorPayschedule" runat="server" Style="color: green"></asp:Label>
                                        </tr>

                                        <tr>
                                            <td style="text-align: left; width: 80px;">
                                                <asp:Label ID="lblDealNum" class="lbl" runat="server" Text="Deal Number"></asp:Label>
                                            </td>

                                            <td>
                                                <asp:Label ID="lblDealNo" class="lbl" runat="server"></asp:Label>
                                            </td>

                                            <td></td>

                                            <td style="width: 160px;">
                                                <asp:Label ID="lblSch" class="lbl" runat="server" Text="Schedules (Processed/Total)"></asp:Label>
                                            </td>

                                            <td>
                                                <asp:Label ID="lblProcessedByTotalSchedule" class="lbl" runat="server" Text="22/22"></asp:Label>
                                            </td>

                                            <td>
                                                <asp:CheckBox ID="chbSkipZero_Payments" Text="Show zero amount payments" AutoPostBack="True" onclick="SetpnlPayShedulePosition()" runat="server" /><br>
                                            </td>

                                            <td style="text-align: right;">
                                                <asp:Button ID="btnPaySchToExcel" runat="server" CssClass="btn btnExcel" Width="28px" Text="" title="Export To Excel"></asp:Button>
                                            </td>

                                            <td>
                                                <asp:Button ID="btnPaySchClose" runat="server" class="btn" Text="Close"></asp:Button>
                                            </td>
                                        </tr>
                                    </table>

                                    <table class="fldPopUpLower">
                                        <asp:GridView ID="grdPaymentSchedule" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3"
                                            CssClass="Grid" PageSize="10" AllowPaging="true" ShowHeaderWhenEmpty="true">
                                            <SelectedRowStyle CssClass="GridItemSelect wid" BackColor="#f7f7f7" />
                                            <RowStyle CssClass="GridItem" />
                                            <HeaderStyle CssClass="GridHeader" />
                                            <FooterStyle CssClass="GridFooter" />
                                            <PagerStyle CssClass="GridPager" />

                                            <PagerSettings Mode="NumericFirstLast"
                                                FirstPageText="First"
                                                LastPageText="Last"
                                                Position="Bottom" />

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

                                                <asp:TemplateField HeaderText="Sr. No." runat="server" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="width3" ItemStyle-CssClass="width3" ControlStyle-CssClass="width3">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSrNo" CssClass="lbl" runat="server" Text='' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Series No." Visible="false" runat="server">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSeries_No" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Series_No").ToString)%>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Schedule Date" runat="server" ControlStyle-CssClass="width4" HeaderStyle-CssClass="width4" ItemStyle-CssClass="width4">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSchedule_Date" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RS_Schedule_Date").ToString)%>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Processing Date" runat="server" ControlStyle-CssClass="width4" HeaderStyle-CssClass="width4" ItemStyle-CssClass="width4">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblProcessing_Date" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RS_Schedule_PreDate").ToString)%>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Processed" runat="server" ControlStyle-CssClass="width4" HeaderStyle-CssClass="width4" ItemStyle-CssClass="width4">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblProcessedYN" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RS_status").ToString)%>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Ccy/Share" runat="server" ControlStyle-CssClass="width5" HeaderStyle-CssClass="width5" ItemStyle-CssClass="width5">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCurrency" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RH_Asset").ToString)%>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Event" runat="server" ControlStyle-CssClass="width6" HeaderStyle-CssClass="width6" ItemStyle-CssClass="width6">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblRh_Action_Class" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RH_ACTION_CLASS").ToString)%>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Payment Amt/Qty" runat="server" ItemStyle-HorizontalAlign="Right" ControlStyle-CssClass="width7" HeaderStyle-CssClass="width7" ItemStyle-CssClass="width7">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblPayment_Amount" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RH_Formula").ToString)%>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                    </table>
                                </asp:Panel>

                            </ContentTemplate>

                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="grdDealDetails" EventName="RowCommand" />
                            </Triggers>

                        </asp:UpdatePanel>

                        <%------------------------------------------------- Payment Deatils Context Menu -----------------------------------------------------------------------------------%>
                        <asp:Panel ID="pnlPaymentDetails" runat="server" CssClass="pnlPopUp draggable">
                            <fieldset class="fldPrdDealDtls">
                                <legend>
                                    <asp:Label ID="lblPrdDealNo" CssClass="lbl" runat="server" Text='' />
                                </legend>
                                <table>
                                    <tr>
                                        <td style="width: 150px;">
                                            <asp:Label ID="lblTradeDt" CssClass="lbl" runat="server" Text='Trade Date' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblTradedate" CssClass="lbl" runat="server" Text='' />
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <asp:Label ID="Label2" CssClass="lbl" runat="server" Text='Value Date' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblValuedate" CssClass="lbl" runat="server" Text='' />
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <asp:Label ID="Label4" CssClass="lbl" runat="server" Text='Fixing Date' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblFixingdate" CssClass="lbl" runat="server" Text='' />
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <asp:Label ID="Label6" CssClass="lbl" runat="server" Text='Maturity Date' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblMaturitydate" CssClass="lbl" runat="server" Text='' />
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <asp:Label ID="Label8" CssClass="lbl" runat="server" Text='Payment (Y\N)' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblPaymentYN" CssClass="lbl" runat="server" Text='' />
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <asp:Label ID="Label10" CssClass="lbl" runat="server" Text='Payment Mode' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblPaymentmode" CssClass="lbl" runat="server" Text='' />
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <asp:Label ID="Label3" CssClass="lbl" runat="server" Text='Asset' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblAsset" CssClass="lbl" runat="server" Text='' />
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <asp:Label ID="Label7" CssClass="lbl" runat="server" Text='Amount' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblAmount" CssClass="lbl" runat="server" Text='' />
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <asp:Label ID="Label11" CssClass="lbl" runat="server" Text='Odd Lots' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblOddlots" CssClass="lbl" runat="server" Text='' />
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </asp:Panel>

                        <%-------------------------------------------------------- Deal Details Pop Up -----------------------------------------------------------------------------%>
                        <asp:UpdatePanel ID="updPnlDealDetails" runat="server" class="PanelPad" UpdateMode="Conditional">

                            <ContentTemplate>
                                <asp:UpdateProgress ID="UpdateProgress9" runat="server" AssociatedUpdatePanelID="updPnlDealDetails"
                                    DisplayAfter="0">
                                    <ProgressTemplate>
                                        <div class="divLoading">
                                            <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px; margin-left: 200px;" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                                        </div>
                                    </ProgressTemplate>
                                </asp:UpdateProgress>

                                <asp:Panel ID="pnlDealDetails" runat="server" CssClass="pnlPopUp1 draggable">
                                    <fieldset class="fldPrdDealDtls">
                                        <legend>Deal Details
                        <asp:Button ID="btnPrdDealDetailsClose" runat="server" class="btn btnClose" Text="X" OnCommand="btnPrdDealDetailsClose_Click"></asp:Button>
                                        </legend>
                                        <table>
                                            <tr>
                                                <td style="width: 150px;">
                                                    <asp:Label ID="Label9" CssClass="lbl" runat="server" Text='Note Deal Id' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblnote_deal_id" CssClass="lbl" runat="server" Text='' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 1px;"></td>
                                            </tr>

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label13" CssClass="lbl" runat="server" Text='Product Name' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblproduct_name" runat="server" Text='' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 2px;"></td>
                                            </tr>

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label15" CssClass="lbl" runat="server" Text='Tenor' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lbltenor" CssClass="lbl" runat="server" Text='' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 2px;"></td>
                                            </tr>

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label17" CssClass="lbl" runat="server" Text='Note Currency' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblnotecurrency" CssClass="lbl" runat="server" Text='' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 2px;"></td>
                                            </tr>

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label19" CssClass="lbl" runat="server" Text='Nominal Amount' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblnominalamt" CssClass="lbl" runat="server" Text='' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 2px;"></td>
                                            </tr>

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label21" CssClass="lbl" runat="server" Text='Trade Date' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblDealtradedate" CssClass="lbl" runat="server" Text='' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 2px;"></td>
                                            </tr>

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label23" CssClass="lbl" runat="server" Text='Maturity Date' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblDealmaturitydate" CssClass="lbl" runat="server" Text='' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 2px;"></td>
                                            </tr>

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label14" CssClass="lbl" runat="server" Text='Issuer' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblissuerid" CssClass="lbl" runat="server" Text='' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 2px;"></td>
                                            </tr>

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label5" CssClass="lbl" runat="server" Text='Dealer Name' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lbldealername" CssClass="lbl" runat="server" Text='' />
                                                </td>
                                            </tr>

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

                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label12" CssClass="lbl" runat="server" Text='Asset code' />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblassetcode" CssClass="lbl" runat="server" Text='' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 1px;"></td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </asp:Panel>

                            </ContentTemplate>

                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="grdDealDetails" EventName="RowCommand" />
                            </Triggers>

                        </asp:UpdatePanel>

                        <%---------------------------------------------------------------- Termsheet --------------------------------------------------------------------------%>
                        <asp:Panel ID="pnlTermsheet" runat="server" CssClass="pnlPopUp draggable">
                            <fieldset class="fldTermsheet">
                                <legend>
                                    <asp:Button ID="btnDocClose" runat="server" class="btn btnDocClose" Text="X" OnCommand="btnDocClose_Click"></asp:Button>
                                </legend>
                                <asp:GridView ID="grdDocuments" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3"
                                    CssClass="Grid alignGrid" PageSize="10" ShowHeaderWhenEmpty="true">
                                    <SelectedRowStyle CssClass="GridItemSelect wid" BackColor="#f7f7f7" />
                                    <RowStyle CssClass="GridItem" />
                                    <HeaderStyle CssClass="GridHeader" />
                                    <FooterStyle CssClass="GridFooter" />
                                    <PagerStyle CssClass="GridPager" />

                                    <PagerSettings Mode="NumericFirstLast"
                                        FirstPageText="First"
                                        LastPageText="Last"
                                        Position="Bottom" />

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

                                        <asp:TemplateField HeaderText="Sr. No." Visible="false" ItemStyle-Width="100px" runat="server">
                                            <ItemTemplate>
                                                <asp:Label ID="SrNo_COL" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.SrNo_COL").ToString)%>' />
                                            </ItemTemplate>

                                        </asp:TemplateField>

                                    </Columns>
                                </asp:GridView>
                            </fieldset>
                        </asp:Panel>

                        <asp:Panel ID="EmailPanel" runat="server" CssClass="pnlPopUpEmail draggable" Visible="false">
                            <table class="fldPopUpUpper" cellspacing="2" style="width: 100%;">
                                <tr>
                                    <asp:Label ID="lblEmailError" runat="server">

                                    </asp:Label>
                                </tr>
                                <tr>
                                    <td style="text-align: left;">
                                        <asp:Label ID="lblTo" class="lbl" runat="server" Text="To"></asp:Label>

                                    </td>

                                    <td>
                                        <asp:TextBox runat="server" ID="txtTo" class="txtBox txt" Width="160px" /></td>
                                    <td>

                                    <td style="text-align: left;">
                                        <asp:Label ID="lblCC" class="lbl" runat="server" Text="CC"></asp:Label>

                                    </td>

                                    <td>
                                        <asp:TextBox runat="server" ID="txtCC" class="txtBox txt" Width="160px" /></td>
                                    <td>
                                        <asp:Button ID="btnYes" runat="server" class="btn" Text="Yes" OnClick="btnYes_Click"></asp:Button></td>
                                    <td>
                                        <asp:Button ID="btnNo" runat="server" class="btn" Text="No" OnClick="btnNo_Click"></asp:Button></td>
                                </tr>
                            </table>
                        </asp:Panel>

                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnPaySchToExcel" />
            <asp:PostBackTrigger ControlID="btnEvtExporttoExcel" />
            <asp:PostBackTrigger ControlID="btnToExcelDeal" />
            <asp:AsyncPostBackTrigger ControlID="Cal_Events" />
        </Triggers>

    </asp:UpdatePanel>

    <script type="text/javascript">

        window.onload = function () {


            $("#ctl00_MainContent_grdProductEventGrid").css("height", "400px !important");
        }

        Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function (evt, args) {
            $('#ctl00_MainContent_ddlevent_mul_colDDImage').on("click", function () {
                document.getElementById('<%=btnLoad.ClientID%>').click();
            });
        });

        function EvntButtonClicked(ButtonId) {
            document.getElementById('<%=HiddenFieldEventArgs.ClientID%>').value = ButtonId;
            document.getElementById('<%=Button1.ClientID%>').click();
        }

        function SetDateSelectedColor(ButtonId) {
            $(".SelectedDate").css("background-color", "");
            $(".SelectedDate").removeClass("SelectedDate");
            $("#" + ButtonId).parent().addClass("SelectedDate");
            $("#" + ButtonId).parent().css("background-color", "lightgray !important");
        }

        function GenerateReport() {
            window.open("Report.aspx?Master_Popup=POPUP", "_blank", "resizable=no", false);
        }

        function HideSortFilter() {
            if ($('#ctl00_MainContent_btnHideSort1').attr("class") == 'btnMin') {

                $('#ctl00_MainContent_SortTableToHide').show();

                $('#btnHideSort1').attr("class", "btnMin");
                document.getElementById('<%= ShowHide.ClientID %>').value = '1';
            }
        }

        function ShowSortFilter() {
            if ($('#ctl00_MainContent_btnShowSort1').attr("class") == 'btnMax') {

                $('#ctl00_MainContent_SortTableToHide').hide();
                $('#ctl00_MainContent_btnShowSort1').attr("class", "btnMax");
                document.getElementById('<%= ShowHide.ClientID %>').value = '0';
            }
        }

        function HideDealSortFilter() {

            if ($('#ctl00_MainContent_btnDealHide').attr("class") == 'btnMin1') {
                $('#ctl00_MainContent_divDealDetailsGrid').show();
                $('#ctl00_MainContent_btnDealHide').attr("class", "btnMin1");
                document.getElementById('<%= ShowHideDeal.ClientID%>').value = '1';
            }
        }

        function ShowDealSortFilter() {
            if ($('#ctl00_MainContent_btnDealShow').attr("class") == 'btnMax1') {
                $('#ctl00_MainContent_divDealDetailsGrid').hide();
                $('#ctl00_MainContent_btnDealShow').attr("class", "btnMax1");
                document.getElementById('<%= ShowHideDeal.ClientID%>').value = '0';
            }
        }

        function SearchBoxEnterEvent(e) {
            if (e.keyCode == 13) {
                document.getElementById('<%=btnSearch.ClientID%>').click();
            }
        }

        $(function () {

            var rx = /INPUT|SELECT|TEXTAREA/i;

            $(document).bind("keydown keypress", function (e) {
                if (e.which == 8) { // 8 == backspace
                    if (!rx.test(e.target.tagName) || e.target.disabled || e.target.readOnly) {
                        e.preventDefault();
                    }
                }
            });
        });

        $(document).ready(function () {
            dragAndDrop();
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(dragAndDrop);

        });

        function dragAndDrop() {
            $(".draggable").draggable();
        }
    </script>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:HiddenField ID="ShowHide" runat="server" />
            <asp:HiddenField ID="ShowHideDeal" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>

    <asp:HiddenField ID="hdnNMID" runat="server" />
    <asp:HiddenField ID="hdnTemplateID" runat="server" />
    <asp:HiddenField ID="hdnCustomerName" runat="server" />
    <asp:HiddenField ID="hdnCustomerId" runat="server" />
    <asp:HiddenField ID="HDNDocId" runat="server" />
    <asp:HiddenField ID="hdnProductName" runat="server" />
    <asp:HiddenField ID="Hiddenfield1" runat="server" />
    <asp:HiddenField ID="Hiddenfield2" runat="server" />
</asp:Content>
