82 lines
5.8 KiB
Plaintext
82 lines
5.8 KiB
Plaintext
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_fileUpload.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_fileUpload" %>
|
|
|
|
<div style="min-width: 300px; background-color: #DEDEDE;">
|
|
<%--<asp:UpdatePanel ID="uppContainer" runat="server">
|
|
<Triggers>
|
|
<asp:PostBackTrigger ControlID="btnUpload" />
|
|
</Triggers>
|
|
<ContentTemplate>--%>
|
|
<div id="divFileUpl" runat="server" style="width: 100%;">
|
|
<asp:FileUpload ID="FileUploadControl" runat="server" />
|
|
</div>
|
|
<div id="divNewEdit" class="row" runat="server" style="font-size: 0.8em; padding: 2px;">
|
|
<div class="col-xs-6">
|
|
<asp:Button ID="btnAdd" runat="server" CssClass="btn btn-xs btn-success" Text="Nuovo Allegato" OnClick="btnAdd_Click" Enabled='<%# enableMod %>' Width="100%" />
|
|
<asp:Button ID="btnCancel" runat="server" CssClass="btn btn-xs btn-danger" Text="Annulla" OnClick="btnCancel_Click" Width="100%" />
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<asp:Button ID="btnUpload" runat="server" CssClass="btn btn-xs btn-info" Text="Upload" OnClick="Upload" data-theme="b" Width="100%" />
|
|
</div>
|
|
</div>
|
|
<asp:GridView ID="grView" runat="server" Width="100%" AutoGenerateColumns="False" DataSourceID="odsFile" DataKeyNames="idxFile" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
|
<EditRowStyle BackColor="#2461BF" />
|
|
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
|
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
|
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
|
<RowStyle BackColor="#EFF3FB" HorizontalAlign="Left" />
|
|
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
|
<SortedAscendingCellStyle BackColor="#F5F7FB" />
|
|
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
|
|
<SortedDescendingCellStyle BackColor="#E9EBEF" />
|
|
<SortedDescendingHeaderStyle BackColor="#4870BE" />
|
|
<AlternatingRowStyle BackColor="White" />
|
|
<EmptyDataTemplate>
|
|
<%: traduci("NoFileFound") %>
|
|
</EmptyDataTemplate>
|
|
<Columns>
|
|
<asp:TemplateField ItemStyle-HorizontalAlign="right">
|
|
<ItemTemplate>
|
|
<div id="DivSel" runat="server" visible='<%# isWriteEnabled %>'>
|
|
<asp:LinkButton ID="lnkSelect" runat="server" CausesValidation="False" CommandName="Select" Text="Select" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-edit ui-btn-icon-notext ui-btn-inline" ToolTip="Modifica" Visible='<%# enableMod %>'><i class="fa fa-2x fa-edit"></i></asp:LinkButton>
|
|
</div>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="File">
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("FileName") %>'></asp:TextBox>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<div>
|
|
<asp:LinkButton ID="lnkDownload" runat="server" OnClick="DownloadFile"
|
|
CommandArgument='<%# Eval("idxFile") %>'>
|
|
<asp:Label ID="Label1" runat="server" Text='<%# Eval("FileName") %>' />
|
|
</asp:LinkButton></div><div>
|
|
<asp:Label CssClass="flLeft" ID="lblDataMod" runat="server" Text='<%# Eval("DataMod","{0:yyyy-MM-dd HH:mm}") %>' Font-Size="0.7em" />
|
|
<asp:Label CssClass="flRight" ID="lblSize" runat="server" Text='<%# Eval("Size","{0:N0} kb") %>' Font-Size="0.8em" />
|
|
</div>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Left" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField ItemStyle-HorizontalAlign="right">
|
|
<ItemTemplate>
|
|
<div id="DivDel" runat="server" visible='<%# isWriteEnabled %>'>
|
|
<asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-inline" ToolTip="Elimina" OnClientClick="return confirm('Sei sicuro di voler eliminare il file?')" Visible='<%# enableMod %>'><i class="fa fa-2x fa-trash"></i></asp:LinkButton></div></ItemTemplate><ItemStyle HorizontalAlign="Center"></ItemStyle>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
<asp:HiddenField runat="server" ID="hfFiltKey" />
|
|
<asp:HiddenField runat="server" ID="hfReadOnly" />
|
|
<asp:ObjectDataSource ID="odsFile" runat="server" DeleteMethod="deleteQuery" OldValuesParameterFormatString="original_{0}" SelectMethod="getByFiltKey" TypeName="CMS_SC_Data.DS_UtilityTableAdapters.tblFilesTableAdapter">
|
|
<SelectParameters>
|
|
<asp:ControlParameter ControlID="hfFiltKey" PropertyName="Value" Type="String" Name="FiltKey" />
|
|
</SelectParameters>
|
|
<DeleteParameters>
|
|
<asp:Parameter Name="Original_idxFile" Type="Int32" />
|
|
</DeleteParameters>
|
|
</asp:ObjectDataSource>
|
|
|
|
<%--</ContentTemplate>
|
|
</asp:UpdatePanel>--%>
|
|
</div>
|