<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="Report.aspx.vb" Inherits="FinIQWebApp.Report_IM" Title="Events Calendar Report"  MasterPageFile="~/FiniqAppMasterPage.Master" %>

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

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

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

    <style>

        .PnlUpper {
            width: 960px;
            border: solid 1px #cccccc;
            margin-left: 8px;
        }

        .grpType {
            width: 80px;
            height: 36px;
            margin: 8px;
            float: left;
        }
        .lbl {
            margin-left: 20px;
        }
        .dropdown {
            margin: 4px;
            margin-left: 10px;
            float: left;
        }
        .button {
           Width:120px;
           font: normal 13px verdana !important; 
           height:30px !important;           
           border:solid 1px #CCCCCC !important;
           border-collapse:collapse !important;        
           color:#000000 !important;      
           background-color:#F2F2F3 !important;           
       }
       .fldLower {
            width: 970px; 
            height: 460px;          
            margin: 8px;
            overflow: auto;
        }
        .Grid td {
            white-space: nowrap;
        }
        
        .divLoading
        {
           position: absolute;
           top: 24px;
           left: 60px;         
        }

        .lblErr {
            margin-left: 6px;
        }
    </style>

    <asp:UpdatePanel ID="UpdatePanelCP1" runat="server" class="PanelPad" ChildrenAsTriggers="true" EnableViewState="true" UpdateMode="Conditional">
        <ContentTemplate> 

            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanelCP1"
                           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:Label runat="server" ID="lblError" CssClass="lblErr"> </asp:Label>
            <asp:Panel runat="server" ID="pnlUpper">
                <fieldset Class="PnlUpper">
                    
                    <table>
                        <%--<tr>
                            <td colspan="6">
                                
                            </td>
                        </tr>--%>
                        <tr>
                            <td>                           
                                <fieldset class="grpType">
                                    <asp:RadioButton ID="radioTranche" Text="Tranche" runat="server" CssClass="radio" GroupName="Type" />
                                    <asp:RadioButton ID="radioELN" Text="ELN" runat="server" CssClass="radio" GroupName="Type" />
                                </fieldset>                           
                            </td>

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

                            <td>
                                <asp:DropDownList ID="ddlEvent" CssClass="ddl dropdown" AutoPostBack="false" runat="server"  Width="160px" EnableViewState="true">
                                </asp:DropDownList>                         
                            </td>

                            <td>         
                                <asp:Label ID="lblFrom" runat="server" Text="From" class="lbl"></asp:Label>
                            </td>

                            <td>
                                <uc1:DateControl ID="dtpFrom" runat="server" CalenderCss="btn1" TextBoxCss="txt" />
                            </td>

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

                           <td>
                               <uc1:DateControl ID="dtpTo" runat="server" CalenderCss="btn1" TextBoxCss="txt" />
                           </td>

                            <td style="width:30px;"></td>

                            <td>
                                <asp:Button ID="btnGenerate" runat="server" class="button" Text="Generate"></asp:Button>
                            </td>
                        </tr>
                    </table>
               </fieldset>          
            </asp:Panel>
 
            <asp:Panel runat="server">
                <fieldset class="fldLower">
                    <asp:GridView ID="grdReport" runat="server" AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" CellPadding="3"
                                                CssClass="Grid" PageSize="15" AllowPaging="true" ShowHeaderWhenEmpty="true">
                            <HeaderStyle CssClass="GridHeader" />
                                               
                            <Columns>                                             
                                                                                        

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

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

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

                            </Columns>
                        </asp:GridView>  
                </fieldset>
            </asp:Panel>
            
        </ContentTemplate>
       <%-- <Triggers >
            <asp:PostBackTrigger ControlID="btnGenerate" />
             <asp:PostBackTrigger ControlID="dtpFrom" />
             <asp:PostBackTrigger ControlID="dtpTo" />
        </Triggers>--%>
    </asp:UpdatePanel>

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

</asp:Content>