diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx
index 8be3516..6981431 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx
@@ -1,6 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_archivioDocumenti.ascx.cs" Inherits="ETS_WS.WebUserControls.mod_archivioDocumenti" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
-<%@ Register Src="mod_textAutocomplete.ascx" TagName="mod_textAutocomplete" TagPrefix="uc1" %>
+<%@ Register Src="mod_singleFileUpload.ascx" TagName="mod_singleFileUpload" TagPrefix="uc1" %>
<% if (false)
{ %>
@@ -9,17 +9,17 @@
<% } %>
-
+
+
-
-
+
+
- <%----%>
@@ -29,15 +29,15 @@
-
+
-
-
+
+
+
@@ -48,7 +48,7 @@
-
+
@@ -60,24 +60,26 @@
-
+
- DataDoc:
+
+
- DataRic:
+
+
+
@@ -87,8 +89,7 @@
-
+
@@ -96,7 +97,7 @@
-
+
@@ -123,8 +124,7 @@
-
+
<%--EnableCaching="true" CacheDuration="5" SortParameterName="SortExpression" --%>
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs
index b16c083..2adb900 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs
@@ -5,6 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ETS_Data;
+using NLog;
namespace ETS_WS.WebUserControls
{
@@ -15,12 +16,22 @@ namespace ETS_WS.WebUserControls
///
public event EventHandler eh_reqEdit;
///
+ /// logger class
+ ///
+ protected Logger lg = LogManager.GetCurrentClassLogger();
+ ///
/// caricamento pagina
///
///
///
protected void Page_Load(object sender, EventArgs e)
{
+ if (!Page.IsPostBack)
+ {
+ showHideSubstFile(false);
+ }
+ mod_singleFileUpload1.tempArea = WebShipUtils.mng.UserTempPath;
+ mod_singleFileUpload1.eh_fileUploaded += new EventHandler(mod_singleFileUpload1_eh_fileUploaded);
}
///
/// restituisce il nome di un icona (nel formato nome_icona.png) dal filetype (*.fileType)
@@ -203,7 +214,7 @@ namespace ETS_WS.WebUserControls
fileMover.obj.muoviFile(WebShipUtils.mng.UserTempPath, rigaDoc.fullPath,rigaDoc.Nome, rigaDoc.NomeFile, false);
// evento segnalazione richeista editing!
Response.Redirect("~/MyDocs.aspx");
- #endif
+#endif
}
///
/// gestione update ods
@@ -221,5 +232,50 @@ namespace ETS_WS.WebUserControls
// tolgo commessa che non c'è su query
e.InputParameters.Remove("Commessa");
}
+ ///
+ /// mostro button x sostituzione file
+ ///
+ ///
+ ///
+ protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
+ {
+ showHideSubstFile(true);
+ }
+ ///
+ /// nascondo button sostituzione file
+ ///
+ ///
+ ///
+ protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
+ {
+ showHideSubstFile(false);
+ }
+ ///
+ /// nascondo button sostituzione file
+ ///
+ ///
+ ///
+ protected void grView_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
+ {
+ showHideSubstFile(false);
+ }
+ ///
+ /// mostra/nasconde controllo sostituzione file
+ ///
+ ///
+ private void showHideSubstFile(bool p)
+ {
+ mod_singleFileUpload1.btnEnabled = p;
+ }
+ ///
+ /// file caricato! effettuo sostituzione!
+ ///
+ ///
+ ///
+ void mod_singleFileUpload1_eh_fileUploaded(object sender, EventArgs e)
+ {
+ lg.Info("Caricato file {0} per sostituzione", mod_singleFileUpload1.newFileName);
+ // effettuo operazioni sostituzione file!
+ }
}
}
\ No newline at end of file
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.designer.cs b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.designer.cs
index 29bd54e..9e3cd8f 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.designer.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.designer.cs
@@ -12,6 +12,15 @@ namespace ETS_WS.WebUserControls {
public partial class mod_archivioDocumenti {
+ ///
+ /// mod_singleFileUpload1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::ETS_WS.WebUserControls.mod_singleFileUpload mod_singleFileUpload1;
+
///
/// grView control.
///
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_singleFileUpload.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_singleFileUpload.ascx
index 0eb47dc..be0530f 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_singleFileUpload.ascx
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_singleFileUpload.ascx
@@ -24,7 +24,7 @@
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_singleFileUpload.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_singleFileUpload.ascx.cs
index 56a1ffe..4621fc9 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_singleFileUpload.ascx.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_singleFileUpload.ascx.cs
@@ -28,6 +28,26 @@ namespace ETS_WS.WebUserControls
fileUplAsync.UploadedComplete += new EventHandler(fileUplAsync_UploadedComplete);
}
///
+ /// imposta testo button x switch visibilità
+ ///
+ public string btnText
+ {
+ set
+ {
+ btnShowSostFile.Text = value;
+ }
+ }
+ ///
+ /// button abilitato
+ ///
+ public bool btnEnabled
+ {
+ set
+ {
+ btnShowSostFile.Enabled = value;
+ }
+ }
+ ///
/// area dove salvare i file caricati async
///
public string tempArea
diff --git a/ETS-WS/ETS-WS/bin/ETS-WS.dll b/ETS-WS/ETS-WS/bin/ETS-WS.dll
index f4085eb..e5d4e98 100644
Binary files a/ETS-WS/ETS-WS/bin/ETS-WS.dll and b/ETS-WS/ETS-WS/bin/ETS-WS.dll differ