diff --git a/ETS-WS/ETS-WS/ETS-WS.csproj b/ETS-WS/ETS-WS/ETS-WS.csproj
index d988624..4dd65c8 100644
--- a/ETS-WS/ETS-WS/ETS-WS.csproj
+++ b/ETS-WS/ETS-WS/ETS-WS.csproj
@@ -261,6 +261,12 @@
+
+
+
+
+
+
diff --git a/ETS-WS/ETS-WS/WebShipUtils.cs b/ETS-WS/ETS-WS/WebShipUtils.cs
index b894754..c3ba225 100644
--- a/ETS-WS/ETS-WS/WebShipUtils.cs
+++ b/ETS-WS/ETS-WS/WebShipUtils.cs
@@ -398,6 +398,56 @@ namespace ETS_WS
lg.Info("Spostato file {0} per sostituzione", nomeFile);
}
}
+ ///
+ /// salva su db il tempalte dei metadati correnti
+ ///
+ /// user id (AD) univoco
+ /// nome del dataset
+ /// metadati
+ public void salvaTemplateMedatati(string userId, string setName, docMetaDataSet docsData)
+ {
+ string tagString = "";
+ try
+ {
+ if (docsData.tags.Capacity > 0)
+ {
+ tagString = stringFromList(docsData.tags.ToList(), "#");
+ }
+ }
+ catch
+ { }
+ utils.obj.taTMD.Insert(userId, setName, docsData.commessa, docsData.fase, docsData.fonte, docsData.oggetto, docsData.dataRic, docsData.dataDoc, docsData.path, docsData.InOut, docsData.reqProto, docsData.isRed, tagString);
+ }
+ ///
+ /// restituisce il tempalte metadati
+ ///
+ ///
+ ///
+ ///
+ public docMetaDataSet recuperaTemplateMedatati(string userId, string setName)
+ {
+ docMetaDataSet answ = new docMetaDataSet();
+ DS_WebScip.tbMetaDataSetRow riga;
+ try
+ {
+ riga = utils.obj.taTMD.getByKey(userId, setName)[0];
+ answ.commessa = riga.Commessa;
+ answ.fase = riga.Fase;
+ answ.fonte = riga.Fonte;
+ answ.oggetto = riga.Oggetto;
+ answ.dataRic = riga.DataRic;
+ answ.dataDoc = riga.DataDoc;
+ answ.path = riga.path;
+ answ.InOut = riga.InOut;
+ answ.reqProto = riga.isProto;
+ answ.isRed = riga.isRed;
+ answ.tags = listFromString(riga.tags,"#");
+ }
+ catch
+ { }
+ return answ;
+ }
+
}
///
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx
index 881793f..0c85b63 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx
@@ -22,7 +22,8 @@
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs
index 17cac81..ed749b9 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs
@@ -88,6 +88,16 @@ namespace ETS_WS.WebUserControls
pnlTemplateMetaDati.Visible = showTMD;
showProto();
saveMetaData();
+ if (WebShipUtils.mng.metaPresent)
+ {
+ imgNewTMD.ImageUrl = "~/images/addTMD_m.png";
+ }
+ else
+ {
+ imgNewTMD.ImageUrl = "~/images/addDisTMD_m.png";
+ }
+ imgNewTMD.Enabled = WebShipUtils.mng.metaPresent;
+ txtNomeTMD.Visible = WebShipUtils.mng.metaPresent;
}
///
/// cambio selezione protocollo/senza protocollo
@@ -280,5 +290,14 @@ namespace ETS_WS.WebUserControls
showTMD = !showTMD;
updateVisual();
}
+ ///
+ /// aggiunge un nuovo tempalte metadati x l'utente...
+ ///
+ ///
+ ///
+ protected void imgNewTMD_Click(object sender, ImageClickEventArgs e)
+ {
+ // salvo il tempalte metadati...
+ }
}
}
\ No newline at end of file
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.designer.cs b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.designer.cs
index f6c05fb..6e4a28c 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.designer.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.designer.cs
@@ -39,6 +39,15 @@ namespace ETS_WS.WebUserControls {
///
protected global::System.Web.UI.WebControls.Label Label2;
+ ///
+ /// txtNomeTMD control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtNomeTMD;
+
///
/// imgNewTMD control.
///
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_testata.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_testata.ascx.cs
index e1c7cb1..1d4da6e 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_testata.ascx.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_testata.ascx.cs
@@ -12,7 +12,7 @@ namespace ETS_WS.WebUserControls
{
protected void Page_Load(object sender, EventArgs e)
{
- lblUser.Text = utils.obj.currUserCognomeNome;
+ lblUser.Text = string.Format("{0} ({1})",utils.obj.currUserCognomeNome, utils.obj.currUserId);
lblDataOra.Text = DateTime.Now.ToString("dd-MM-yyyy HH:mm:ss");
}
}
diff --git a/ETS-WS/ETS-WS/bin/ETS-WS.dll b/ETS-WS/ETS-WS/bin/ETS-WS.dll
index 0334c69..5ed510f 100644
Binary files a/ETS-WS/ETS-WS/bin/ETS-WS.dll and b/ETS-WS/ETS-WS/bin/ETS-WS.dll differ
diff --git a/ETS-WS/ETS-WS/bin/ETS_Data.dll b/ETS-WS/ETS-WS/bin/ETS_Data.dll
index 8823bed..65acb69 100644
Binary files a/ETS-WS/ETS-WS/bin/ETS_Data.dll and b/ETS-WS/ETS-WS/bin/ETS_Data.dll differ
diff --git a/ETS-WS/ETS-WS/images/addDisTMD_l.png b/ETS-WS/ETS-WS/images/addDisTMD_l.png
new file mode 100644
index 0000000..22a839a
Binary files /dev/null and b/ETS-WS/ETS-WS/images/addDisTMD_l.png differ
diff --git a/ETS-WS/ETS-WS/images/addDisTMD_m.png b/ETS-WS/ETS-WS/images/addDisTMD_m.png
new file mode 100644
index 0000000..5dcf24f
Binary files /dev/null and b/ETS-WS/ETS-WS/images/addDisTMD_m.png differ
diff --git a/ETS-WS/ETS-WS/images/addDisTMD_s.png b/ETS-WS/ETS-WS/images/addDisTMD_s.png
new file mode 100644
index 0000000..958e746
Binary files /dev/null and b/ETS-WS/ETS-WS/images/addDisTMD_s.png differ
diff --git a/ETS-WS/ETS-WS/images/addTMD_l.png b/ETS-WS/ETS-WS/images/addTMD_l.png
new file mode 100644
index 0000000..636249f
Binary files /dev/null and b/ETS-WS/ETS-WS/images/addTMD_l.png differ
diff --git a/ETS-WS/ETS-WS/images/addTMD_m.png b/ETS-WS/ETS-WS/images/addTMD_m.png
new file mode 100644
index 0000000..c4d3b4a
Binary files /dev/null and b/ETS-WS/ETS-WS/images/addTMD_m.png differ
diff --git a/ETS-WS/ETS-WS/images/addTMD_s.png b/ETS-WS/ETS-WS/images/addTMD_s.png
new file mode 100644
index 0000000..3eea164
Binary files /dev/null and b/ETS-WS/ETS-WS/images/addTMD_s.png differ
diff --git a/ETS_Data/DS_WebScip.Designer.cs b/ETS_Data/DS_WebScip.Designer.cs
index 46af4b2..3d585b7 100644
--- a/ETS_Data/DS_WebScip.Designer.cs
+++ b/ETS_Data/DS_WebScip.Designer.cs
@@ -9076,7 +9076,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path, I" +
@@ -9091,10 +9091,17 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_setName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
- this._commandCollection[2].CommandText = "dbo.stp_MDS_getByUserId";
+ this._commandCollection[2].CommandText = "dbo.stp_MDS_GetByUserId_setName";
this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@setName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[3].Connection = this.Connection;
+ this._commandCollection[3].CommandText = "dbo.stp_MDS_getByUserId";
+ this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -9125,7 +9132,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
- public virtual DS_WebScip.tbMetaDataSetDataTable getByUserId(string userId) {
+ public virtual DS_WebScip.tbMetaDataSetDataTable getByKey(string userId, string setName) {
this.Adapter.SelectCommand = this.CommandCollection[2];
if ((userId == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
@@ -9133,6 +9140,29 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(userId));
}
+ if ((setName == null)) {
+ this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[2].Value = ((string)(setName));
+ }
+ DS_WebScip.tbMetaDataSetDataTable dataTable = new DS_WebScip.tbMetaDataSetDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+ public virtual DS_WebScip.tbMetaDataSetDataTable getByUserId(string userId) {
+ this.Adapter.SelectCommand = this.CommandCollection[3];
+ if ((userId == null)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((string)(userId));
+ }
DS_WebScip.tbMetaDataSetDataTable dataTable = new DS_WebScip.tbMetaDataSetDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
diff --git a/ETS_Data/DS_WebScip.xsd b/ETS_Data/DS_WebScip.xsd
index b0ba756..8639e67 100644
--- a/ETS_Data/DS_WebScip.xsd
+++ b/ETS_Data/DS_WebScip.xsd
@@ -866,6 +866,18 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
+
+
+
+ dbo.stp_MDS_GetByUserId_setName
+
+
+
+
+
+
+
+
@@ -887,7 +899,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
-
+
@@ -959,7 +971,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
-
+
@@ -1127,7 +1139,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
-
+
@@ -1155,7 +1167,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
-
+
@@ -1169,7 +1181,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
-
+
@@ -1177,7 +1189,7 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
-
+
@@ -1281,8 +1293,8 @@ SELECT userId, setName, Commessa, Fase, Fonte, Oggetto, DataRic, DataDoc, path,
-
-
+
+
\ No newline at end of file
diff --git a/ETS_Data/DS_WebScip.xss b/ETS_Data/DS_WebScip.xss
index 58cfb7f..198dfa0 100644
--- a/ETS_Data/DS_WebScip.xss
+++ b/ETS_Data/DS_WebScip.xss
@@ -4,16 +4,17 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
-->
-
+
-
-
-
-
-
+
+
+
+
+
+
-
+
785
@@ -25,7 +26,7 @@
-
+
642
diff --git a/ETS_Data/utils.cs b/ETS_Data/utils.cs
index efe8dfb..d3e3d56 100644
--- a/ETS_Data/utils.cs
+++ b/ETS_Data/utils.cs
@@ -28,6 +28,7 @@ namespace ETS_Data
public DS_WebScipTableAdapters.tbDocumentiTableAdapter taDoc;
public DS_WebScipTableAdapters.Tags2DocTableAdapter taTags2Doc;
+ public DS_WebScipTableAdapters.tbMetaDataSetTableAdapter taTMD;
///
@@ -50,6 +51,7 @@ namespace ETS_Data
taAST = new DS_utilsTableAdapters.AnagSuggestTagsTableAdapter();
taDoc = new DS_WebScipTableAdapters.tbDocumentiTableAdapter();
taTags2Doc = new DS_WebScipTableAdapters.Tags2DocTableAdapter();
+ taTMD = new DS_WebScipTableAdapters.tbMetaDataSetTableAdapter();
}
///
/// effettua setup dei connection strings da web.config delal singola applicazione
@@ -75,6 +77,7 @@ namespace ETS_Data
taAST.Connection.ConnectionString = connStringETS_WS;
taDoc.Connection.ConnectionString = connStringETS_WS;
taTags2Doc.Connection.ConnectionString = connStringETS_WS;
+ taTMD.Connection.ConnectionString = connStringETS_WS;
}
#endregion
@@ -213,6 +216,21 @@ namespace ETS_Data
return answ;
}
}
+ ///
+ /// UserId (AD) utente correntemente connesso
+ ///
+ public string currUserId
+ {
+ get
+ {
+ // controllo e salvo in sessione se necessario...
+ if (!isInSessionObject("currUserId"))
+ {
+ setSessionVal("currUserId", currUserAD);
+ }
+ return currUserAD;
+ }
+ }
#endregion