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

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

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

     <link href="../App_Themes/MultiDealEntry.css" rel="stylesheet" />

 
   <%-- <asp:UpdateProgress ID="pnlProgress" runat="server" AssociatedUpdatePanelID="pnlUpdateDCD" DisplayAfter="0">
        <ProgressTemplate>
            <div class="UpdateProgress" style="top: 0px; height: 1000px; background-color: #f2f2f2; opacity: 0.8; filter: alpha(opacity=80); vertical-align: middle; left: 0px; z-index: 99999; position: absolute; text-align: center;">
                <div class="Progress divLoading " style="font: bold 12px/14px verdana; color: #333333; padding: 10px; height: auto; width: 100%; vertical-align: middle; z-index: 999999; position: absolute; text-align: left; top: 40% !important; left: 40% !important;">
                    <img alt="Loading" src="../App_Resources/ajax-loader7.gif" /><span class="">Loading...</span>
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>--%>
    <table >
    <tr>
        <td style="height: 28px;">
            <asp:Label ID="lblError" CssClass="lbl" runat="server" Visible="True" ForeColor="Red" ></asp:Label>
            <asp:Label ID="lblMsg" CssClass="lbl" runat="server" Visible="True" ForeColor="Green"></asp:Label>
        </td>
    </tr>
</table>
    <asp:UpdatePanel ID="pnlUpdateDCD" runat="server" UpdateMode="Always">
        <ContentTemplate>

          

            <table class="mainTable">
                
                <tr >
                    <td class="lbl tdlbl">
                        <asp:Label ID="lblCode" runat="server" CssClass="lbl" Text="Scenario Code" ></asp:Label>
                    </td>
                    <td class=" Rightalign TextBoxShortWidth">
                        <asp:TextBox ID="txtCode" step="0.01" min="0" runat="server" CssClass="txt"   AutoPostBack="false" />  
                    </td>
                </tr>
                <tr >
                    <td class="lbl tdlbl">
                        <asp:Label ID="lblName" runat="server" CssClass="lbl" Text="Scenario Name"></asp:Label>
                    </td>
                    <td class=" Rightalign TextBoxShortWidth">
                        <asp:TextBox ID="txtName"  step="0.01" min="0" runat="server" CssClass="txt"   AutoPostBack="false" />  
                    </td>
                </tr>
                
                <tr >
                    <td class="lbl tdlbl">
                        <asp:Label ID="lblCurveName" runat="server" CssClass="lbl" Text="Curve Name"></asp:Label>
                    </td>
                    <td class=" Rightalign TextBoxShortWidth">
                        <asp:TextBox ID="txtCurveName"  step="0.01" min="0" runat="server" CssClass="txt"   AutoPostBack="false" />  
                    </td>
                    <td class=" Rightalign TextBoxShortWidth">
                        <asp:TextBox ID="txtInsertIntoDBCurveName"  step="0.01" min="0" runat="server" CssClass="txt"   AutoPostBack="false" visible="false"/>  
                    </td>
                </tr>

               <tr >
                    <td class="lbl tdlbl">
                        <asp:Label ID="lblDescription" runat="server" CssClass="lbl" Text="Scenario Description"></asp:Label>
                    </td>
                   <td class=" Rightalign TextBoxShortWidth">
                        <asp:TextBox ID="txtDescription" step="0.01" min="0" runat="server" CssClass="txt"   AutoPostBack="false" />  
                    </td>
                </tr>
              <%--  <tr >
                    <td class="lbl tdlbl">
                        <asp:Label ID="lblVol" runat="server" CssClass="lbl" Text="Volatility"></asp:Label>
                    </td>
                    <td class=" Rightalign TextBoxShortWidth">
                        <asp:TextBox ID="txtVol" step="0.01" min="0" runat="server" CssClass="txt"   AutoPostBack="false" />  
                    </td>
                </tr>
                
               <tr >
                    <td class="lbl tdlbl">
                        <asp:Label ID="lblTarget" runat="server" CssClass="lbl" Text="Target"></asp:Label>
                    </td>
                    <td class=" Rightalign TextBoxShortWidth">
                        <asp:TextBox ID="txtTarget"  step="0.01" min="0" runat="server" CssClass="txt"   AutoPostBack="false" />  
                    </td>
                </tr>--%>
                
                 </table>
                <%--<tr class="HeightLeftTable" id="trCustomerSerach" runat="server">
                                            <td></td>
                                            <td class="lbl tdlbl">
                                                <asp:Label ID="lblCustomerSearch" runat="server" CssClass="lbl" Text="Customer Search"></asp:Label></td>
                                        </tr>--%>
             <table style="margin-left: 44%;">
               <tr >
                    <td >
                        <asp:Button ID="btnApply" runat="server" Text="Apply" CssClass="btn btnLegWidth" Width="75px" ToolTip="Apply"></asp:Button>
                    </td>
                    <td>
                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="btn btnLegWidth" Width="75px" ToolTip="Cancel" OnClientClick="CallChildSetVisibility();"></asp:Button>
                    </td>
                </tr>

             </table>
            
            <script type="text/javascript">
                function HideErrorPanel() {

                    document.getElementById('ctl00_MainContent_pnlUpdateDCD').style.visibility = "hidden";
                   
                }
                function CallChildSetVisibility() {

                    
                    //window.opener.callParentSetFieldVisibility();
                    $('<option value="' + $("[id$=txtCode]").val() + '">' + $("[id$=txtCurveName]").val() + '</option>').appendTo(window.opener.$("[id$=ddlScenarioList]"));
                    //$("id$=txtCurveName").val(window.opener.$("[id$=dgvCurveDetails]"))
                    window.close();
                }
                function CloseSettings() {
                    window.close();
                }
               

            </script>


        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

