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

<!DOCTYPE html>

<html>
<head id="Head1" runat="server">
    <title></title>

      <link href="../../App_Themes/Style1.css" rel="stylesheet" />
    <script type="text/javascript">
        var dialogConfirmed = false;
        function ViewDialogDuplicate(obj, title, dialogText) {

            if ($("#pageName").html() != null) {
            }
            if (!dialogConfirmed) {
                $('html').append(String.Format("<div id='dialog' title='{0}'><p style='float:left;'><span class='ui-icon ui-icon-alert' style='float:left; margin:0 5px 20px 0;'></span>{1}</p></div>", title, dialogText));
                $('#dialog').dialog
                        ({
                            height: 180,
                            width: 350,
                            modal: true,
                            resizable: false,
                            draggable: true,
                            close: function (event, ui) { $('html').find('#dialog').remove(); },
                            buttons:
                            {
                                'Yes': function () {
                                    $("#ctl00_MainContent_btnConfirmation").click();
                                    $(this).dialog('close');
                                },
                                'No': function () {
                                    $(this).dialog('close');
                                    $('html').find("#dialog").remove();
                                    return false;
                                }
                            }
                        });
            }

            return dialogConfirmed;
            $(".ui-widget-overlay").height($("body").height());



        }

        function onlyNumeric(event) {
            

            var charCode;
            var cntrlval = document.getElementById("txtVolValue").value;;
            try {
             
                if (cntrlval.indexOf(".") < 0) {
                    key = window.event.keyCode;

                    if ((key > 47 && key < 58) || key == 46)
                        return;
                    else
                        window.event.returnValue = null;
                }
                else {
                    var key = window.event.keyCode;
                    //alert(key)
                    if (key != 46) {
                        if ((key > 47 && key < 58))
                            return;
                        else
                            window.event.returnValue = null;
                    }
                    else {
                        window.event.returnValue = null;
                    }
                }
            }
            catch (error) {
                WriteLog_Error("AllowNumericWithdecimal  :" + error.message);
            }
            finally {
                cntl = null;
                cntrlval = null;
                key = null;
            }
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">

        <%--<div id="Container" onclick="__doPostBack('UpdatePanelRecal', '');"></div>--%>

        <div style="margin:20px;padding:20px">
            <table>
                <tr>
                    <td>
                        <asp:Label ID="lblError" runat="server" CssClass="lblerror"></asp:Label>
                        <asp:Label ID="lblInfo" runat="server" CssClass="lblinfo"></asp:Label>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                        <asp:Label runat="server" ID="lblSummary" Text="Summary" CssClass="lbl"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label runat="server" ID="lblSpecialDaysVolType" Text="Special Day Vol Type To Use :" CssClass="lbl"></asp:Label>
                    </td>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    <asp:CheckBox runat="server" ID="chkAbsolute" Text="Absolute" AutoPostBack="true"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox runat="server" ID="chkPercentage" Text="Percentage" AutoPostBack="true"/>
                                    <asp:TextBox runat="server" ID="txtPercentage" CssClass="txt" Width="50px" AutoPostBack="true"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox runat="server" ID="chkWeightMultiplier" Text=" Weight Multiplier" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label runat="server" ID="lblspecialday" CssClass="lbl" Text="Special Day Vol :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txtVolValue" CssClass="txt" onkeypress="onlyNumeric(this);"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label runat="server" ID="lblDecayDays" CssClass="lbl" Text="Decay Days :"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="cboDecayDays" CssClass="ddl"></asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label runat="server" ID="lblApplyTo" CssClass="lbl" Text="Apply To :"></asp:Label>
                    </td>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    <asp:CheckBox runat="server" ID="chkCCY1_CCY2" Text="CCY1 - CCY2  (00)" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox runat="server" ID="chkCCY1_ANY" Text="CCY1 - ANY  (00)" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox runat="server" ID="chkANY_CCY2" Text="ANY - CCY2   (00)" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox runat="server" ID="chkANY_ANY" Text="ANY - ANY" />
                                </td>
                            </tr>
                            <tr>
                                <td> 
                                    <asp:Button runat="server" ID="btnApply" CssClass="btn" Text="Apply" OnClientClick="callRecalBtn();" />
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td>
                        <asp:CheckBox runat="server" ID="chkApply" Text="Apply special  day vol to child pair(s) :" />
                        <table>
                            <tr>
                                <td>
                                    <asp:GridView runat="server" ID="dgvChildPair" CssClass="Grid" AutoGenerateColumns="false"
                                        AllowPaging="false" Width="300px" ViewStateMode="Enabled" ShowHeaderWhenEmpty="true" EmptyDataText="No data found">
                                        <RowStyle CssClass="GridItem" />
                                        <HeaderStyle CssClass="GridHeader" />
                                        <FooterStyle CssClass="GridFooter" />
                                        <PagerStyle CssClass="GridPager" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="Select">
                                                <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                                                <ItemStyle HorizontalAlign="Center" />
                                                <HeaderTemplate>
                                                    <asp:CheckBox ID="chkAllList" runat="server" AutoPostBack="true" CssClass="" OnCheckedChanged="chkAllList_CheckedChanged"  Visible ="false" />
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="chk" runat="server" AutoPostBack="true"></asp:CheckBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Child Pair" ItemStyle-Wrap="false" SortExpression="child_pair" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblchild_pair" runat="server" CssClass="lbl" Text='<%# Eval("child_pair")%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Special Daily Vol" ItemStyle-Wrap="false" SortExpression="DailyVol" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20px">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblDailyVol" runat="server" CssClass="lbl" Text='<%# Eval("DailyVol")%>'></asp:Label>
                                                    <asp:TextBox ID="txtDailyVol" runat="server" CssClass="txt" Visible="false" Text='<%# Eval("DailyVol")%>'></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <asp:Button ID="btnConfirmation" runat="server" Width="0" Style="width: 0px; height: 0px; font-size: 0; border: none; display: none;" />
        </div>
    </form>
</body>
</html>
