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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../App_Themes/Style1.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">

        function HideParentLabel() {

            var rowindex = '';
            var url = window.location.search.substring(1);
            var vars = url.split('&');

            for (var i = 0; i < vars.length; i++) {
                var pair = vars[i].split('=');
                if (decodeURIComponent(pair[0]) == 'RowIndex') {
                    decodeURIComponent(pair[1]);
                }
            }

            rowindex = pair[1];

            window.parent.document.getElementById('ctl00_MainContent_DataList1_ctl0' + rowindex + '_lblViewAttachedFiles').style.display = 'none';
                                  
        }
    
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div style="height:50px">
        <asp:Label ID="lbl" runat="server" CssClass="lblBOLD" Text="Following documents are attached:"></asp:Label>
    </div>
    <div>
        <asp:Label ID="lblerror" runat="server" CssClass="lblerror" Text=""></asp:Label>
    </div>
    <div style="margin-top:10px">
        <asp:Panel ID="pnlAllDocuments" runat="server" GroupingText="Uploaded/Generated Documents">
            <asp:DataGrid ID="dgAttachedFiles" runat="server" AllowPaging="True" AllowSorting="True"
                Style="margin-top: -0.05%" AutoGenerateColumns="False" 
                CellPadding="3" CssClass="Grid" PageSize="10" width="100%">
                <SelectedItemStyle CssClass="GridItemSelect" />
                <ItemStyle CssClass="GridItem" />
                <HeaderStyle CssClass="GridHeader" />
                <FooterStyle CssClass="GridFooter" />
                <PagerStyle Mode="NumericPages" CssClass="GridPager" />
                <Columns>
                    <asp:TemplateColumn HeaderText="File Name">
                        <ItemTemplate>
                            <asp:Label ID="lblFileName" runat="server" Text='<%#  Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Document_Output_Path").tostring) %>' />
                        </ItemTemplate>
                        <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Wrap="True" />
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Event Code">
                        <ItemTemplate>
                            <asp:Label ID="lblEventCode" runat="server" Text='<%#  Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Event_Code").tostring) %>' />
                        </ItemTemplate>
                        <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Wrap="True" />
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Show File">
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkShow" runat="server" Text="Show" CommandName="Show_File" CommandArgument='<%#  Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.DGT_ID").tostring) %>'
                                Font-Underline="true" />
                        </ItemTemplate>
                        <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Doc Type" Visible="false">
                        <ItemTemplate>
                            <asp:Label ID="lblDocType" runat="server" Text='<%#  Microsoft.Security.Application.Encoder.HtmlEncode(DataBinder.Eval(Container, "DataItem.Doc_Type").tostring) %>' />
                        </ItemTemplate>
                        <HeaderStyle Wrap="true" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Wrap="True" />
                    </asp:TemplateColumn>
                </Columns>
            </asp:DataGrid>
            <asp:HiddenField ID="hdnConfigValueDocgen_PDS_Upload_VirtualPath" runat="server" />
            <asp:HiddenField ID="hdnConfigValuePDS_Path" runat="server" />
            <asp:HiddenField ID="hdnConfigValuePDSUpload" runat="server" />
            <asp:HiddenField ID="hdnFTPUerName" runat="server" />
            <asp:HiddenField ID="hdnFTPPassword" runat="server" />
        </asp:Panel>
    </div>
    </form>
</body>
</html>
