diff --git a/Projects/WebGIM/GIM_data/DS_Mag.Designer.cs b/Projects/WebGIM/GIM_data/DS_Mag.Designer.cs index 019dbd2..bec6ebe 100644 --- a/Projects/WebGIM/GIM_data/DS_Mag.Designer.cs +++ b/Projects/WebGIM/GIM_data/DS_Mag.Designer.cs @@ -7448,33 +7448,40 @@ namespace GIM_data.DS_MagTableAdapters { [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[4]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT TagCode, Class, TagDescr\r\nFROM AnagTags"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_AnTag_deleteQuery"; + this._commandCollection[1].CommandText = "dbo.stp_AnTag_avail4Item"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TagCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxItem", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_AnTag_insertQuery"; + this._commandCollection[2].CommandText = "dbo.stp_AnTag_deleteQuery"; 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("@TagCode", 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("@Class", 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("@TagDescr", 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("@Original_TagCode", 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_AnTag_updateQuery"; + this._commandCollection[3].CommandText = "dbo.stp_AnTag_insertQuery"; 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("@TagCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Class", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagDescr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TagCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "dbo.stp_AnTag_updateQuery"; + this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[4].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[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Class", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagDescr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TagCode", 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()] @@ -7501,6 +7508,23 @@ namespace GIM_data.DS_MagTableAdapters { 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_Mag.AnagTagsDataTable avail4item(global::System.Nullable idxItem) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((idxItem.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxItem.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_Mag.AnagTagsDataTable dataTable = new DS_Mag.AnagTagsDataTable(); + 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")] @@ -7653,7 +7677,7 @@ namespace GIM_data.DS_MagTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int deleteQuery(string Original_TagCode) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; if ((Original_TagCode == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -7681,7 +7705,7 @@ namespace GIM_data.DS_MagTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int insertQuery(string TagCode, string Class, string TagDescr) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; if ((TagCode == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -7720,25 +7744,31 @@ namespace GIM_data.DS_MagTableAdapters { [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")] - public virtual int updateQuery(string Class, string TagDescr, string Original_TagCode) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; - if ((Class == null)) { + public virtual int updateQuery(string TagCode, string Class, string TagDescr, string Original_TagCode) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + if ((TagCode == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } else { - command.Parameters[1].Value = ((string)(Class)); + command.Parameters[1].Value = ((string)(TagCode)); } - if ((TagDescr == null)) { + if ((Class == null)) { command.Parameters[2].Value = global::System.DBNull.Value; } else { - command.Parameters[2].Value = ((string)(TagDescr)); + command.Parameters[2].Value = ((string)(Class)); } - if ((Original_TagCode == null)) { + if ((TagDescr == null)) { command.Parameters[3].Value = global::System.DBNull.Value; } else { - command.Parameters[3].Value = ((string)(Original_TagCode)); + command.Parameters[3].Value = ((string)(TagDescr)); + } + if ((Original_TagCode == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(Original_TagCode)); } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) diff --git a/Projects/WebGIM/GIM_data/DS_Mag.xsd b/Projects/WebGIM/GIM_data/DS_Mag.xsd index ca2c8de..368bb68 100644 --- a/Projects/WebGIM/GIM_data/DS_Mag.xsd +++ b/Projects/WebGIM/GIM_data/DS_Mag.xsd @@ -386,6 +386,17 @@ FROM AnagTags + + + + dbo.stp_AnTag_avail4Item + + + + + + + @@ -416,6 +427,7 @@ FROM AnagTags dbo.stp_AnTag_updateQuery + diff --git a/Projects/WebGIM/GIM_data/bin/GIM_data.dll b/Projects/WebGIM/GIM_data/bin/GIM_data.dll index e040df4..a6838d9 100644 Binary files a/Projects/WebGIM/GIM_data/bin/GIM_data.dll and b/Projects/WebGIM/GIM_data/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_data/bin/SteamWare.dll b/Projects/WebGIM/GIM_data/bin/SteamWare.dll index 5e7ff26..c4178ba 100644 Binary files a/Projects/WebGIM/GIM_data/bin/SteamWare.dll and b/Projects/WebGIM/GIM_data/bin/SteamWare.dll differ diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx b/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx index 7099614..3745b64 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx @@ -41,7 +41,7 @@ - + @@ -68,6 +68,7 @@ + diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx b/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx index 229b563..05da2ae 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx @@ -3,9 +3,22 @@ - + +

<%: traduci("Tags2Item") %>

+
- +
+ <%: traduci("addNewTag2Item") %> +
+ + + + + + +
+
+ @@ -21,53 +34,55 @@ <%-- - - - - - - - - - - - - - --%> + + + + + + + + + + + + + --%> <%----%> - <%-- - - - - - - - - - - - - - - --%> + + + <%----%> + + + + + + + + + + + - - + + + + + +
- + @@ -121,7 +136,7 @@ --%> - + diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx.cs index 23f8b72..e4ae380 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx.cs +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx.cs @@ -115,11 +115,11 @@ namespace GIM_site.WebUserControls { } } int totRecord = grViewItem.Rows.Count + grViewItem.PageSize * (grViewItem.PageCount - 1); - lblNumRec.Text = string.Format("{0} records of ~ {1}", grViewItem.Rows.Count, totRecord); + lblNumRecItem.Text = string.Format("{0} records of ~ {1}", grViewItem.Rows.Count, totRecord); } else { - lblNumRec.Text = ""; + lblNumRecItem.Text = ""; } } /// @@ -144,11 +144,11 @@ namespace GIM_site.WebUserControls { } } int totRecord = grViewTags.Rows.Count + grViewTags.PageSize * (grViewTags.PageCount - 1); - lblNumRec.Text = string.Format("{0} records of ~ {1}", grViewTags.Rows.Count, totRecord); + lblNumRecTags.Text = string.Format("{0} records of ~ {1}", grViewTags.Rows.Count, totRecord); } else { - lblNumRec.Text = ""; + lblNumRecTags.Text = ""; } } /// @@ -249,5 +249,27 @@ namespace GIM_site.WebUserControls grViewItem.DataBind(); } + protected void lbtAddNew_Click(object sender, EventArgs e) + { + // aggiunge tag ad item selezionato... + int idxItem = 0; + try + { + idxItem = Convert.ToInt32(IdxItem); + } + catch + { } + if ((ddlTags.SelectedValue != "") && idxItem > 0) + { + TA_app.obj.taTag2Item.Insert(idxItem, ddlTags.SelectedValue); + grViewTags.DataBind(); + ddlTags.DataBind(); + } + } + + protected void grViewTags_RowDeleted(object sender, GridViewDeletedEventArgs e) + { + ddlTags.DataBind(); + } } } \ No newline at end of file diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx.designer.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx.designer.cs index 2a16c47..f1c81b1 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx.designer.cs +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_tag2Item.ascx.designer.cs @@ -40,22 +40,49 @@ namespace GIM_site.WebUserControls { protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTags; /// - /// grViewItem control. + /// lbtAddNew control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.GridView grViewItem; + protected global::System.Web.UI.WebControls.LinkButton lbtAddNew; /// - /// Label1 control. + /// ddlTags control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label Label1; + protected global::System.Web.UI.WebControls.DropDownList ddlTags; + + /// + /// odsTagsAvail control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsTagsAvail; + + /// + /// grViewTags control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grViewTags; + + /// + /// lblNumRecTags control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblNumRecTags; /// /// odsByItem control. @@ -76,22 +103,22 @@ namespace GIM_site.WebUserControls { protected global::System.Web.UI.HtmlControls.HtmlGenericControl divItems; /// - /// grViewTags control. + /// grViewItem control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.GridView grViewTags; + protected global::System.Web.UI.WebControls.GridView grViewItem; /// - /// lblNumRec control. + /// lblNumRecItem control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lblNumRec; + protected global::System.Web.UI.WebControls.Label lblNumRecItem; /// /// odsByTags control. diff --git a/Projects/WebGIM/GIM_site/bin/GIM_data.dll b/Projects/WebGIM/GIM_site/bin/GIM_data.dll index e040df4..a6838d9 100644 Binary files a/Projects/WebGIM/GIM_site/bin/GIM_data.dll and b/Projects/WebGIM/GIM_site/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_site/bin/GIM_site.dll b/Projects/WebGIM/GIM_site/bin/GIM_site.dll index 804f24a..cf0ca26 100644 Binary files a/Projects/WebGIM/GIM_site/bin/GIM_site.dll and b/Projects/WebGIM/GIM_site/bin/GIM_site.dll differ diff --git a/Projects/WebGIM/GIM_site/bin/SteamWare.dll b/Projects/WebGIM/GIM_site/bin/SteamWare.dll index 5e7ff26..c4178ba 100644 Binary files a/Projects/WebGIM/GIM_site/bin/SteamWare.dll and b/Projects/WebGIM/GIM_site/bin/SteamWare.dll differ diff --git a/Projects/WebGIM/GIM_site/sql/GIM_1.6.256.sql b/Projects/WebGIM/GIM_site/sql/GIM_1.6.256.sql index 3f30005..d7e24f6 100644 --- a/Projects/WebGIM/GIM_site/sql/GIM_1.6.256.sql +++ b/Projects/WebGIM/GIM_site/sql/GIM_1.6.256.sql @@ -52,4 +52,6 @@ exec voc.stp_insNewLemma 'GestioneSinonimi', 'Gestione ricodifica Etichette' exec voc.stp_insNewLemma 'TagCodeOrig', 'Etichetta originale import' exec voc.stp_insNewLemma 'Tag2Macc', 'Macchine associate' exec voc.stp_insNewLemma 'Tag2Item', 'Item associati' +exec voc.stp_insNewLemma 'Tags2Item', 'Etichette Associate' +exec voc.stp_insNewLemma 'addNewTag2Item', 'Aggiungi Etichetta ad Item'