<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="AttachDocument.aspx.vb" Inherits="FinIQWebApp.AttachDocument" MasterPageFile="~/FiniqAppMasterPage.Master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>



<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContent">
    <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
    <style>
        .lblStyle
        {
            padding-bottom:10px;
            padding-top:10px;
            padding-right: 10px;
        }
        fieldSet
        {
            border-color:lightgray;
            border-style:none;
            border-width:1px;
        }
        .localFont {
        font-size:18px !important;
        }
    </style>
    <%--Ashutosh.A || 19-Feb-2021 || Changes done for INT1FINFXC-135 || End--%>

   <%-- <cc1:CollapsiblePanelExtender ID="DocumentAttach" runat="server" TargetControlID="pnlOne"
        ExpandControlID="pnlMap" CollapseControlID="pnlMap" Collapsed="false" 
        ImageControlID="imgBackgroundIntroduction" AutoExpand="true">
    </cc1:CollapsiblePanelExtender>--%>
    <asp:Table ID="tbl1" runat="server">
        <asp:TableRow>
            <asp:TableCell style="padding-left:10px;">
                <asp:Table ID="tbl2" runat="server">
                    <asp:TableRow>
                        <asp:TableCell >
                            <asp:Panel ID="pnlMap" runat="server" CssClass="Panel1">
                                <div class="div1">
                                    <%--<asp:Button runat="server" ID="btnPnl" Text="Attach Document" CssClass="btn" Style="width: 100%; text-align: left !important; font: bold 11px verdana !important;" > </asp:Button>--%>
                                    <asp:Label runat="server" ID="lblCaption" Text="Attach Document" CssClass="lbl lblStyle " ></asp:Label><br/>
                                </div>
                            </asp:Panel>
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableCell >
                            <asp:Panel Width="1165px" ID="pnlOne" runat="server" BorderColor="LightGray" BorderWidth="1px">
                                <asp:Table ID="tbl3" runat="server"  >
                                    <asp:TableRow>
                                        <asp:TableCell style="padding-left:12px;">
                                            <br/><asp:Label ID="lblMsg" runat="server" CssClass="lbl lblStyle"/><br/>
                                        </asp:TableCell>
                                    </asp:TableRow>
                                    <asp:TableRow>
                                        <asp:TableCell style="padding-left:10px!important;">
                                            <asp:Table ID="tbl4" Height="300"  runat="server">  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                <asp:TableRow>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblProductId" runat="server" Text="Product ID" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblProductIdValue" runat="server" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                </asp:TableRow>
                                                <asp:TableRow>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblTemplateName" runat="server" Text="Template Name" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblTemplateNameValue" runat="server" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                </asp:TableRow>
                                                <asp:TableRow>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblProductName" runat="server" Text="Product Name" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblProductNameValue" runat="server" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                </asp:TableRow>
                                                <asp:TableRow>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblCPOrCustomerName" runat="server" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblCPOrCustomerNameValue" runat="server" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                </asp:TableRow>
                                                <asp:TableRow>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblCPDealIdOrCustomerId" runat="server" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblCPDealIdOrCustomerIdValue" runat="server" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                </asp:TableRow>
                                                <asp:TableRow>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblEvent" runat="server" Text="Event" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblEventValue" runat ="server" CssClass="lbl lblStyle" visible="False"></asp:Label>
                                                        <asp:DropDownList ID="ddlEvent" runat="server"  Width="270px" CssClass="ddl  ddlDataBaseShowAllTag" Visible="true" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                </asp:TableRow>
                                                <asp:TableRow>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblComment" runat="server" Text="Comment" CssClass="lbl lblStyle" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:TextBox ID="txtComment" width="270px" runat="server" CssClass ="" TextMode="MultiLine" Rows="3"  />
                                                    </asp:TableCell>
                                                </asp:TableRow>
                                                <asp:TableRow>
                                                    <asp:TableCell>
                                                        <asp:Label ID="lblSelectDocument" runat="server" CssClass="lbl lblStyle" Text="Select Document to Attach"></asp:Label>  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                    </asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:FileUpload Id="fileUploadAttachDoc"  runat="server"/>
                                                    </asp:TableCell>
                                                </asp:TableRow>
                                                <asp:TableRow>
                                                    <asp:TableCell></asp:TableCell>
                                                    <asp:TableCell>
                                                        <table style="margin-left:-0.6px">
                                                            <tr>
                                                                <td>
                                                                    <asp:Button ID="btnAttachDoc" runat="server" Text="Attach Document" CssClass="btn" width="115px" style="padding-right:10px" UseSubmitBehavior="false" OnClientClick="this.disabled='true';this.value='Please wait..';" />  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                                </td>
                                                                <td style="padding-left:2px">
                                                                    <asp:Button ID="btnAttachmentDone" CssClass="btn" runat="server" Text="Generate Docs" style="padding-right:10px; display:none;" Width="125px" />   <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                                                                
                                                                </td>
																<%-- 20-Jul-21 | Commented by Rajeshree K as its not used | INT1FINFXC-135
                                                                <td>
												                    <asp:ImageButton ImageUrl="../App_Resources/Excel.jpg"  runat="server" ID="lnkSampleSchedule" ToolTip="Sample Schedule file" Visible="False" display="none" style="vertical-align:middle;"/>                   
												                </td>--%>
                                                                 <td style="padding-left:2px;">
                                                                    <asp:Button ID="btnPushToken" runat="server" Text="Parsed Termsheet" CssClass="btn" width="120px" style="display: none;" />
                                                                </td>
                                                                <td style="padding-left:2px;">
                                                                    <asp:Button ID="btnSkipAttachment" runat="server" Text="Skip Attachment" CssClass="btn" width="115px"  Visible="false"/><!-- UseSubmitBehavior="false" OnClientClick="this.disabled='true';this.value='Pl';"-->
                                                                </td>
                                                                <td style="padding-left:2px;">
                                                                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="btn" width="115px"  Visible="false"/> 
                                                                </td>                                             
                                                            </tr>
                                                        </table>
                                                        
                                                    </asp:TableCell>
<%--                                                    <asp:TableCell>
                                                        
                                                    </asp:TableCell>--%>
                                                </asp:TableRow>
<%--                                                <asp:TableRow>
                                                    <asp:TableCell></asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:Button ID="btnAttachDoNotRegen" runat="server" Text="Attach Document and do not Regenerate" CssClass="btn" />
                                                    </asp:TableCell>
                                                    <asp:TableCell>
                                                        <asp:Button ID="btnSkipAndDontRegen" runat="server" Text="Skip Attachment and do not Regenerate" CssClass="btn" />
                                                    </asp:TableCell>
                                                </asp:TableRow>--%>
<%--                                                <asp:TableRow>
                                                    <asp:TableCell></asp:TableCell>
                                                    <asp:TableCell>
                                                        
                                                    </asp:TableCell>
                                                </asp:TableRow>--%>
                                            </asp:Table>
                                        </asp:TableCell>
                                    </asp:TableRow>
                                </asp:Table>
                            </asp:Panel>
                        </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Panel ID="pnlTwo" runat="server" BorderStyle="None"  GroupingText="Previous Attached Document"  Width="1190px">  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                    <asp:GridView ID="gvAttachedDocuments" runat="server"  ShowHeaderWhenEmpty="true" EmptyDataText="No Records Found"  AutoGenerateColumns="False" CssClass="Grid frozenGrid" AllowPaging="True" PageSize="15">
                    <RowStyle CssClass="GridItem" />
                    <HeaderStyle CssClass="GridHeader" />
                    <FooterStyle CssClass="GridFooter" />
                    <PagerStyle CssClass="GridPager" />
                    <Columns>
                        <asp:TemplateField HeaderText="Serial No" Visible=" false">
                            <HeaderStyle Width="35" />
                            <ItemStyle Width="35" />
                            <ItemTemplate>
                                <asp:Label ID="lblSerialNo" Width="40" runat="server" Text='<%# Eval("Serial_No")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Version">
                            <HeaderStyle Width="70" />
                            <ItemStyle Width="70" />
                            <ItemTemplate>
                                <asp:Label ID="lblVersion" Width="80" runat="server" Text='<%# Eval("Version")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Deal Id" ItemStyle-HorizontalAlign="Center">   <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                            <HeaderStyle Width="100" />
                            <ItemStyle Width="100" />
                            <ItemTemplate>
                                <asp:Label ID="lblNoteRefID" Width="110" runat="server" Text='<%# Eval("Note_ref_id")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Attached File Name">  <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                            <HeaderStyle Width="350" />
                            <ItemStyle Width="350" />
                            <ItemTemplate>
							 <div style="word-break: break-all">
                                <asp:Label ID="lblDocOutputPath" Width="350" runat="server" Text='<%# Eval("Document_output_path")%>'></asp:Label>
								</div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Event Name">
                            <HeaderStyle Width="180" />
                            <ItemStyle Width="180" />
                            <ItemTemplate>
                                <asp:Label ID="lblEventName" Width="180" runat="server" Text='<%# Eval("Event_Name")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
						 <asp:TemplateField HeaderText="Attached By">
                            <HeaderStyle Width="120" />
                            <ItemStyle Width="120" />
                            <ItemTemplate>
							 <div style="word-break: break-all">
                                <asp:Label ID="lblInsertedBy" Width="80" runat="server" Text='<%# Eval("Inserted_By")%>'></asp:Label>
							</div>	
                            </ItemTemplate>
                        </asp:TemplateField>
						
						<asp:TemplateField HeaderText="Attached At">
                            <HeaderStyle Width="200" />
                            <ItemStyle Width="200" />
                            <ItemTemplate>
							 <div style="word-break: break-all">
                                <asp:Label ID="lblInsertedAt" Width="140" runat="server" Text='<%# Eval("Inserted_At")%>'></asp:Label>
							 </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="View" ItemStyle-HorizontalAlign="Center">   <%--Ashutosh.A || 19-Feb-2021 || Change done for INT1FINFXC-135 || Start--%>
                            <HeaderStyle Width="40" />
                            <ItemStyle Width="40" />
                            <ItemTemplate>
                                <asp:LinkButton ID="lbView" Width="40" runat="server" CommandName="Select" Text='<%# Eval("View")%>' CommandArgument="<%# Container.DataItemIndex %>"></asp:LinkButton>
                                
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="DGT ID" Visible="false">
                            <HeaderStyle Width="60" />
                            <ItemStyle Width="60" />
                            <ItemTemplate>
                                <asp:Label ID="lblDgtId" runat="server" Text='<%# Eval("DGT_ID")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="DGI ID" Visible="false">
                            <HeaderStyle Width="60" />
                            <ItemStyle Width="60" />
                            <ItemTemplate>
                                <asp:Label ID="lblDgiId" runat="server" Text='<%# Eval("DGI_ID")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="Delete">
                            <HeaderStyle Width="40" />
                            <ItemStyle Width="40" />
                            <ItemTemplate>
                               <asp:LinkButton ID="lnkbtnDelete" CssClass="link" runat="server" OnClientClick="return confirmationDialog(this, 'Confirmation', '\n Are you sure you want to delete this record?');" CommandName="Delete" Text="Delete"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                </asp:Panel>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>

<%--   <Start || Added by Arshin S || on 1st Oct 2021 || HSBCELINT-59 On Clicking Merge Docs, the Doc attachment pop should auto close> --%>
    	<script type="text/javascript">
        function closepop() {
            window.top.CloseParentDialog();
        }
       <%--   <End || Added by Arshin S || on 1st Oct 2021 || HSBCELINT-59 On Clicking Merge Docs, the Doc attachment pop should auto close> --%>
    </script>
</asp:Content>
