altri step x gestione ricodifiche

This commit is contained in:
Samuele E. Locatelli
2015-11-23 13:02:16 +01:00
parent a7e531ddda
commit 1c9e3841be
20 changed files with 1370 additions and 170 deletions
+813
View File
@@ -42,6 +42,8 @@ namespace GIM_data {
private AnagMacchineDataTable tableAnagMacchine;
private SinonimiTagDataTable tableSinonimiTag;
private global::System.Data.DataRelation relationFK_MagRic_AnagLocazioni;
private global::System.Data.DataRelation relationFK_MagRic_AnagItems;
@@ -111,6 +113,9 @@ namespace GIM_data {
if ((ds.Tables["AnagMacchine"] != null)) {
base.Tables.Add(new AnagMacchineDataTable(ds.Tables["AnagMacchine"]));
}
if ((ds.Tables["SinonimiTag"] != null)) {
base.Tables.Add(new SinonimiTagDataTable(ds.Tables["SinonimiTag"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
@@ -219,6 +224,16 @@ namespace GIM_data {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Browsable(false)]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
public SinonimiTagDataTable SinonimiTag {
get {
return this.tableSinonimiTag;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.BrowsableAttribute(true)]
@@ -313,6 +328,9 @@ namespace GIM_data {
if ((ds.Tables["AnagMacchine"] != null)) {
base.Tables.Add(new AnagMacchineDataTable(ds.Tables["AnagMacchine"]));
}
if ((ds.Tables["SinonimiTag"] != null)) {
base.Tables.Add(new SinonimiTagDataTable(ds.Tables["SinonimiTag"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
@@ -400,6 +418,12 @@ namespace GIM_data {
this.tableAnagMacchine.InitVars();
}
}
this.tableSinonimiTag = ((SinonimiTagDataTable)(base.Tables["SinonimiTag"]));
if ((initTable == true)) {
if ((this.tableSinonimiTag != null)) {
this.tableSinonimiTag.InitVars();
}
}
this.relationFK_MagRic_AnagLocazioni = this.Relations["FK_MagRic_AnagLocazioni"];
this.relationFK_MagRic_AnagItems = this.Relations["FK_MagRic_AnagItems"];
this.relationFK_MovMagRic_AnagItems = this.Relations["FK_MovMagRic_AnagItems"];
@@ -435,6 +459,8 @@ namespace GIM_data {
base.Tables.Add(this.tableTag2Macc);
this.tableAnagMacchine = new AnagMacchineDataTable();
base.Tables.Add(this.tableAnagMacchine);
this.tableSinonimiTag = new SinonimiTagDataTable();
base.Tables.Add(this.tableSinonimiTag);
this.relationFK_MagRic_AnagLocazioni = new global::System.Data.DataRelation("FK_MagRic_AnagLocazioni", new global::System.Data.DataColumn[] {
this.tableAnagLocazioni.CodLocazioneColumn}, new global::System.Data.DataColumn[] {
this.tableMagRic.CodLocazioneColumn}, false);
@@ -519,6 +545,12 @@ namespace GIM_data {
return false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private bool ShouldSerializeSinonimiTag() {
return false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
@@ -601,6 +633,9 @@ namespace GIM_data {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public delegate void AnagMacchineRowChangeEventHandler(object sender, AnagMacchineRowChangeEvent e);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public delegate void SinonimiTagRowChangeEventHandler(object sender, SinonimiTagRowChangeEvent e);
/// <summary>
///Represents the strongly named DataTable class.
///</summary>
@@ -3594,6 +3629,281 @@ namespace GIM_data {
}
}
/// <summary>
///Represents the strongly named DataTable class.
///</summary>
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class SinonimiTagDataTable : global::System.Data.TypedTableBase<SinonimiTagRow> {
private global::System.Data.DataColumn columnTagCodeOrig;
private global::System.Data.DataColumn columnTagCode;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public SinonimiTagDataTable() {
this.TableName = "SinonimiTag";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal SinonimiTagDataTable(global::System.Data.DataTable table) {
this.TableName = table.TableName;
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace)) {
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected SinonimiTagDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
base(info, context) {
this.InitVars();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn TagCodeOrigColumn {
get {
return this.columnTagCodeOrig;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn TagCodeColumn {
get {
return this.columnTagCode;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public SinonimiTagRow this[int index] {
get {
return ((SinonimiTagRow)(this.Rows[index]));
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event SinonimiTagRowChangeEventHandler SinonimiTagRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event SinonimiTagRowChangeEventHandler SinonimiTagRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event SinonimiTagRowChangeEventHandler SinonimiTagRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event SinonimiTagRowChangeEventHandler SinonimiTagRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void AddSinonimiTagRow(SinonimiTagRow row) {
this.Rows.Add(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public SinonimiTagRow AddSinonimiTagRow(string TagCodeOrig, string TagCode) {
SinonimiTagRow rowSinonimiTagRow = ((SinonimiTagRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
TagCodeOrig,
TagCode};
rowSinonimiTagRow.ItemArray = columnValuesArray;
this.Rows.Add(rowSinonimiTagRow);
return rowSinonimiTagRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public SinonimiTagRow FindByTagCodeOrig(string TagCodeOrig) {
return ((SinonimiTagRow)(this.Rows.Find(new object[] {
TagCodeOrig})));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {
SinonimiTagDataTable cln = ((SinonimiTagDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected override global::System.Data.DataTable CreateInstance() {
return new SinonimiTagDataTable();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal void InitVars() {
this.columnTagCodeOrig = base.Columns["TagCodeOrig"];
this.columnTagCode = base.Columns["TagCode"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitClass() {
this.columnTagCodeOrig = new global::System.Data.DataColumn("TagCodeOrig", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnTagCodeOrig);
this.columnTagCode = new global::System.Data.DataColumn("TagCode", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnTagCode);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnTagCodeOrig}, true));
this.columnTagCodeOrig.AllowDBNull = false;
this.columnTagCodeOrig.Unique = true;
this.columnTagCodeOrig.MaxLength = 50;
this.columnTagCode.AllowDBNull = false;
this.columnTagCode.MaxLength = 50;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public SinonimiTagRow NewSinonimiTagRow() {
return ((SinonimiTagRow)(this.NewRow()));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
return new SinonimiTagRow(builder);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected override global::System.Type GetRowType() {
return typeof(SinonimiTagRow);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.SinonimiTagRowChanged != null)) {
this.SinonimiTagRowChanged(this, new SinonimiTagRowChangeEvent(((SinonimiTagRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.SinonimiTagRowChanging != null)) {
this.SinonimiTagRowChanging(this, new SinonimiTagRowChangeEvent(((SinonimiTagRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.SinonimiTagRowDeleted != null)) {
this.SinonimiTagRowDeleted(this, new SinonimiTagRowChangeEvent(((SinonimiTagRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.SinonimiTagRowDeleting != null)) {
this.SinonimiTagRowDeleting(this, new SinonimiTagRowChangeEvent(((SinonimiTagRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void RemoveSinonimiTagRow(SinonimiTagRow row) {
this.Rows.Remove(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
DS_Mag ds = new DS_Mag();
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
any1.MinOccurs = new decimal(0);
any1.MaxOccurs = decimal.MaxValue;
any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any1);
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
any2.MinOccurs = new decimal(1);
any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
sequence.Items.Add(any2);
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
attribute1.Name = "namespace";
attribute1.FixedValue = ds.Namespace;
type.Attributes.Add(attribute1);
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
attribute2.Name = "tableTypeName";
attribute2.FixedValue = "SinonimiTagDataTable";
type.Attributes.Add(attribute2);
type.Particle = sequence;
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
if (xs.Contains(dsSchema.TargetNamespace)) {
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
try {
global::System.Xml.Schema.XmlSchema schema = null;
dsSchema.Write(s1);
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
s2.SetLength(0);
schema.Write(s2);
if ((s1.Length == s2.Length)) {
s1.Position = 0;
s2.Position = 0;
for (; ((s1.Position != s1.Length)
&& (s1.ReadByte() == s2.ReadByte())); ) {
;
}
if ((s1.Position == s1.Length)) {
return type;
}
}
}
}
finally {
if ((s1 != null)) {
s1.Close();
}
if ((s2 != null)) {
s2.Close();
}
}
}
xs.Add(dsSchema);
return type;
}
}
/// <summary>
///Represents strongly named DataRow class.
///</summary>
@@ -4699,6 +5009,43 @@ namespace GIM_data {
}
}
/// <summary>
///Represents strongly named DataRow class.
///</summary>
public partial class SinonimiTagRow : global::System.Data.DataRow {
private SinonimiTagDataTable tableSinonimiTag;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal SinonimiTagRow(global::System.Data.DataRowBuilder rb) :
base(rb) {
this.tableSinonimiTag = ((SinonimiTagDataTable)(this.Table));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string TagCodeOrig {
get {
return ((string)(this[this.tableSinonimiTag.TagCodeOrigColumn]));
}
set {
this[this.tableSinonimiTag.TagCodeOrigColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string TagCode {
get {
return ((string)(this[this.tableSinonimiTag.TagCodeColumn]));
}
set {
this[this.tableSinonimiTag.TagCodeColumn] = value;
}
}
}
/// <summary>
///Row event argument class
///</summary>
@@ -5004,6 +5351,40 @@ namespace GIM_data {
}
}
}
/// <summary>
///Row event argument class
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public class SinonimiTagRowChangeEvent : global::System.EventArgs {
private SinonimiTagRow eventRow;
private global::System.Data.DataRowAction eventAction;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public SinonimiTagRowChangeEvent(SinonimiTagRow row, global::System.Data.DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public SinonimiTagRow Row {
get {
return this.eventRow;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
namespace GIM_data.DS_MagTableAdapters {
@@ -8474,6 +8855,372 @@ namespace GIM_data.DS_MagTableAdapters {
}
}
/// <summary>
///Represents the connection and commands used to retrieve and save data.
///</summary>
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
[global::System.ComponentModel.ToolboxItem(true)]
[global::System.ComponentModel.DataObjectAttribute(true)]
[global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public partial class SinonimiTagTableAdapter : global::System.ComponentModel.Component {
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
private global::System.Data.SqlClient.SqlConnection _connection;
private global::System.Data.SqlClient.SqlTransaction _transaction;
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
private bool _clearBeforeFill;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public SinonimiTagTableAdapter() {
this.ClearBeforeFill = true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
get {
if ((this._adapter == null)) {
this.InitAdapter();
}
return this._adapter;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal global::System.Data.SqlClient.SqlConnection Connection {
get {
if ((this._connection == null)) {
this.InitConnection();
}
return this._connection;
}
set {
this._connection = value;
if ((this.Adapter.InsertCommand != null)) {
this.Adapter.InsertCommand.Connection = value;
}
if ((this.Adapter.DeleteCommand != null)) {
this.Adapter.DeleteCommand.Connection = value;
}
if ((this.Adapter.UpdateCommand != null)) {
this.Adapter.UpdateCommand.Connection = value;
}
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
if ((this.CommandCollection[i] != null)) {
((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal global::System.Data.SqlClient.SqlTransaction Transaction {
get {
return this._transaction;
}
set {
this._transaction = value;
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
this.CommandCollection[i].Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.DeleteCommand != null))) {
this.Adapter.DeleteCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.InsertCommand != null))) {
this.Adapter.InsertCommand.Transaction = this._transaction;
}
if (((this.Adapter != null)
&& (this.Adapter.UpdateCommand != null))) {
this.Adapter.UpdateCommand.Transaction = this._transaction;
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
get {
if ((this._commandCollection == null)) {
this.InitCommandCollection();
}
return this._commandCollection;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public bool ClearBeforeFill {
get {
return this._clearBeforeFill;
}
set {
this._clearBeforeFill = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitAdapter() {
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
tableMapping.SourceTable = "Table";
tableMapping.DataSetTable = "SinonimiTag";
tableMapping.ColumnMappings.Add("TagCodeOrig", "TagCodeOrig");
tableMapping.ColumnMappings.Add("TagCode", "TagCode");
this._adapter.TableMappings.Add(tableMapping);
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
this._adapter.DeleteCommand.Connection = this.Connection;
this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[SinonimiTag] WHERE (([TagCodeOrig] = @Original_TagCodeOrig))";
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TagCodeOrig", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCodeOrig", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
this._adapter.InsertCommand.Connection = this.Connection;
this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[SinonimiTag] ([TagCodeOrig], [TagCode]) VALUES (@TagCodeOrig, " +
"@TagCode)";
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCodeOrig", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCodeOrig", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
this._adapter.UpdateCommand.Connection = this.Connection;
this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[SinonimiTag] SET [TagCodeOrig] = @TagCodeOrig, [TagCode] = @TagCode" +
" WHERE (([TagCodeOrig] = @Original_TagCodeOrig))";
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCodeOrig", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCodeOrig", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TagCodeOrig", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCodeOrig", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitConnection() {
this._connection = new global::System.Data.SqlClient.SqlConnection();
this._connection.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["GIMConnectionString"].ConnectionString;
}
[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[2];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT TagCodeOrig, TagCode FROM dbo.SinonimiTag";
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_SinTag_UpdateQuery";
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_TagCodeOrig", 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("@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()]
[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.Fill, true)]
public virtual int Fill(DS_Mag.SinonimiTagDataTable dataTable) {
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
[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, true)]
public virtual DS_Mag.SinonimiTagDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
DS_Mag.SinonimiTagDataTable dataTable = new DS_Mag.SinonimiTagDataTable();
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")]
public virtual int Update(DS_Mag.SinonimiTagDataTable dataTable) {
return this.Adapter.Update(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")]
public virtual int Update(DS_Mag dataSet) {
return this.Adapter.Update(dataSet, "SinonimiTag");
}
[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 Update(global::System.Data.DataRow dataRow) {
return this.Adapter.Update(new global::System.Data.DataRow[] {
dataRow});
}
[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 Update(global::System.Data.DataRow[] dataRows) {
return this.Adapter.Update(dataRows);
}
[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.Delete, true)]
public virtual int Delete(string Original_TagCodeOrig) {
if ((Original_TagCodeOrig == null)) {
throw new global::System.ArgumentNullException("Original_TagCodeOrig");
}
else {
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_TagCodeOrig));
}
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
this.Adapter.DeleteCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
this.Adapter.DeleteCommand.Connection.Close();
}
}
}
[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.Insert, true)]
public virtual int Insert(string TagCodeOrig, string TagCode) {
if ((TagCodeOrig == null)) {
throw new global::System.ArgumentNullException("TagCodeOrig");
}
else {
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(TagCodeOrig));
}
if ((TagCode == null)) {
throw new global::System.ArgumentNullException("TagCode");
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(TagCode));
}
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
this.Adapter.InsertCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
this.Adapter.InsertCommand.Connection.Close();
}
}
}
[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.Update, true)]
public virtual int Update(string TagCodeOrig, string TagCode, string Original_TagCodeOrig) {
if ((TagCodeOrig == null)) {
throw new global::System.ArgumentNullException("TagCodeOrig");
}
else {
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(TagCodeOrig));
}
if ((TagCode == null)) {
throw new global::System.ArgumentNullException("TagCode");
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(TagCode));
}
if ((Original_TagCodeOrig == null)) {
throw new global::System.ArgumentNullException("Original_TagCodeOrig");
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_TagCodeOrig));
}
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
this.Adapter.UpdateCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
this.Adapter.UpdateCommand.Connection.Close();
}
}
}
[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.Update, true)]
public virtual int Update(string TagCode, string Original_TagCodeOrig) {
return this.Update(Original_TagCodeOrig, TagCode, Original_TagCodeOrig);
}
[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.Update, false)]
public virtual int updateQuery(string Original_TagCodeOrig, string TagCode) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1];
if ((Original_TagCodeOrig == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
else {
command.Parameters[1].Value = ((string)(Original_TagCodeOrig));
}
if ((TagCode == null)) {
command.Parameters[2].Value = global::System.DBNull.Value;
}
else {
command.Parameters[2].Value = ((string)(TagCode));
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
}
return returnValue;
}
}
/// <summary>
///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
///</summary>
@@ -8502,6 +9249,8 @@ namespace GIM_data.DS_MagTableAdapters {
private AnagMacchineTableAdapter _anagMacchineTableAdapter;
private SinonimiTagTableAdapter _sinonimiTagTableAdapter;
private bool _backupDataSetBeforeUpdate;
private global::System.Data.IDbConnection _connection;
@@ -8629,6 +9378,20 @@ 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.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
"a", "System.Drawing.Design.UITypeEditor")]
public SinonimiTagTableAdapter SinonimiTagTableAdapter {
get {
return this._sinonimiTagTableAdapter;
}
set {
this._sinonimiTagTableAdapter = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public bool BackupDataSetBeforeUpdate {
@@ -8680,6 +9443,10 @@ namespace GIM_data.DS_MagTableAdapters {
&& (this._anagMacchineTableAdapter.Connection != null))) {
return this._anagMacchineTableAdapter.Connection;
}
if (((this._sinonimiTagTableAdapter != null)
&& (this._sinonimiTagTableAdapter.Connection != null))) {
return this._sinonimiTagTableAdapter.Connection;
}
return null;
}
set {
@@ -8717,6 +9484,9 @@ namespace GIM_data.DS_MagTableAdapters {
if ((this._anagMacchineTableAdapter != null)) {
count = (count + 1);
}
if ((this._sinonimiTagTableAdapter != null)) {
count = (count + 1);
}
return count;
}
}
@@ -8800,6 +9570,15 @@ namespace GIM_data.DS_MagTableAdapters {
allChangedRows.AddRange(updatedRows);
}
}
if ((this._sinonimiTagTableAdapter != null)) {
global::System.Data.DataRow[] updatedRows = dataSet.SinonimiTag.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length))) {
result = (result + this._sinonimiTagTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
return result;
}
@@ -8874,6 +9653,14 @@ namespace GIM_data.DS_MagTableAdapters {
allAddedRows.AddRange(addedRows);
}
}
if ((this._sinonimiTagTableAdapter != null)) {
global::System.Data.DataRow[] addedRows = dataSet.SinonimiTag.Select(null, null, global::System.Data.DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length))) {
result = (result + this._sinonimiTagTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
return result;
}
@@ -8884,6 +9671,14 @@ namespace GIM_data.DS_MagTableAdapters {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private int UpdateDeletedRows(DS_Mag dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
int result = 0;
if ((this._sinonimiTagTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.SinonimiTag.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length))) {
result = (result + this._sinonimiTagTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
if ((this._tag2MaccTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.Tag2Macc.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
@@ -9027,6 +9822,11 @@ namespace GIM_data.DS_MagTableAdapters {
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
if (((this._sinonimiTagTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._sinonimiTagTableAdapter.Connection) == false))) {
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
global::System.Data.IDbConnection workConnection = this.Connection;
if ((workConnection == null)) {
throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
@@ -9131,6 +9931,15 @@ namespace GIM_data.DS_MagTableAdapters {
adaptersWithAcceptChangesDuringUpdate.Add(this._anagMacchineTableAdapter.Adapter);
}
}
if ((this._sinonimiTagTableAdapter != null)) {
revertConnections.Add(this._sinonimiTagTableAdapter, this._sinonimiTagTableAdapter.Connection);
this._sinonimiTagTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
this._sinonimiTagTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
if (this._sinonimiTagTableAdapter.Adapter.AcceptChangesDuringUpdate) {
this._sinonimiTagTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
adaptersWithAcceptChangesDuringUpdate.Add(this._sinonimiTagTableAdapter.Adapter);
}
}
//
//---- Perform updates -----------
//
@@ -9221,6 +10030,10 @@ namespace GIM_data.DS_MagTableAdapters {
this._anagMacchineTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._anagMacchineTableAdapter]));
this._anagMacchineTableAdapter.Transaction = null;
}
if ((this._sinonimiTagTableAdapter != null)) {
this._sinonimiTagTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._sinonimiTagTableAdapter]));
this._sinonimiTagTableAdapter.Transaction = null;
}
if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
+81
View File
@@ -611,6 +611,63 @@ FROM AnagTags</CommandText>
</Mappings>
<Sources />
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="SinonimiTagTableAdapter" GeneratorDataComponentClassName="SinonimiTagTableAdapter" Name="SinonimiTag" UserDataComponentName="SinonimiTagTableAdapter">
<MainSource>
<DbSource ConnectionRef="GIMConnectionString (Web.config)" DbObjectName="GIM.dbo.SinonimiTag" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>DELETE FROM [dbo].[SinonimiTag] WHERE (([TagCodeOrig] = @Original_TagCodeOrig))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_TagCodeOrig" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TagCodeOrig" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>INSERT INTO [dbo].[SinonimiTag] ([TagCodeOrig], [TagCode]) VALUES (@TagCodeOrig, @TagCode)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TagCodeOrig" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TagCodeOrig" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TagCode" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TagCode" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT TagCodeOrig, TagCode FROM dbo.SinonimiTag</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>UPDATE [dbo].[SinonimiTag] SET [TagCodeOrig] = @TagCodeOrig, [TagCode] = @TagCode WHERE (([TagCodeOrig] = @Original_TagCodeOrig))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TagCodeOrig" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TagCodeOrig" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TagCode" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TagCode" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_TagCodeOrig" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TagCodeOrig" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="TagCodeOrig" DataSetColumn="TagCodeOrig" />
<Mapping SourceColumn="TagCode" DataSetColumn="TagCode" />
</Mappings>
<Sources>
<DbSource ConnectionRef="GIMConnectionString (Web.config)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="updateQuery" Modifier="Public" Name="updateQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="updateQuery">
<UpdateCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_SinTag_UpdateQuery</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Original_TagCodeOrig" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@TagCode" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</Sources>
</TableAdapter>
</Tables>
<Sources />
</DataSource>
@@ -874,6 +931,26 @@ FROM AnagTags</CommandText>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SinonimiTag" msprop:Generator_TableClassName="SinonimiTagDataTable" msprop:Generator_TableVarName="tableSinonimiTag" msprop:Generator_TablePropName="SinonimiTag" msprop:Generator_RowDeletingName="SinonimiTagRowDeleting" msprop:Generator_RowChangingName="SinonimiTagRowChanging" msprop:Generator_RowEvHandlerName="SinonimiTagRowChangeEventHandler" msprop:Generator_RowDeletedName="SinonimiTagRowDeleted" msprop:Generator_UserTableName="SinonimiTag" msprop:Generator_RowChangedName="SinonimiTagRowChanged" msprop:Generator_RowEvArgName="SinonimiTagRowChangeEvent" msprop:Generator_RowClassName="SinonimiTagRow">
<xs:complexType>
<xs:sequence>
<xs:element name="TagCodeOrig" msprop:Generator_ColumnVarNameInTable="columnTagCodeOrig" msprop:Generator_ColumnPropNameInRow="TagCodeOrig" msprop:Generator_ColumnPropNameInTable="TagCodeOrigColumn" msprop:Generator_UserColumnName="TagCodeOrig">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="TagCode" msprop:Generator_ColumnVarNameInTable="columnTagCode" msprop:Generator_ColumnPropNameInRow="TagCode" msprop:Generator_ColumnPropNameInTable="TagCodeColumn" msprop:Generator_UserColumnName="TagCode">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
@@ -916,6 +993,10 @@ FROM AnagTags</CommandText>
<xs:selector xpath=".//mstns:AnagMacchine" />
<xs:field xpath="mstns:idxMacchina" />
</xs:unique>
<xs:unique name="SinonimiTag_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:SinonimiTag" />
<xs:field xpath="mstns:TagCodeOrig" />
</xs:unique>
</xs:element>
<xs:annotation>
<xs:appinfo>
+3
View File
@@ -39,6 +39,7 @@ public class TA_app
public GIM_data.DS_MagTableAdapters.AnagTagsTableAdapter taAnagTags;
public GIM_data.DS_MagTableAdapters.MagRicTableAdapter taMagRic;
public GIM_data.DS_MagTableAdapters.MovMagRicTableAdapter taMovMag;
public GIM_data.DS_MagTableAdapters.SinonimiTagTableAdapter taSinTag;
public GIM_data.DS_MagTableAdapters.StatoMagTableAdapter taStatoMag;
public GIM_data.DS_MagTableAdapters.Tag2ItemTableAdapter taTag2Item;
public GIM_data.DS_MagTableAdapters.Tag2MaccTableAdapter tatag2Macc;
@@ -81,6 +82,7 @@ public class TA_app
taAnagTags.Connection.ConnectionString = connString;
taMagRic.Connection.ConnectionString = connString;
taMovMag.Connection.ConnectionString = connString;
taSinTag.Connection.ConnectionString = connString;
taStatoMag.Connection.ConnectionString = connString;
taTag2Item.Connection.ConnectionString = connString;
tatag2Macc.Connection.ConnectionString = connString;
@@ -123,6 +125,7 @@ public class TA_app
taAnagTags = new GIM_data.DS_MagTableAdapters.AnagTagsTableAdapter();
taMagRic = new GIM_data.DS_MagTableAdapters.MagRicTableAdapter();
taMovMag = new GIM_data.DS_MagTableAdapters.MovMagRicTableAdapter();
taSinTag = new GIM_data.DS_MagTableAdapters.SinonimiTagTableAdapter();
taStatoMag = new GIM_data.DS_MagTableAdapters.StatoMagTableAdapter();
taTag2Item = new GIM_data.DS_MagTableAdapters.Tag2ItemTableAdapter();
tatag2Macc = new GIM_data.DS_MagTableAdapters.Tag2MaccTableAdapter();
Binary file not shown.
Binary file not shown.
+5 -2
View File
@@ -1,5 +1,8 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSearch.master" AutoEventWireup="true" CodeBehind="AnagTags.aspx.cs" Inherits="GIM_site.AnagTags" %>
<%@ Register src="WebUserControls/mod_anagTags.ascx" tagname="mod_anagTags" tagprefix="uc1" %>
<%@ Register Src="~/WebUserControls/mod_tags.ascx" TagPrefix="uc1" TagName="mod_tags" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<uc1:mod_anagTags ID="mod_anagTags1" runat="server" />
<uc1:mod_tags runat="server" id="mod_tags" />
</asp:Content>
+2 -2
View File
@@ -13,12 +13,12 @@ namespace GIM_site {
public partial class AnagTags {
/// <summary>
/// mod_anagTags1 control.
/// mod_tags control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GIM_site.WebUserControls.mod_anagTags mod_anagTags1;
protected global::GIM_site.WebUserControls.mod_tags mod_tags;
}
}
+16
View File
@@ -1295,6 +1295,13 @@
<Compile Include="WebUserControls\mod_selettore_ajax.ascx.designer.cs">
<DependentUpon>mod_selettore_ajax.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_SinonimiTag.ascx.cs">
<DependentUpon>mod_SinonimiTag.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_SinonimiTag.ascx.designer.cs">
<DependentUpon>mod_SinonimiTag.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_tag2Item.ascx.cs">
<DependentUpon>mod_tag2Item.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1309,6 +1316,13 @@
<Compile Include="WebUserControls\mod_tag2Macc.ascx.designer.cs">
<DependentUpon>mod_tag2Macc.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_tags.ascx.cs">
<DependentUpon>mod_tags.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_tags.ascx.designer.cs">
<DependentUpon>mod_tags.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_tipoGuasto.ascx.cs">
<DependentUpon>mod_tipoGuasto.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1503,8 +1517,10 @@
<Content Include="WebUserControls\mod_ricercaGenerica.ascx" />
<Content Include="WebUserControls\mod_selettore.ascx" />
<Content Include="WebUserControls\mod_selettore_ajax.ascx" />
<Content Include="WebUserControls\mod_SinonimiTag.ascx" />
<Content Include="WebUserControls\mod_tag2Item.ascx" />
<Content Include="WebUserControls\mod_tag2Macc.ascx" />
<Content Include="WebUserControls\mod_tags.ascx" />
<Content Include="WebUserControls\mod_tipoGuasto.ascx" />
<Content Include="WebUserControls\mod_tipoRisorsa.ascx" />
<Content Include="WebUserControls\mod_titlePortable.ascx" />
@@ -0,0 +1,80 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_SinonimiTag.ascx.cs" Inherits="GIM_site.WebUserControls.mod_SinonimiTag" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<h3><%: traduci("GestioneSinonimi") %></h3>
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="20"
DataKeyNames="TagCodeOrig" DataSourceID="ods" OnDataBound="grView_DataBound" OnRowEditing="grView_RowEditing">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
<SelectedRowStyle CssClass="ctrSelRowStyle" />
<FooterStyle CssClass="ctrFooter" />
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />
<EmptyDataTemplate>
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>'
Visible='<%# isWritable() %>' />
</EmptyDataTemplate>
<Columns>
<%--<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
</EditItemTemplate>
<HeaderTemplate>
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click"
Visible="false" />
</HeaderTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
Visible="false" ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
Visible='<%# isWritable() %>' ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>--%>
<asp:BoundField DataField="TagCodeOrig" HeaderText="TagCodeOrig" ReadOnly="True" SortExpression="TagCodeOrig" />
<%--<asp:TemplateField>
<ItemTemplate>
&nbsp;-->&nbsp;
</ItemTemplate>
</asp:TemplateField>--%>
<asp:BoundField DataField="TagCode" HeaderText="TagCode" SortExpression="TagCode" />
<%--<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>' Visible='<%# isWritable() %>' />
</HeaderTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update"
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
Visible='<%# isWritable() %>' ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
TargetControlID="imgDelete">
</cc1:ConfirmButtonExtender>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini"></asp:Label>
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="GIM_data.DS_MagTableAdapters.SinonimiTagTableAdapter"
UpdateMethod="updateQuery" OldValuesParameterFormatString="Original_{0}"
FilterExpression="TagCode LIKE '%{0}%' OR TagCodeOrig LIKE '%{0}%' ">
<UpdateParameters>
<asp:Parameter Name="Original_TagCodeOrig" Type="String" />
<asp:Parameter Name="TagCode" Type="String" />
</UpdateParameters>
<FilterParameters>
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
</FilterParameters>
</asp:ObjectDataSource>
@@ -0,0 +1,108 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
namespace GIM_site.WebUserControls
{
public partial class mod_SinonimiTag : ApplicationUserControl
{
public event EventHandler eh_resetSelezione;
/// <summary>
/// evento dati associati a controllo
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_DataBound(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
LinkButton lb;
// aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
{
lb = (LinkButton)cella.Controls[0];
lb.Text = traduci(lb.Text);
}
catch
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
}
else
{
lblNumRec.Text = "";
}
}
/// <summary>
/// reset delle selezioni
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
/// <summary>
/// seleziono valore in editing...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
{
// seleziono la riga corrente...
grView.SelectedIndex = e.NewEditIndex;
}
/// <summary>
/// gestione evento inserimento nuovo record standard (se ZERO presenti)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNewFromEmpty_Click(object sender, EventArgs e)
{
// reset selezione...
resetSelezione();
// i primi valori ("0") di default sono "ND"... li inserisco come standard...
TA_app.obj.taAnagTags.Insert(memLayer.ML.confReadString("newTagCode"), memLayer.ML.confReadString("newTagClass"), memLayer.ML.confReadString("newTagDescr"));
grView.DataBind();
}
/// <summary>
/// verifica se il tag abbia child (= associazioni a macchine o items...)
/// </summary>
/// <param name="TagCode"></param>
public bool hasChild(object _TagCode)
{
bool answ = false;
int trovati = 0;
string TagCode = "";
try
{
TagCode = _TagCode.ToString();
trovati += TA_app.obj.taTag2Item.getByTag(TagCode).Rows.Count;
trovati += TA_app.obj.tatag2Macc.getByTag(TagCode).Rows.Count;
answ = (trovati > 0);
}
catch
{ }
return answ;
}
}
}
@@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GIM_site.WebUserControls {
public partial class mod_SinonimiTag {
/// <summary>
/// grView control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView grView;
/// <summary>
/// lblNumRec control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNumRec;
/// <summary>
/// ods control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
}
}
@@ -1,95 +1,87 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagTags.ascx.cs" Inherits="GIM_site.WebUserControls.mod_anagTags" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<div style="float: right;">
<asp:Button runat="server" ID="btnMode" OnClick="btnMode_Click" />
</div>
<h3><%: traduci("GestioneTags") %></h3>
<div runat="server" id="divRicodifica">
<h3>FARE GESTIONE SINONIMI</h3>
<i>in modo da ricodificare i tags (salvando l'operazione in tab sinonimi x successivi import e però spostando i collegamenti verso items e macchine ai tags "raggruppati")</i>
</div>
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="20"
DataKeyNames="TagCode" DataSourceID="ods" OnDataBound="grView_DataBound" OnRowEditing="grView_RowEditing">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
<SelectedRowStyle CssClass="ctrSelRowStyle" />
<FooterStyle CssClass="ctrFooter" />
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />
<EmptyDataTemplate>
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>'
Visible='<%# isWritable() %>' />
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
</EditItemTemplate>
<HeaderTemplate>
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click"
Visible="false" />
</HeaderTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
Visible="false" ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
Visible='<%# isWritable() && !hasChild(Eval("TagCode")) %>' ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="TagCode" HeaderText="TagCode" ReadOnly="True" SortExpression="TagCode" />
<asp:BoundField DataField="Class" HeaderText="Class" SortExpression="Class" />
<asp:BoundField DataField="TagDescr" HeaderText="TagDescr" SortExpression="TagDescr" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>' Visible='<%# isWritable() %>' />
</HeaderTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update"
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
Visible='<%# isWritable() && !hasChild(Eval("TagCode")) %>' ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
TargetControlID="imgDelete">
</cc1:ConfirmButtonExtender>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini"></asp:Label>
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="GIM_data.DS_MagTableAdapters.AnagTagsTableAdapter"
UpdateMethod="Update" DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}"
FilterExpression="TagCode LIKE '%{0}%' OR Class LIKE '%{0}%' OR TagDescr LIKE '%{0}%' " InsertMethod="Insert">
<UpdateParameters>
<asp:Parameter Name="TagCode" Type="String" />
<asp:Parameter Name="Class" Type="String" />
<asp:Parameter Name="TagDescr" Type="String" />
<asp:Parameter Name="Original_TagCode" Type="String" />
</UpdateParameters>
<FilterParameters>
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
</FilterParameters>
<DeleteParameters>
<asp:Parameter Name="Original_TagCode" Type="String" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="TagCode" Type="String" />
<asp:Parameter Name="Class" Type="String" />
<asp:Parameter Name="TagDescr" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>
<div runat="server" id="divTags">
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="20"
DataKeyNames="TagCode" DataSourceID="ods" OnDataBound="grView_DataBound" OnRowEditing="grView_RowEditing">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
<SelectedRowStyle CssClass="ctrSelRowStyle" />
<FooterStyle CssClass="ctrFooter" />
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />
<EmptyDataTemplate>
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>'
Visible='<%# isWritable() %>' />
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
</EditItemTemplate>
<HeaderTemplate>
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click"
Visible="false" />
</HeaderTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
Visible="false" ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
Visible='<%# isWritable() && !hasChild(Eval("TagCode")) %>' ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="TagCode" HeaderText="TagCode" ReadOnly="True" SortExpression="TagCode" />
<asp:BoundField DataField="Class" HeaderText="Class" SortExpression="Class" />
<asp:BoundField DataField="TagDescr" HeaderText="TagDescr" SortExpression="TagDescr" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>' Visible='<%# isWritable() %>' />
</HeaderTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update"
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
Visible='<%# isWritable() && !hasChild(Eval("TagCode")) %>' ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
TargetControlID="imgDelete">
</cc1:ConfirmButtonExtender>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini"></asp:Label>
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="GIM_data.DS_MagTableAdapters.AnagTagsTableAdapter"
UpdateMethod="Update" DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}"
FilterExpression="TagCode LIKE '%{0}%' OR Class LIKE '%{0}%' OR TagDescr LIKE '%{0}%' " InsertMethod="Insert">
<UpdateParameters>
<asp:Parameter Name="TagCode" Type="String" />
<asp:Parameter Name="Class" Type="String" />
<asp:Parameter Name="TagDescr" Type="String" />
<asp:Parameter Name="Original_TagCode" Type="String" />
</UpdateParameters>
<FilterParameters>
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
</FilterParameters>
<DeleteParameters>
<asp:Parameter Name="Original_TagCode" Type="String" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="TagCode" Type="String" />
<asp:Parameter Name="Class" Type="String" />
<asp:Parameter Name="TagDescr" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>
</div>
@@ -10,50 +10,6 @@ namespace GIM_site.WebUserControls
{
public partial class mod_anagTags : ApplicationUserControl
{
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
if (!Page.IsPostBack)
{
setMode(false);
}
}
public bool _showRicodifica
{
get
{
return memLayer.ML.BoolSessionObj("showRicodifica");
}
set
{
memLayer.ML.setSessionVal("showRicodifica", value);
}
}
/// <summary>
/// imposta modalità controllo
/// </summary>
/// <param name="showRicodifica"></param>
private void setMode(bool showRicodifica)
{
_showRicodifica = showRicodifica;
string txtBtn = "";
if (showRicodifica)
{
txtBtn = "MostraTags";
}
else
{
txtBtn = "MostraRicodifica";
}
// traduco buttons!
btnMode.Text = traduci(txtBtn);
// sistemo visibilità tags
divRicodifica.Visible = showRicodifica;
divTags.Visible = !showRicodifica;
}
public event EventHandler eh_resetSelezione;
/// <summary>
/// evento dati associati a controllo
@@ -149,10 +105,5 @@ namespace GIM_site.WebUserControls
return answ;
}
protected void btnMode_Click(object sender, EventArgs e)
{
// inverto modalità ricodifica (scambio si/no)
setMode(!_showRicodifica);
}
}
}
@@ -12,33 +12,6 @@ namespace GIM_site.WebUserControls {
public partial class mod_anagTags {
/// <summary>
/// btnMode control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnMode;
/// <summary>
/// divRicodifica control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divRicodifica;
/// <summary>
/// divTags control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTags;
/// <summary>
/// grView control.
/// </summary>
@@ -0,0 +1,15 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_tags.ascx.cs" Inherits="GIM_site.WebUserControls.mod_tags" %>
<%@ Register Src="~/WebUserControls/mod_anagTags.ascx" TagPrefix="uc1" TagName="mod_anagTags" %>
<%@ Register Src="~/WebUserControls/mod_SinonimiTag.ascx" TagPrefix="uc1" TagName="mod_SinonimiTag" %>
<div style="float: right;">
<asp:Button runat="server" ID="btnMode" OnClick="btnMode_Click" />
</div>
<div runat="server" id="divRicodifica">
<uc1:mod_SinonimiTag runat="server" id="mod_SinonimiTag" />
</div>
<div runat="server" id="divTags">
<uc1:mod_anagTags runat="server" ID="mod_anagTags" />
</div>
@@ -0,0 +1,61 @@
using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GIM_site.WebUserControls
{
public partial class mod_tags : SteamWare.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
setMode(false);
}
}
public bool _showRicodifica
{
get
{
return memLayer.ML.BoolSessionObj("showRicodifica");
}
set
{
memLayer.ML.setSessionVal("showRicodifica", value);
}
}
/// <summary>
/// imposta modalità controllo
/// </summary>
/// <param name="showRicodifica"></param>
private void setMode(bool showRicodifica)
{
_showRicodifica = showRicodifica;
string txtBtn = "";
if (showRicodifica)
{
txtBtn = "MostraTags";
}
else
{
txtBtn = "MostraRicodifica";
}
// traduco buttons!
btnMode.Text = traduci(txtBtn);
// sistemo visibilità tags
divRicodifica.Visible = showRicodifica;
divTags.Visible = !showRicodifica;
}
protected void btnMode_Click(object sender, EventArgs e)
{
// inverto modalità ricodifica (scambio si/no)
setMode(!_showRicodifica);
}
}
}
@@ -0,0 +1,60 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GIM_site.WebUserControls {
public partial class mod_tags {
/// <summary>
/// btnMode control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnMode;
/// <summary>
/// divRicodifica control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divRicodifica;
/// <summary>
/// mod_SinonimiTag control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GIM_site.WebUserControls.mod_SinonimiTag mod_SinonimiTag;
/// <summary>
/// divTags control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTags;
/// <summary>
/// mod_anagTags control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GIM_site.WebUserControls.mod_anagTags mod_anagTags;
}
}
Binary file not shown.
Binary file not shown.
@@ -47,4 +47,6 @@ exec voc.stp_insNewLemma 'DescrLocazione', 'Locazione'
exec voc.stp_insNewLemma 'dtLastUpd', 'Last Update'
exec voc.stp_insNewLemma 'MostraTags', 'Mostra Tags'
exec voc.stp_insNewLemma 'MostraRicodifica', 'Mostra Ricodifica'
exec voc.stp_insNewLemma 'GestioneTags', 'Elenco Etichette'
exec voc.stp_insNewLemma 'GestioneSinonimi', 'Gestione ricodifica Etichette'