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

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

<%--<%@ Register Src="../FinIQ_User_Controls/Smart_Search_Customer_Control/FinIQ_Customer_SmartSearch.ascx"
    TagName="FinIQ_Customer_SmartSearch" TagPrefix="ucsmart" %>--%>

<%@ Register Src="../FinIQ_User_Controls/Smart_Search_Product_Control/Finiq_Product_SmartSearch_Tranche.ascx" TagPrefix="ucprodsmart1" TagName="Finiq_Product_SmartSearch_Tranche" %>

<%--<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>--%>

<asp:content id="Content1" contentplaceholderid="MainContent" runat="Server">

    <script src="../FinIQJS/jquery-1.10.2.js"></script>
    <script src="../FinIQJS/jquery-ui.min.js"></script>
    <link href="../FinIQJS/jquery-ui.min.css" rel="stylesheet" />


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

    <style>
        #TabContainer {
            background-color: #FFFFFF;
        }

            #TabContainer li {
                background: none !important;
                background-color: #ededed!important;
                border:none;
            }

        .ui-widget-header {
            border: none;
            background-color: none;
        }

        .ui-state-hover {
            border: 1px solid #00ADEF;
        }

        .ui-state-active a, .ui-state-active a:link {
            color: #00ADEF !important;
            background-color: #F1F1F1 !important;
        }

        .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited {
            color: #333333;
        }

        .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
            border: 1px solid #00ADEF;
        }

        /*.UpperContainer {
            min-width: 1850px;
            float: left;
        }

        .UpperContainer2 {
            float: left;
            width: 480px;
            margin-left: 6px;
        }*/

        .UpperOuterContainerTable {
            float: left;
        }

        .button {
            margin-left: 10px;
        }

        .tdButton {
            width: 194px;
        }

        .LowerContainer {
            min-width: 1850px;
            float: left;
            max-height: 1400px;
            border: none;
        }

        .tabBtn {
            display: none;
        }

        .tabSize {
            max-height: 100%;
            overflow: hidden;
        }

        .ui-tabs {
            z-index: 1;
        }

        .txtPadding {
            padding-left: 6px;
        }

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

        /*.ui-widget-content {
            border: none !important;
        }*/

        .ui-tabs .ui-tabs-panel {
            padding: 0px !important;
        }

        .ui-tabs .ui-tabs-nav {
            padding: 0px;
        }

        .ui-button {
            padding: 0px;
        }

        .tdLabel {
            width: 100px;
        }

        .tdLabelShort {
            width: 40px;
        }

        .tdLong {
            width: 218px;
        }

        .tdFilter {
            width: 388px;
        }

        .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus {
            border: none !important;
        }


        /*#ctl00_MainContent_FindCustSmart_ddlCustSearch-button, #ctl00_MainContent_FindCustSmart_ddlCustSearch {
            display: none !important;
        }*/

        .lstBox {
            display: block !important;
            height: 124px;
            width: 669px;
        }

        #ctl00_MainContent_lstBoxAuditTrail-button {
            display: none !important;
        }

        .lineHeight {
            height: 6px;
        }

        .gridCol {
            width: 74px;
            /*white-space:nowrap;*/
        }

        .gridColSummary {
            width: 100px;
            /*  white-space:nowrap;*/
        }

        .gridVerifiedCol {
            width: 149px;
        }

        .counterParty {
            width: 420px;
        }

        .Product {
            width: 500px;
        }

        .css-lb {
            overflow: hidden;
        }

        .colDate {
            width: 80px;
        }

        .colPreview {
            width: 130px;
        }

        .lblName {
            font: normal 17px verdana !important;
            color: #2c4e80;
            height: 28px;
            padding: 0px;
            vertical-align: top;
            text-align: left;
            white-space: nowrap;
        }

        .Popup {
            background-color: #f9f9f9;
            border-width: 1px;
            border-style: solid;
            border-color: black;
            width: 300px;
            height: 100px;
            position: absolute;
            top: 40%;
            left: 40%;
            z-index: 9999 !important;
            display: none;
        }

        /*.ui-dialog .ui-dialog-content {
            min-height: 100px !important;
            background: #f2f2f2;
        }*/

        .btnClose {
            background-image: url(../App_Resources/Close.png);
            background-repeat: no-repeat;
            background-color: Transparent;
            width: 22px !important;
            height: 20px;
            border-collapse: collapse;
            border-style: none;
            margin-left: 280px;
            margin-top: 2px;
            margin-bottom: 2px;
        }

        .header {
            background: #d2d2d2;
        }

        p {
            text-align: center;
            /*padding-top: 10px;*/
        }

        #ctl00_MainContent_divProcessedSummary a, .Grid a:link {
            color: #3B66D6;
        }

        .lblChk {
            margin-left: 4px;
        }

        .chkbox {
            margin-top: 6px;
        }

        .gridPS1 {
            min-width: 1663px;
        }

        .Grid th {
            border: solid 1px #dddddd;
            background-color: #ededed !important;
        }

        .GridHeader {
            color: black !important;
            border: solid 1px #dddddd;
            background-color: #ededed !important;
            padding-left: 6px;
        }

        .btn {
            height: 28px !important;
            border-radius: 5px;
        }

        .lblLeft {
            margin-left: 10px;
        }

        .tdWidthBtnInner {
            width: 121px !important;
        }

        /* ------------------------------used in code behind ---------------------------------------*/

        .Enabled-button {
            width: 125px;
            cursor: pointer;
        }

        .Disabled-button {
            width: 125px;
            cursor: not-allowed;
        }

        #ctl00_MainContent_ProductSearch_autompleteprod1, #ctl00_MainContent_txtCounterParty {
            width: 214px !important;
        }

        .lblBlotterPaddingRight {
            padding-right: 15px !important;
            white-space: nowrap !important;
        }

        .ctlBlotterPaddingRight {
            padding-right: 30px !important;
            white-space: nowrap !important;
        }

        .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
            margin: 0px 120px 0px 0px;
        }

        .ui-dialog .ui-dialog-buttonpane button {
            width:64px !important;
        }

        .ui-dialog-content ui-widget-content {
            min-height:40px !important;
        }

        .noborder {
            border:none!important;
        }

        /*.border {
            background-color: #fbf9f9 !important;
            border-width: 1px !important;
            border-style: solid;
            border-color: black;
        }*/

        /*.ui-dialog-buttonpane .ui-widget-content .ui-helper-clearfix {
            background-color:#e1dede !important;
        }*/

        .ui-dialog .ui-dialog-buttonpane {
            border-width:0 0 0 0 !important;
        }

        .hundredFifty {
            min-width:150px;
            max-width:150px;
        }
    </style>

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

            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanelCP"
                DisplayAfter="0">
                <ProgressTemplate>
                    <div class="divLoading">
                        <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading...&nbsp;&nbsp;</span>
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>

            <asp:UpdatePanel ID="UpdatePanel1" runat="server" class="PanelPad" UpdateMode="Always">
                <ContentTemplate>
                    <asp:Label runat="server" ID="lblError" CssClass="lblerror"> </asp:Label>
                    <asp:Label runat="server" ID="lblProcessMsg" CssClass="lblerror"> </asp:Label>

                    <table>
                        <tr>
                            <td>
                                <table id="tbMain" runat="server" cellpadding="0" cellspacing="0" class="UpperOuterContainerTable">
                                    <tr>
                                        <td class="lblBlotterPaddingRight "><%--style="padding-left: 12px;" class="tdLabelShort"--%>
                                            <asp:Label ID="lblEntity" CssClass="lbl" runat="server" Text="Entity"></asp:Label>
                                            <asp:TextBox runat="server" ID="txtNoteMasterId" Visible="false" />
                                        </td>

                                        <td class=" ctlBlotterPaddingRight"><%--class="tdLong"--%>
                                            <asp:DropDownList ID="ddlEntity" runat="server" AutoPostBack="true" Width="156px">                                                
                                            </asp:DropDownList>
                                        </td>

                                        <%--<td class="tdLabelShort">
                                            <%-- <asp:Label ID="lblFilters" CssClass="lbl" runat="server" Text="Filters :"></asp:Label>
                                            <asp:Label ID="lblExchange" CssClass="lbl" runat="server" Text="Exchange"></asp:Label>
                                        </td>

                                        <td class="tdFilter">
                                            <asp:TextBox runat="server" ID="txtExchange" Width="360px" onkeydown="return txtFilterKeydown(event)" />
                                            <asp:Button ID="btnFiltersSearch" runat="server" CssClass="btnSearch" />
                                        </td>--%>

                                       <%-- <td class="lblBlotterPaddingRight ">
                                            <asp:Label ID="lblFilters" CssClass="lbl" ForeColor="#666666" runat="server" Text="Filters"></asp:Label>
                                        </td>--%>

                                      
                                        <td class="lblBlotterPaddingRight "><%--class="tdLabel" style="padding-left: 12px;"--%>
                                            <asp:Label ID="lblNMId" CssClass="lbl" runat="server" Text="Ref Prod ID"></asp:Label>
                                        </td>

                                        <td class=" ctlBlotterPaddingRight">
                                            <asp:TextBox runat="server" ID="txtTradeId" Width="214px" OnTextChanged="txtTradeId_TextChanged" onkeydown="return txtTradeKeydown(event)" OnKeyPress="return AllowNumericOnly(this);" AutoPostBack="true" />
                                            <asp:Button ID="BtnSearch" runat="server" CssClass="btnSearch" />
                                        </td>
                                        <td ><%--class="tdWidthBtnInner"--%>
                                             <asp:CheckBox ID="chkExtendedView" runat="server" ItemStyle-Width="25px" CssClass="chkbox" AutoPostBack="true"></asp:CheckBox>
                                            <asp:Label ID="Label1" CssClass="lbl lblChk" runat="server" Text="Extended View" style="line-height:18px; vertical-align:top;" ></asp:Label>
                                            <%--<asp:Label ID="lblRows" runat="server">Rows Per Page</asp:Label>
                                            <asp:TextBox ID="TxRowsPerPage" runat="server" Style="text-align: center; margin-left: 3px;" Text="15" OnTextChanged="TxRowsPerPage_TextChanged" AutoPostBack="true" onkeydown="TxRowsPerPage_TextChanged(event)" Width="26"></asp:TextBox>--%>
                                            <%--<asp:Button ID="btnSetPageSize" runat="server" Style="display: none"></asp:Button>--%>
                                        </td>

                                        <td class=" ctlBlotterPaddingRight"><%--class="tdButton"--%>
                                            <asp:Label ID="lblRows" runat="server" style="padding-left:5px;">Rows Per Page</asp:Label>
                                            <asp:TextBox ID="TxRowsPerPage" runat="server" Style="text-align: center; margin-left: 3px;" Text="15" OnTextChanged="TxRowsPerPage_TextChanged" AutoPostBack="true" onkeydown="TxRowsPerPage_TextChanged(event)" Width="26"></asp:TextBox>
                                            <%-- <asp:CheckBox ID="chkExtendedView" runat="server" ItemStyle-Width="25px" CssClass="chkbox" AutoPostBack="true"></asp:CheckBox>
                                            <asp:Label ID="Label1" CssClass="lbl lblChk" runat="server" Text="Extended View"></asp:Label>--%>
                                            <%--<asp:Button ID="btnExcel" runat="server" CssClass="btn button Enabled-button" Text="Export"></asp:Button>--%>
                                        </td>

                                    </tr>

                                    <tr class="lineHeight">
                                        <td colspan="6"></td>
                                    </tr>

                                    <tr>
                                        <%--<td></td>--%>
                                        <%--<td style="padding-left: 12px;">
                                            <asp:Label ID="lblEvents" CssClass="lbl" runat="server" Text="Events :"></asp:Label>
                                        </td>--%>

                                        <td class="lblBlotterPaddingRight "><%--style="padding-left: 12px;" class="tdLabelShort"--%>
                                            <asp:Label ID="lblMode" CssClass="lbl" runat="server" Text="Mode"></asp:Label>
                                        </td>

                                        <td class=" ctlBlotterPaddingRight">
                                            <asp:DropDownList ID="ddlMode" runat="server" AutoPostBack="true" Width="156px">
                                                <asp:ListItem Text="All" Value="All"></asp:ListItem>
                                                <asp:ListItem Text="Deal" Value="Deal"></asp:ListItem>
                                                <asp:ListItem Text="Product" Value="Product"></asp:ListItem>
                                            </asp:DropDownList>
                                        </td>                                       

                                        <%--<td></td>--%>

                                        <%--<td class="tdLabel">
                                            <asp:Label ID="lblUnderlyings" CssClass="lbl" runat="server" Text="Underlyings"></asp:Label>
                                        </td>

                                        <td class="tdFilter">
                                            <asp:TextBox runat="server" ID="txtUnderlyings" Width="360px" onkeydown="return txtUnderlyingKeydown(event)" />
                                        </td>--%>

                                        <td class="lblBlotterPaddingRight "><%--class="tdLabelShort"--%>
                                            <asp:Label ID="lblExchange" CssClass="lbl" runat="server" Text="Exchange"></asp:Label>
                                        </td>

                                        <td class=" ctlBlotterPaddingRight"><%--class="tdFilter"--%>
                                            <%--<asp:TextBox runat="server" ID="txtExchange" Width="360px" OnTextChanged="txtExchange_TextChanged" onkeydown="return txtFilterKeydown(event)" OnKeyPress="return AllowAlphaNumericAndDotOnly(this);" AutoPostBack="true" />--%>

                                            <asp:DropDownList ID="ddlExchange" runat="server" AutoPostBack="true" Width="214px">
                                            </asp:DropDownList>

                                            <asp:Button ID="btnFiltersSearch" runat="server" CssClass="btnSearch" Style="display: none;" />
                                        </td>
                                        
                                        <td>
                                            <asp:CheckBox ID="chkShowDeal" runat="server" ItemStyle-Width="25px" CssClass="chkbox" AutoPostBack="true" Enabled ="false"></asp:CheckBox> 
                                            <asp:Label ID="lblShowDeal" CssClass="lbl lblChk" runat="server" Text="Show Zero Payments" style="line-height:18px; vertical-align:top;" ></asp:Label>
                                        </td>
                                        <td >
                                            <asp:Button ID="btnLoad" runat="server" CssClass="btn Enabled-button" Text="Load Events"></asp:Button>
                                        </td>


                                        <%--<td class="ctlBlotterPaddingRight">
                                            <asp:button ID="btnRuleReset" runat="server" text="Reset Events" enabled="false" CssClass="btn  Enabled-button" style="width:126px !important;"/>
                                        </td>--%>
                                      
                                    </tr>

                                    <tr class="lineHeight">
                                        <td colspan="6">
                                           
                                        </td>
                                    </tr>

                                    <tr>
                                         <td class="lblBlotterPaddingRight"><%--class="tdLabelShort" style="padding-left: 12px;"--%>
                                            <asp:Label ID="lblDateFrom" CssClass="lbl" runat="server" Text="From"></asp:Label>
                                        </td>

                                         <td class=" ctlBlotterPaddingRight">
                                            <uc1:DateControl ID="dtpFrom" runat="server" CalenderCss="btn1" TextBoxCss="txt txtPadding" TextBoxSize="131px" />
                                        </td>

                                        <%-- <td class="lblBlotterPaddingRight">
                                            <asp:RadioButton ID="rdbEventDate" GroupName="date" runat="server" Text="Event Date" AutoPostBack="true" visible="false" />
                                        </td>--%>

                                       <%-- <td  class=" ctlBlotterPaddingRight">
                                            <asp:RadioButton ID="rdbTradeDate" GroupName="date" runat="server" Text="Trade Date" AutoPostBack="true" visible="false" />
                                        </td>                                        --%>

                                        <%--<td class="tdLabel">
                                            <asp:Label ID="lblProduct" CssClass="lbl" runat="server" Text="Product"></asp:Label>
                                        </td>

                                        <td class="tdFilter">
                                            <ucprodsmart1:Finiq_Product_SmartSearch_Tranche runat="server" ID="ProductSearch" />
                                        </td>--%>

                                        <td class="lblBlotterPaddingRight"><%--class="tdLabel"--%>
                                            <asp:Label ID="lblUnderlyings" CssClass="lbl" runat="server" Text="Underlyings"></asp:Label>
                                        </td>

                                        <td class=" ctlBlotterPaddingRight"><%--class="tdFilter"--%>
                                            <%--<asp:TextBox runat="server" ID="txtUnderlyings" Width="360px" OnTextChanged="txtUnderlyings_TextChanged" onkeydown="return txtFilterKeydown(event)" OnKeyPress="return AllowAlphaNumericAndDotOnly(this);" AutoPostBack="true" />--%>
                                             <asp:DropDownList ID="ddlUnderlyings" runat="server" AutoPostBack="true" Width="214px">
                                            </asp:DropDownList>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnprocess" runat="server" CssClass="btn" Width="145px" Text="Process Events" onclientclick="confirmDialog();"></asp:Button> <%--Enabled-button--%>
                                           <%-- <asp:CheckBox ID="chkExtendedView" runat="server" ItemStyle-Width="25px" CssClass="chkbox" AutoPostBack="true"></asp:CheckBox>
                                            <asp:Label ID="Label1" CssClass="lbl lblChk" runat="server" Text="Extended View"></asp:Label>--%>
                                        </td>

                                        <%--<td class=" ctlBlotterPaddingRight">
                                            <asp:Button ID="btnExcel" runat="server" CssClass="btn  Enabled-button" style="width:126px !important;" Text="Export"></asp:Button>
                                            <asp:Label ID="lblRow" CssClass="lbl lblLeft" runat="server" Visible="false" Text="Total Row(s) :"></asp:Label>
                                            <asp:Label ID="lblRowCnt" CssClass="lbl lblChk" runat="server" Visible="false" Text=""></asp:Label>
                                        </td>--%>

                                        <td class="ctlBlotterPaddingRight"><%--class="tdButton"--%>
                                            <asp:button ID="btnRuleReset" runat="server" text="Reset Events" enabled="false" CssClass="btn  Enabled-button" style="width:126px !important;"/>
                                        </td>
                                    </tr>

                                    <tr class="lineHeight">
                                        <td></td>
                                    </tr>

                                    <tr>

                                       <%--<td class="lblBlotterPaddingRight">
                                            <asp:Label ID="lblDateFrom" CssClass="lbl" runat="server" Text="From"></asp:Label>
                                        </td>--%>

                                       <%-- <td class=" ctlBlotterPaddingRight">
                                            <uc1:DateControl ID="dtpFrom" runat="server" CalenderCss="btn1" TextBoxCss="txt txtPadding" TextBoxSize="124px" />
                                        </td>--%>

                                        <td class="lblBlotterPaddingRight">
                                            <asp:Label ID="lblTo" CssClass="lbl" runat="server" Text="To"></asp:Label>
                                            <asp:Label ID="Label2" CssClass="lbl" runat="server" Text="("></asp:Label>
                                            <asp:LinkButton ID="lnkDay" runat="server" Text="D"></asp:LinkButton>
                                            <asp:LinkButton ID="lnkWeek" runat="server" Text="W"></asp:LinkButton>
                                            <asp:LinkButton ID="lnkMonth" runat="server" Text="M"></asp:LinkButton>
                                            <asp:LinkButton ID="lnkFrom" runat="server" Text="F"></asp:LinkButton>
                                            <asp:Label ID="Label3" CssClass="lbl" runat="server" Text=")"></asp:Label>
                                        </td>

                                        <td class=" ctlBlotterPaddingRight">
                                            <uc1:DateControl ID="dtpTo" runat="server" CalenderCss="btn1" TextBoxCss="txt txtPadding" TextBoxSize="131px" />
                                        </td>

                                        
                                        
                                        <%--<td class="tdLabel">
                                            <asp:Label ID="lblCounterparty" CssClass="lbl" runat="server" Text="Counterparty"></asp:Label>
                                        </td>

                                        <td class="tdFilter">
                                            <asp:TextBox runat="server" ID="txtCounterParty" Width="360px" onkeydown="return txtFilterKeydown(event)" />
                                        </td>--%>

                                        <td class="lblBlotterPaddingRight "><%--class="tdLabel"--%>
                                            <asp:Label ID="lblProduct" CssClass="lbl" runat="server" Text="Product"></asp:Label>
                                        </td>

                                        <td class=" ctlBlotterPaddingRight"><%--class="tdFilter"--%>
                                            <ucprodsmart1:Finiq_Product_SmartSearch_Tranche runat="server" ID="ProductSearch" />
                                        </td>
                                        <td  colspan="1" ><%--style="width:310px;"--%><%--class=" ctlBlotterPaddingRight"--%>
                                                                                   
                                              <asp:Button ID="btnIndexMaster" runat="server" CssClass="btn " Width="145px" Text="Update Fixing Prices" visible="false"></asp:Button><%--Enabled-button--%>                                        
                                        </td>
                                        <td class=" ctlBlotterPaddingRight">
                                            <asp:Button ID="btnExcel" runat="server" CssClass="btn  Enabled-button" style="width:126px !important;" Text="Excel"></asp:Button>
                                            <asp:Label ID="lblRow" CssClass="lbl lblLeft" runat="server" Visible="false" Text="Total Row(s) :"></asp:Label>
                                            <asp:Label ID="lblRowCnt" CssClass="lbl lblChk" runat="server" Visible="false" Text=""></asp:Label>
                                        </td>

                                    </tr>

                                    <tr class="lineHeight">
                                        <td></td>
                                    </tr>

                                    <tr>

                                        <%--<td class="lblBlotterPaddingRight">
                                            <asp:Label ID="lblTo" CssClass="lbl" runat="server" Text="To"></asp:Label>
                                        </td>--%>

                                        <%--<td class=" ctlBlotterPaddingRight">
                                            <uc1:DateControl ID="dtpTo" runat="server" CalenderCss="btn1" TextBoxCss="txt txtPadding" TextBoxSize="124px" />
                                        </td>--%>

                                        <td class="lblBlotterPaddingRight">
                                            <asp:Label runat="server" Text="Rule Batch" ID="lblRMRuleBatch"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:DropDownList runat="server" ID="ddlRMRuleBatch" Width="156px" AutoPostBack="true" >

                                               <%-- <asp:ListItem>FIXING</asp:ListItem>
                                        <asp:ListItem>CORPACT</asp:ListItem>--%>
                                            </asp:DropDownList>
                                        </td>

                                        


                                        <%-------------------- Client Search removed as asked by Pramod G || On 16-Feb-2017--------%>
                                        <%--<td class="tdLabel">
                                            <asp:Label ID="lblCust" CssClass="lbl" runat="server" Text="Client"></asp:Label>
                                        </td>

                                        <td class="tdFilter">
                                            <ucsmart:FinIQ_Customer_SmartSearch runat="server" Width="360px" SetTabIndex="1" ID="FindCustSmart" />
                                            <%--<asp:TextBox ID="txtClientId" runat="server" Width="26"></asp:TextBox>--
                                        </td>--%>

                                        <td class="lblBlotterPaddingRight"><%--class="tdLabel"--%>
                                            <asp:Label ID="lblCounterparty" CssClass="lbl" runat="server" Text="Counterparty"></asp:Label>
                                        </td>

                                        <td class=" ctlBlotterPaddingRight" ><%--class="tdFilter"--%>
                                            <asp:TextBox runat="server" ID="txtCounterParty" Width="360px" OnTextChanged="txtCounterParty_TextChanged" onkeydown="return txtFilterKeydown(event)" OnKeyPress="return AllowAlphaNumericAndDotOnly(this);" AutoPostBack="true" />
                                        </td>
                                        <td class=" ctlBlotterPaddingRight" colspan="2" style="width:310px;">
                                              <asp:Label ID="lblTabName" CssClass="lblName" runat="server" Text=""></asp:Label>     
                                        </td>
                                    </tr>

                                    <tr class="lineHeight">
                                        <td colspan="6"></td>
                                    </tr>
                                    
                                    <tr>
                                        <%--<td class="lblBlotterPaddingRight">
                                            <asp:Label runat="server" Text="Rule Batch" ID="lblRMRuleBatch"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:DropDownList runat="server" ID="ddlRMRuleBatch" Width="156px" AutoPostBack="true" ></asp:DropDownList>
                                        </td>--%>

                                         <td class="lblBlotterPaddingRight">
                                            <asp:RadioButton ID="rdbEventDate" GroupName="date" runat="server" Text="Event Date" AutoPostBack="true" visible="false" />
                                        </td>

                                        <td  class=" ctlBlotterPaddingRight">
                                            <asp:RadioButton ID="rdbTradeDate" GroupName="date" runat="server" Text="Trade Date" AutoPostBack="true" visible="false" />
                                        </td>  
                                    </tr>

                                    <tr class="lineHeight">
                                        <td colspan="6"></td>
                                    </tr>

                                </table>
                            </td>

                            <td ></td>  <%--style="width: 20px;"--%>

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

                                <table class="TableMarginLeft">
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblActions" CssClass="lbl" ForeColor="#666666" runat="server" Text="Actions Performed"></asp:Label>
                                        </td>
                                    </tr>

                                    <tr class="lineHeight"></tr>

                                    <tr>
                                        <td>
                                            <div class="css-lb">
                                                <%--<asp:ListBox ID="lstBoxAuditTrail" runat="server" class="lstBox" Rows="12" OnLoad="DeactivateElements"></asp:ListBox>--%>
                                                <asp:ListBox ID="lstBoxAuditTrail" runat="server" CssClass="lstBox" Rows="12"></asp:ListBox>
                                            </div>
                                        </td>
                                    </tr>
                                </table>

                            </td>
                        </tr>

                       
                    </table>



                </ContentTemplate>
            </asp:UpdatePanel>
            <fieldset class="LowerContainer">
                <div id="tabs" runat="server" class="noborder"> <%--class="noborder"--%>
                    <div id="listTabs" runat="server">
                    <ul id="TabContainer">
                        <li><a href="#tabPending" id="lnkPending" runat="server" onclick="return tabPendingClicked()">Pending Events</a></li>
                        <%--<li><a href="#tabPreview" id="lnkPreview" onclick="return tabPreviewClicked()">Preview of Results</a></li>--%>
                        <li><a href="#tabProcessedSummary" id="lnkProcessedSummary" runat="server" onclick="return tabProcessedSummary()">Summary of Events Processed</a></li>
                        <li><a href="#tabVerified" id="lnkVerified" runat="server" onclick="return tabVerifiedClicked()">Verified Events</a></li>
                    </ul>
                    </div>

                    <div id="tabPending" class="tabSize">
                        <asp:Button ID="btnPending" runat="server" CssClass="tabBtn"></asp:Button>
                        <div runat="server" id="DivPending" >
                            <asp:GridView ID="dgEVTFIXPending" runat="server" AllowSorting="True"  AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3" PageSize="15" PagerStyle-Height="32px"
                                AllowPaging="true" CssClass="Grid" ShowHeaderWhenEmpty="true" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" HeaderStyle-CssClass="GridHeaderTitle">

                                <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>
                                        <HeaderStyle Wrap="False" Width="25px" HorizontalAlign="Center" />
                                        <ItemStyle Wrap="false" Width="25px" HorizontalAlign="Center" />
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="chkAllPending" runat="server" AutoPostBack="true" OnCheckedChanged="checkAllCheckChanged"></asp:CheckBox>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="checkBox_COL" runat="server" onclick="setColor(this)"></asp:CheckBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Ref Prod ID" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle CssClass="gridCol" HorizontalAlign="Right" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblNoteMasterIdPending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Note_Master_ID").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

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

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

                                    <asp:TemplateField HeaderText="Trade ID" Visible="false" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <%-- CssClass="gridCol" --%>
                                        <ItemStyle CssClass="gridCol" />
                                        <%--CssClass="gridCol" --%>
                                        <ItemTemplate>
                                            <asp:Label ID="lblTradeNoPending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.FinIQTradeNo").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Link No" Visible="false" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <%-- CssClass="gridCol" --%>
                                        <ItemStyle HorizontalAlign="Left" CssClass="gridCol" />
                                        <%--CssClass="gridCol"--%>
                                        <ItemTemplate>
                                            <asp:Label ID="lblLinkNoPending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Link_No").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

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

                                    <asp:TemplateField HeaderText="Original Strike" Visible="false" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle CssClass="gridCol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblStrikePercentPending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Strike_Price_Percentage").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

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

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

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

                                    <asp:TemplateField HeaderText="Nominal/Quantity" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle CssClass="gridCol" HorizontalAlign="Right" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblNominalPending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Nominal","{0:n}").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Underlyings" runat="server">
                                        <HeaderStyle CssClass="hundredFifty" />
                                        <ItemStyle CssClass="hundredFifty" Wrap="true" HorizontalAlign="Left" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblUnderlyingsPending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.NM_SN_Code_All").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Last Fixing Result" runat="server">
                                        <HeaderStyle Wrap="true" Width="620px" CssClass="gridCol" />
                                        <ItemStyle Wrap="true" Width="620px" CssClass="gridCol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblFixingResultPending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Last_Fixing_Result").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

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

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

                                    <asp:TemplateField HeaderText="Fixing Reference" Visible="false" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle CssClass="gridCol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblFixingRefPending" CssClass="lbl" runat="server" Text='' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Action On" Visible="false" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle CssClass="gridCol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblActionOnPending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Action_On").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

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

                                    <asp:TemplateField HeaderText="Template Sr No" Visible="false" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle CssClass="gridCol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTemplateSrNoPending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_Sr_No").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Template Code" Visible="false" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle CssClass="gridCol" />
                                        <ItemTemplate>
                                            <asp:Label ID="clmn_TempCode_Pending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_code").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Sent To" Visible="false" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle CssClass="gridCol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTempCodePending" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Sent_to").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>

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

                                    <asp:TemplateField HeaderText="Event" Visible="false" runat="server">
                                        <HeaderStyle />
                                        <ItemStyle />
                                        <ItemTemplate>
                                            <asp:Label ID="lblEventPending" CssClass="lbl" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

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

                                    <asp:TemplateField HeaderText="Trade Date" Visible="false" runat="server">
                                        <HeaderStyle CssClass="gridCol" />
                                        <ItemStyle CssClass="gridCol" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTradeDate" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.[Trade_Date]").ToString)%>' />
                                            <%--<asp:Label ID="Label2" CssClass="lbl" runat="server" Text='<%# Convert.ToDateTime(Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.[Trade_Date]")).ToString()).ToString("dd-MMM-yyyy")%>' />--%>
                                        </ItemTemplate>
                                    </asp:TemplateField>

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

                                    <asp:TemplateField HeaderText="Counterparty" Visible="false" runat="server">
                                        <HeaderStyle CssClass="counterParty" />
                                        <ItemStyle CssClass="counterParty" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblCounterparty" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Counterparty").ToString)%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </div>
                    </div>



                    <div id="tabPreview" class="tabSize">
                        <asp:Button ID="btnPreview" runat="server" CssClass="tabBtn"></asp:Button>

                        <asp:GridView ID="dgEVTFIXPreview" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3" PageSize="7" PagerStyle-Height="32px"
                            AllowPaging="true" CssClass="Grid" ShowHeaderWhenEmpty="true" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" HeaderStyle-CssClass="GridHeaderTitle">

                            <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 Visible="false">
                                    <HeaderStyle Wrap="False" Width="25px" HorizontalAlign="Center" />
                                    <ItemStyle Wrap="false" Width="25px" HorizontalAlign="Center" />
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="checkALL" runat="server" Visible="false" AutoPostBack="true"></asp:CheckBox>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="checkBox_COL" runat="server"></asp:CheckBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Note_Master_ID" Visible="false" runat="server">
                                    <HeaderStyle Wrap="false" Width="150px" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="Note_Master_ID_Preview" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Note_Master_ID").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

                                <asp:TemplateField HeaderText="Original Strike" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="Strike_Price_Preview" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Strike_Price").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

                                <asp:TemplateField HeaderText="Field Name/Asset" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="Ccy_Share_Preview" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Ccy/Share/UDF").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Value" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="Amt_Qty_Preview" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Amt/Qty/Result").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Fixing Result" runat="server">
                                    <HeaderStyle Width="654px" />
                                    <ItemStyle Width="654px" />
                                    <ItemTemplate>
                                        <asp:Label ID="FixingResult_Preview" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

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

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

                                <asp:TemplateField HeaderText="Fixing Reference" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="FixingReference_Preview" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

                                <asp:TemplateField HeaderText="Action on" Visible="false" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="Action_on_Preview" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Queue" Visible="false" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="queue_Preview" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Linked events" Visible="false" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="LinkedEvents_Preview" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Fixing CSV" Visible="false" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="FixingCSV_Preview" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

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

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

                                <asp:TemplateField HeaderText="Template Code" Visible="false" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="Template_code_Preview" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_code").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

                                <asp:TemplateField HeaderText="Client" Visible="false" runat="server">
                                    <HeaderStyle CssClass="colPreview" />
                                    <ItemStyle CssClass="colPreview" />
                                    <ItemTemplate>
                                        <asp:Label ID="clmn_Customer_Preview" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Customer_Name").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>


                    <div id="tabProcessedSummary" class="tabSize">
                        <asp:Button ID="btnProcessedSummary" runat="server" CssClass="tabBtn"></asp:Button>

                        <%--    <div runat="server" id="divProcessedSummary" ></div>--%>
                        <asp:GridView ID="dgvprocessed_summary" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3" PageSize="7" PagerStyle-Height="32px"
                            AllowPaging="true" CssClass="Grid" ShowHeaderWhenEmpty="true" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" HeaderStyle-CssClass="GridHeaderTitle">

                            <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>
                                    <HeaderStyle Wrap="False" Width="25px" HorizontalAlign="Center" />
                                    <ItemStyle Wrap="false" Width="25px" HorizontalAlign="Center" />
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="chkAll" runat="server" ItemStyle-Width="25px" AutoPostBack="true" OnCheckedChanged="summaryCheckAllCheckChanged"></asp:CheckBox>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="checkBox_COL" runat="server" ItemStyle-Width="25px" onclick="setColor(this)"></asp:CheckBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:CommandField ItemStyle-Width="40px" ButtonType="Link" ShowEditButton="true" UpdateText="Update" EditText="Edit" />

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

                                <asp:TemplateField HeaderText="Ref Prod ID" runat="server">
                                    <HeaderStyle CssClass="gridCol" HorizontalAlign="Center" />
                                    <ItemStyle CssClass="gridCol" HorizontalAlign="Right" />
                                    <ItemTemplate>
                                        <asp:Label ID="Note_Master_ID_ProcessSummary" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Note_Master_ID").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

                                <asp:TemplateField HeaderText="Product" Visible="true" runat="server">
                                    <HeaderStyle Wrap="true" Width="760px" />
                                    <ItemStyle Wrap="true" Width="760px" />
                                    <ItemTemplate>
                                        <asp:Label ID="Product_ProcessSummary" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Product_Name").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Original Strike" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="Strike_Price_Processed_Summary" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Strike_Price_Percentage").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

                                <asp:TemplateField HeaderText="Field Name/Asset" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="Ccy_Share_ProcessSummary" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Field_Display_Name").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Value" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="Amt_Qty_ProcessSummary" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RUH_Rule_Result").ToString)%>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtFiledValue" CssClass="txt" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RUH_Rule_Result").ToString)%>'></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Fixing Result" Visible="false" runat="server">
                                    <HeaderStyle Width="620px" />
                                    <ItemStyle Width="620px" />
                                    <ItemTemplate>
                                        <asp:Label ID="FixingResult_ProcessSummary" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Fixing_Result").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Rule Level" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblRuleLevel" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Rule_Level").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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


                                <asp:TemplateField HeaderText="Fixing Reference" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="FixingReference_ProcessSummary" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

                                <asp:TemplateField HeaderText="Action on" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="Action_on_ProcessSummary" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Queue" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="Queue_ProcessSummary" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Linked events" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="Linked_events_ProcessSummary" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Fixing CSV" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="FixingCSV_ProcessSummary" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

                                <asp:TemplateField HeaderText="Sr no." Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="Sr_No_ProcessSummary" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_Sr_No").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Event Description" runat="server">
                                    <HeaderStyle Width="168px" />
                                    <ItemStyle Width="168px" />
                                    <ItemTemplate>
                                        <asp:Label ID="EventDescription_ProcessSummary" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.RM_Description").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

                                <asp:TemplateField HeaderText="template code" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="Template_code_ProcessSummary" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_code").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

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

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

                                <asp:TemplateField HeaderText="Trade Date" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridColSummary" />
                                    <ItemStyle CssClass="gridColSummary" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblTradeDate" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Trade_Date").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Underlyings" runat="server" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" Wrap="true" HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblUnderlyings" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.NM_SN_Code_All").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Exchange" Visible="False" runat="server">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblExchange" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Exchange").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Counterparty" Visible="False" runat="server">
                                    <HeaderStyle CssClass="counterParty" />
                                    <ItemStyle CssClass="counterParty" Wrap="false" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblCounterparty" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Counterparty").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                            </Columns>
                        </asp:GridView>

                    </div>

                    <div id="tabVerified" class="tabSize">
                        <asp:Button ID="btnVerified" runat="server" CssClass="tabBtn"></asp:Button>

                        <%-- <div runat="server" id="divVerifiedEvents"></div>--%>
                        <asp:GridView ID="dgvVerifiedEvents" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3" PageSize="7" PagerStyle-Height="32px"
                            AllowPaging="true" CssClass="Grid" ShowHeaderWhenEmpty="true" RowHeadersWidthSizeMode="DisableResizing;" SelectedRowStyle-Wrap="true" HeaderStyle-CssClass="GridHeaderTitle">

                            <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="lbldatagrid" runat="server" Text="No data found."></asp:Label>
                            </EmptyDataTemplate>

                            <Columns>
                                <asp:TemplateField Visible="false">
                                    <HeaderStyle Wrap="False" Width="25px" HorizontalAlign="Center" />
                                    <ItemStyle Wrap="false" Width="25px" HorizontalAlign="Center" />
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="chkAllPending" Visible="false" runat="server" ItemStyle-Width="25px" AutoPostBack="true"></asp:CheckBox>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="checkBox_COL" runat="server" ItemStyle-Width="25px"></asp:CheckBox>
                                    </ItemTemplate>
                                </asp:TemplateField>

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

                                <asp:TemplateField HeaderText="Ref Prod Id" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" HorizontalAlign="Right" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblNoteMasterIdVerified" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Note_Master_ID").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

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

                                <asp:TemplateField HeaderText="Original Strike" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblStrikePriceVerified" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Strike_Price_Percentage").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

                                <asp:TemplateField HeaderText="Field Name/Asset" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="ProcessedSummaryVerified" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Field_Display_Name").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

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


                                <asp:TemplateField HeaderText="Fixing Reference" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="fixingRefVerified" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

                                <asp:TemplateField HeaderText="Action on" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="actionOnVerified" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Queue" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="queueVerified" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Linked events" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="linkedEventsVerified" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Fixing CSV" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="fixingCsvVerified" CssClass="lbl" runat="server" Text='' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

                                <asp:TemplateField HeaderText="Sr no." Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="Sr_No_Verified" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_Sr_No").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

                                <asp:TemplateField HeaderText="template code" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridVerifiedCol" />
                                    <ItemStyle CssClass="gridVerifiedCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="Template_code_Verified" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Template_code").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

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

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

                                <asp:TemplateField HeaderText="Trade Date" Visible="false" runat="server">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblTradeDate" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Trade_Date").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Underlyings" runat="server" Visible="false">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" Wrap="true" HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblUnderlyings" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.NM_SN_Code_All").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Exchange" Visible="False" runat="server">
                                    <HeaderStyle CssClass="gridCol" />
                                    <ItemStyle CssClass="gridCol" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblExchange" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Exchange").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Counterparty" Visible="False" runat="server">
                                    <HeaderStyle CssClass="counterParty" />
                                    <ItemStyle CssClass="counterParty" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblCounterparty" CssClass="lbl" runat="server" Text='<%# Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Counterparty").ToString)%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>

                    </div>

                </div>

            </fieldset>

            <div class="Popup" id="showMsg">
                <div id="header" class="header">
                    <asp:Button ID="btnClose" CssClass="btnClose" runat="server" />
                </div>
                <p style="padding-top:10px;">
                    The Deal(s) are being processed. 
                    <br />
                    Please reload in sometime.
                </p>

            </div>

            <%--<div id='modal_dialog' class="Popup">
                <div class='title'>
    </div>
    <div>
                    <asp:Button ID="btnYes" CssClass="btnClose" runat="server" Text="Yes" AutoPostBack="true" />
                    <asp:Button ID="btnNo" CssClass="btnClose" runat="server" Text="No" AutoPostBack="true" />
    </div>
    
</div>--%>
            <div id="dialog-confirm" title="" style="display:none" class="border">
  <p style="padding-top:20px;">Do you wish to continue?</p>
</div>

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

            <asp:HiddenField ID="hdnSelectedTab" runat="server" Value="0" />
            <asp:HiddenField ID="hdnSelectedTabName" runat="server" Value="Pending" />

            <%---------------- Removed as not used ------------------------------------%>
            <%--<asp:HiddenField ID="hdnCustName" runat="server" />
            <asp:HiddenField ID="hdnCustomerId" runat="server" />
            <asp:HiddenField ID="hdn_ProductID" runat="server" />--%>
            <%---------------- Removed as not used ------------------------------------%>

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


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

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

            <asp:HiddenField ID="hdnCheckedCountPending" runat="server" Value="0" />
            <asp:HiddenField ID="hdnCheckedCountSummary" runat="server" Value="0" />
            <asp:Button runat="server" ID="hdnProcessButton" Style="display: none;" />
        </ContentTemplate>

        <Triggers>
            <asp:PostBackTrigger ControlID="btnExcel" />
        </Triggers>
    </asp:UpdatePanel>



    <script type="text/javascript">
        // alert(1);
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(
        function () {
            $(document).ready(function () {
                //  alert(1);
                // alert("page req");
                disableListItem();

                setTabSize();
                //alert(wt);

                /*$("input:checkbox").each(function () {
                    if ($(this).attr('id') == "ctl00_MainContent_chkShowCounterParty") {
                        return true;
                    }

                    //alert(this);

                   var rowspan = $(this).parent().parent().attr("rowspan");
                    var a;
                    if (typeof(rowspan) == "undefined") {
                        a = 1;
                    }
                    else {
                        a = parseInt(rowspan);
                    }

                   if ($(this).is(':checked')) {
                        //alert("yes");
                        chk = $(this);
                        var trpointer = $(this).parent().parent().parent();                        

                        for (var i = 0; i < a; i++) {
                           // alert($(trpointer).html());
                            $(trpointer).css({"background-color": "#f6f6f6 !important"});
                            trpointer = $(trpointer).next();
                        }
                    }
                    else {

                        var trpointer = $(this).parent().parent().parent();

                        for (var i = 0; i < a; i++) {
                            $(trpointer).css("background-color", "");
                            trpointer = $(trpointer).next();
                        }
                    }
                    
                });*/

            });

        });

        function setTabSize() {
            var wt = 0;

            $(".tabSize").each(function () {
                if ($(this).css('display') == 'block') {
                    $(".tabSize").css("width", " 3000px");
                    $(this).closest('table').find(' tbody tr:eq(0)').find("th").each(function () {
                        if ($(this).is(':visible')) {
                            wt = (wt + 20) + Number($(this).width());
                        }
                    });
                    $(".tabSize").css({ 'width': (wt) + "px" });

                }
            });
        }

        $(document).ready(function () {
            disableListItem();

        });

        function disableListItem() {
            $(".lstBox option").each(function () {
                $(this).prop("disabled", true);
            });
        }

        function setColor(chkBox) {
            //  alert(1);
            var rowspan = $(chkBox).parent().parent().attr("rowspan");
            var a;
            var checkedCount;

            if (document.getElementById('<%=hdnSelectedTabName.ClientID%>').value == "Pending") {
                checkedCount = parseInt(document.getElementById('<%=hdnCheckedCountPending.ClientID%>').value);
            }
            else if (document.getElementById('<%=hdnSelectedTabName.ClientID%>').value == "ProcessedSummary") {
                checkedCount = parseInt(document.getElementById('<%=hdnCheckedCountSummary.ClientID%>').value);
            }

        if (typeof (rowspan) == "undefined") {
            a = 1;
        }
        else {
            a = parseInt(rowspan);
        }

        var trpointer = chkBox.parentNode.parentNode.parentNode;

        if (chkBox.checked) {
            checkedCount = checkedCount + 1;
            for (var i = 0; i < a; i++) {
                $(trpointer).css("background-color", "#f6f6f6");
                trpointer = $(trpointer).next();
            }
        }
        else {
            checkedCount = checkedCount - 1;
            for (var i = 0; i < a; i++) {
                $(trpointer).css("background-color", "");
                trpointer = $(trpointer).next();
            }
        }

        if (document.getElementById('<%=hdnSelectedTabName.ClientID%>').value == "Pending") {
            document.getElementById('<%=hdnCheckedCountPending.ClientID%>').value = checkedCount;
        }
        else if (document.getElementById('<%=hdnSelectedTabName.ClientID%>').value == "ProcessedSummary") {
            document.getElementById('<%=hdnCheckedCountSummary.ClientID%>').value = checkedCount;
        }
    document.getElementById('<%=btnsetCheckedRowCount.ClientID%>').click();

        }

        function showMsg() {
            setTimeout(function () { $("#showMsg").fadeOut(300); }, 1000)
            $('#showMsg').show();
            setTimeout(function () { $("#showMsg").fadeOut(300); }, 1000)
        }


        function tabs() {
            $("#ctl00_MainContent_tabs").tabs();
        }

        function tabPendingClicked() {
            CurrentTab("0");
            document.getElementById('<%=hdnSelectedTabName.ClientID%>').value = "Pending";
            document.getElementById('<%=btnPending.ClientID%>').click();
        }

        //not used therefore, ProcessedSummary is 1
        function tabPreviewClicked() {
            CurrentTab("1");
            document.getElementById('<%=hdnSelectedTabName.ClientID%>').value = "Preview";
            document.getElementById('<%=btnPreview.ClientID%>').click();
        }

        function tabProcessedSummary() {
            CurrentTab("1");
            document.getElementById('<%=hdnSelectedTabName.ClientID%>').value = "ProcessedSummary";
            document.getElementById('<%=btnProcessedSummary.ClientID%>').click();
        }

        function tabVerifiedClicked() {
            CurrentTab("2");
            document.getElementById('<%=hdnSelectedTabName.ClientID%>').value = "Verified";
            document.getElementById('<%=btnVerified.ClientID%>').click();
        }

        function CurrentTab(index) {
            document.getElementById('<%=hdnSelectedTab.ClientID%>').value = index
            $("#ctl00_MainContent_tabs").tabs({ active: document.getElementById('<%= hdnSelectedTab.ClientID %>').value });
        }

        function hideTab(index) {
            //
            if (index == 0) {
                var element = document.getElementById('<%=lnkPending.ClientID%>');
                element.parentNode.removeChild(element);
            }
            else if (index == 1) {
                var element = document.getElementById('<%=lnkProcessedSummary.ClientID%>');
                element.parentNode.removeChild(element);
            }
            else {
                var element = document.getElementById('<%=lnkVerified.ClientID%>');
                element.parentNode.removeChild(element);
            }
        tabs();
            //$("#ctl00_MainContent_tabs").tabs({ active: document.getElementById('<%= hdnSelectedTab.ClientID %>').value });
        }

        function txtUnderlyingKeydown(e) {
            if (e.keyCode == 13) {
                //document.getElementById('<%=btnLoad.ClientID%>').click();
                $("#ctl00_MainContent_btnLoad").focus();
            }
        }

        function txtTradeKeydown(e) {
            if (e.keyCode == 13) {
                //document.getElementById('<%=BtnSearch.ClientID%>').click();
                $("#ctl00_MainContent_btnLoad").focus();
            }
        }

        function txtFilterKeydown(e) {
            if (e.keyCode == 13) {
                //document.getElementById('<%=btnFiltersSearch.ClientID%>').click(); 
                $("#ctl00_MainContent_btnLoad").focus();
            }
        }

        function AllowNumericOnly(e) {
            var keycode;
            if (window.event)
                keycode = window.event.keyCode;
            else if (event)
                keycode = event.keyCode;
            else if (e)
                keycode = e.which;
            else return true;
            if ((keycode > 47 && keycode <= 57)) { return true; }
            else { return false; } return true;
        }

        function TxRowsPerPage_TextChanged(e) {
            if (e.keyCode == 13) {
                $("#ctl00_MainContent_btnLoad").focus();

            }
            else if (event.keyCode >= 48 && event.keyCode <= 57)
                return;
        }


        function AllowAlphaNumericAndDotOnly(e) {
            var keycode;
            if (window.event)
                keycode = window.event.keyCode;
            else if (event)
                keycode = event.keyCode;
            else if (e)
                keycode = e.which;
            else return true;
            //  alert(keycode);
            if ((keycode >= 48 && keycode <= 57) || (keycode >= 65 && keycode <= 90) || (keycode >= 97 && keycode <= 122) || (keycode == 46)) { return true; }
            else { return false; } return true;
        }

        function confirmDialog() {
            $("#dialog-confirm").dialog({
                resizable: false,
                height: "auto",
                width: 400,
                modal: true,
                buttons: {
                    "Yes": function () {
                        $(this).dialog("close");
                        hdnBtnProcessClicked();
                    },
                    No: function () {
                        $(this).dialog("close");
                    }
                }
            });
        }

        function hdnBtnProcessClicked() {
            document.getElementById('<%=hdnProcessButton.ClientID%>').click();
        }

    </script>

</asp:content>

