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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="DocumentUploadCollection" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="DocumentUpload" runat="server">
        <ContentTemplate>
            <table>
                <tr>
                    <td>
                        <asp:Label ID="lblError" runat="server"></asp:Label>
                        <asp:Label ID="lblInfo" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    <asp:GridView ID="grdDocumentCollection" runat="server" AllowSorting="true" AutoGenerateColumns="False" CssClass="Grid">
                                        <SelectedRowStyle CssClass="GridItemSelect" />
                                        <RowStyle CssClass="GridItem" Height="32px" />
                                        <HeaderStyle CssClass="GridHeader" />
                                        <FooterStyle CssClass="GridFooter" />
                                        <PagerStyle CssClass="GridPager" />
                                        <PagerSettings Mode="NumericFirstLast"
                                            FirstPageText="First"
                                            LastPageText="Last"
                                            Position="Bottom" />
                                        <AlternatingRowStyle Height="32px" CssClass="GridItem" />
                                        <EmptyDataTemplate>
                                            <asp:Label ID="lblNodatafound" runat="server" Text="No data found." CssClass="lbl"></asp:Label>
                                        </EmptyDataTemplate>

                                        <PagerStyle HorizontalAlign="Left"
                                            VerticalAlign="Middle"
                                            Font-Size="14pt" Wrap="True" CssClass="GridPager" BorderStyle="None" />
                                        <Columns>

                                            <asp:TemplateField HeaderText="ID" Visible="False" SortExpression="">
                                                <HeaderStyle HorizontalAlign="center" VerticalAlign="Middle" Width="100px"></HeaderStyle>
                                                <ItemStyle Wrap="true" HorizontalAlign="center" Width="100px" VerticalAlign="Middle"></ItemStyle>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DGT_ID")%>'>
                                                    </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Document Name" Visible="true" SortExpression="" ItemStyle-HorizontalAlign="Left">
                                                <HeaderStyle HorizontalAlign="left" VerticalAlign="Middle" Width="150px"></HeaderStyle>
                                                <ItemStyle Wrap="true" HorizontalAlign="left" Width="150px" VerticalAlign="Middle"></ItemStyle>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblDocName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Doc_Name")%>'>
                                                    </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Document Type" Visible="false">
                                                <HeaderStyle />
                                                <ItemStyle />
                                                <ItemTemplate>
                                                    <asp:Label ID="lblDocType" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DOC_TYPE")%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Actions">
                                                <HeaderStyle Width="100px" />
                                                <ItemStyle Wrap="true" VerticalAlign="Middle" HorizontalAlign="center" Width="40px" />
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="lnkbtnView" runat="server" Text="View" CommandName="ViewDocument" CommandArgument='<%# CType(Container, GridViewRow).RowIndex%>'></asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <%--<asp:TemplateField HeaderText="Remarks" Visible="true" >
                            <HeaderStyle Width="100px" />
                            <ItemStyle Wrap="true" VerticalAlign="Middle" HorizontalAlign="center" Width="40px" /> 
                            <ItemTemplate> 
                                <asp:Label ID="txtRemarks" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Remarks")%>'></asp:Label>                           
                            </ItemTemplate>                          
                        </asp:TemplateField> 

                        <asp:TemplateField HeaderText="Uploaded By" Visible="true" >
                            <HeaderStyle Width="100px" />
                            <ItemStyle Wrap="true" VerticalAlign="Middle" HorizontalAlign="center" Width="40px" /> 
                            <ItemTemplate> 
                               <asp:Label ID="lblUpdatedBy" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "WUD_UploadedBy")%>'></asp:Label>                        
                            </ItemTemplate>                          
                        </asp:TemplateField> 

                        <asp:TemplateField HeaderText="Uploaded At" Visible="true" >
                            <HeaderStyle Width="100px" />
                            <ItemStyle Wrap="true" VerticalAlign="Middle" HorizontalAlign="center" Width="40px" /> 
                            <ItemTemplate> 
                               <asp:Label ID="lblUpdatedAt" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "WUD_UploadedAt")%>'></asp:Label>                             
                            </ItemTemplate>                          
                        </asp:TemplateField> --%>
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>

                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="grdDocumentCollection" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>


