diff --git a/Data/DS_app.Designer.cs b/Data/DS_app.Designer.cs index ae08ffc..01960f1 100644 --- a/Data/DS_app.Designer.cs +++ b/Data/DS_app.Designer.cs @@ -46,6 +46,8 @@ namespace Data { private PAM_DashStatsDataTable tablePAM_DashStats; + private AnagPriorDataTable tableAnagPrior; + private global::System.Data.DataRelation relationFK_AnagCondomini_AnagAmministratori; private global::System.Data.DataRelation relationRelFornitore2Area_AnagFornitori; @@ -119,6 +121,9 @@ namespace Data { if ((ds.Tables["PAM_DashStats"] != null)) { base.Tables.Add(new PAM_DashStatsDataTable(ds.Tables["PAM_DashStats"])); } + if ((ds.Tables["AnagPrior"] != null)) { + base.Tables.Add(new AnagPriorDataTable(ds.Tables["AnagPrior"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -247,6 +252,16 @@ namespace Data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public AnagPriorDataTable AnagPrior { + get { + return this.tableAnagPrior; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -347,6 +362,9 @@ namespace Data { if ((ds.Tables["PAM_DashStats"] != null)) { base.Tables.Add(new PAM_DashStatsDataTable(ds.Tables["PAM_DashStats"])); } + if ((ds.Tables["AnagPrior"] != null)) { + base.Tables.Add(new AnagPriorDataTable(ds.Tables["AnagPrior"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -446,6 +464,12 @@ namespace Data { this.tablePAM_DashStats.InitVars(); } } + this.tableAnagPrior = ((AnagPriorDataTable)(base.Tables["AnagPrior"])); + if ((initTable == true)) { + if ((this.tableAnagPrior != null)) { + this.tableAnagPrior.InitVars(); + } + } this.relationFK_AnagCondomini_AnagAmministratori = this.Relations["FK_AnagCondomini_AnagAmministratori"]; this.relationRelFornitore2Area_AnagFornitori = this.Relations["RelFornitore2Area_AnagFornitori"]; this.relationAnagAree_RelFornitore2Area = this.Relations["AnagAree_RelFornitore2Area"]; @@ -484,6 +508,8 @@ namespace Data { base.Tables.Add(this.tableStatoRich); this.tablePAM_DashStats = new PAM_DashStatsDataTable(); base.Tables.Add(this.tablePAM_DashStats); + this.tableAnagPrior = new AnagPriorDataTable(); + base.Tables.Add(this.tableAnagPrior); this.relationFK_AnagCondomini_AnagAmministratori = new global::System.Data.DataRelation("FK_AnagCondomini_AnagAmministratori", new global::System.Data.DataColumn[] { this.tableAnagAmministratori.idxAmmColumn}, new global::System.Data.DataColumn[] { this.tableAnagCondomini.idxAmmColumn}, false); @@ -576,6 +602,12 @@ namespace Data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private bool ShouldSerializeAnagPrior() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -664,6 +696,9 @@ namespace Data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public delegate void PAM_DashStatsRowChangeEventHandler(object sender, PAM_DashStatsRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public delegate void AnagPriorRowChangeEventHandler(object sender, AnagPriorRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -3334,6 +3369,8 @@ namespace Data { private global::System.Data.DataColumn columnidxCond; + private global::System.Data.DataColumn columnidxPriorita; + private global::System.Data.DataColumn columnidxArea; private global::System.Data.DataColumn columnidxFornitore; @@ -3445,6 +3482,14 @@ namespace Data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn idxPrioritaColumn { + get { + return this.columnidxPriorita; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public global::System.Data.DataColumn idxAreaColumn { @@ -3701,6 +3746,7 @@ namespace Data { public ElencolRichRow AddElencolRichRow( int idxStato, int idxCond, + int idxPriorita, int idxArea, int idxFornitore, string cod_fornitore, @@ -3733,6 +3779,7 @@ namespace Data { null, idxStato, idxCond, + idxPriorita, idxArea, idxFornitore, cod_fornitore, @@ -3792,6 +3839,7 @@ namespace Data { this.columnidxRichiesta = base.Columns["idxRichiesta"]; this.columnidxStato = base.Columns["idxStato"]; this.columnidxCond = base.Columns["idxCond"]; + this.columnidxPriorita = base.Columns["idxPriorita"]; this.columnidxArea = base.Columns["idxArea"]; this.columnidxFornitore = base.Columns["idxFornitore"]; this.columncod_fornitore = base.Columns["cod_fornitore"]; @@ -3830,6 +3878,8 @@ namespace Data { base.Columns.Add(this.columnidxStato); this.columnidxCond = new global::System.Data.DataColumn("idxCond", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnidxCond); + this.columnidxPriorita = new global::System.Data.DataColumn("idxPriorita", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidxPriorita); this.columnidxArea = new global::System.Data.DataColumn("idxArea", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnidxArea); this.columnidxFornitore = new global::System.Data.DataColumn("idxFornitore", typeof(int), null, global::System.Data.MappingType.Element); @@ -3894,6 +3944,7 @@ namespace Data { this.columnidxRichiesta.Unique = true; this.columnidxStato.AllowDBNull = false; this.columnidxCond.AllowDBNull = false; + this.columnidxPriorita.AllowDBNull = false; this.columnidxArea.AllowDBNull = false; this.columnidxFornitore.AllowDBNull = false; this.columncod_fornitore.MaxLength = 11; @@ -5036,6 +5087,295 @@ namespace Data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class AnagPriorDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidxPriorita; + + private global::System.Data.DataColumn columndescrPriorita; + + private global::System.Data.DataColumn columnscadenzaGg; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public AnagPriorDataTable() { + this.TableName = "AnagPrior"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal AnagPriorDataTable(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", "15.0.0.0")] + protected AnagPriorDataTable(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", "15.0.0.0")] + public global::System.Data.DataColumn idxPrioritaColumn { + get { + return this.columnidxPriorita; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn descrPrioritaColumn { + get { + return this.columndescrPriorita; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn scadenzaGgColumn { + get { + return this.columnscadenzaGg; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.0.0.0")] + public AnagPriorRow this[int index] { + get { + return ((AnagPriorRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event AnagPriorRowChangeEventHandler AnagPriorRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event AnagPriorRowChangeEventHandler AnagPriorRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event AnagPriorRowChangeEventHandler AnagPriorRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event AnagPriorRowChangeEventHandler AnagPriorRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void AddAnagPriorRow(AnagPriorRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public AnagPriorRow AddAnagPriorRow(int idxPriorita, string descrPriorita, double scadenzaGg) { + AnagPriorRow rowAnagPriorRow = ((AnagPriorRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + idxPriorita, + descrPriorita, + scadenzaGg}; + rowAnagPriorRow.ItemArray = columnValuesArray; + this.Rows.Add(rowAnagPriorRow); + return rowAnagPriorRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public AnagPriorRow FindByidxPriorita(int idxPriorita) { + return ((AnagPriorRow)(this.Rows.Find(new object[] { + idxPriorita}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public override global::System.Data.DataTable Clone() { + AnagPriorDataTable cln = ((AnagPriorDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new AnagPriorDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal void InitVars() { + this.columnidxPriorita = base.Columns["idxPriorita"]; + this.columndescrPriorita = base.Columns["descrPriorita"]; + this.columnscadenzaGg = base.Columns["scadenzaGg"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitClass() { + this.columnidxPriorita = new global::System.Data.DataColumn("idxPriorita", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidxPriorita); + this.columndescrPriorita = new global::System.Data.DataColumn("descrPriorita", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columndescrPriorita); + this.columnscadenzaGg = new global::System.Data.DataColumn("scadenzaGg", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnscadenzaGg); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidxPriorita}, true)); + this.columnidxPriorita.AllowDBNull = false; + this.columnidxPriorita.Unique = true; + this.columndescrPriorita.AllowDBNull = false; + this.columndescrPriorita.MaxLength = 50; + this.columnscadenzaGg.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public AnagPriorRow NewAnagPriorRow() { + return ((AnagPriorRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new AnagPriorRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(AnagPriorRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.AnagPriorRowChanged != null)) { + this.AnagPriorRowChanged(this, new AnagPriorRowChangeEvent(((AnagPriorRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.AnagPriorRowChanging != null)) { + this.AnagPriorRowChanging(this, new AnagPriorRowChangeEvent(((AnagPriorRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.AnagPriorRowDeleted != null)) { + this.AnagPriorRowDeleted(this, new AnagPriorRowChangeEvent(((AnagPriorRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.AnagPriorRowDeleting != null)) { + this.AnagPriorRowDeleting(this, new AnagPriorRowChangeEvent(((AnagPriorRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void RemoveAnagPriorRow(AnagPriorRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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_app ds = new DS_app(); + 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 = "AnagPriorDataTable"; + 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; + } + } + /// ///Represents strongly named DataRow class. /// @@ -6428,6 +6768,17 @@ namespace Data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int idxPriorita { + get { + return ((int)(this[this.tableElencolRich.idxPrioritaColumn])); + } + set { + this[this.tableElencolRich.idxPrioritaColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int idxArea { @@ -7294,6 +7645,54 @@ namespace Data { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class AnagPriorRow : global::System.Data.DataRow { + + private AnagPriorDataTable tableAnagPrior; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal AnagPriorRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableAnagPrior = ((AnagPriorDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int idxPriorita { + get { + return ((int)(this[this.tableAnagPrior.idxPrioritaColumn])); + } + set { + this[this.tableAnagPrior.idxPrioritaColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string descrPriorita { + get { + return ((string)(this[this.tableAnagPrior.descrPrioritaColumn])); + } + set { + this[this.tableAnagPrior.descrPrioritaColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public double scadenzaGg { + get { + return ((double)(this[this.tableAnagPrior.scadenzaGgColumn])); + } + set { + this[this.tableAnagPrior.scadenzaGgColumn] = value; + } + } + } + /// ///Row event argument class /// @@ -7667,6 +8066,40 @@ namespace Data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public class AnagPriorRowChangeEvent : global::System.EventArgs { + + private AnagPriorRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public AnagPriorRowChangeEvent(AnagPriorRow 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", "15.0.0.0")] + public AnagPriorRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace Data.DS_appTableAdapters { @@ -8855,7 +9288,7 @@ SELECT idxFornitore, username, password, nome, indirizzo, p_iva, indirizzo_email [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM AnagFornitori"; @@ -8872,6 +9305,12 @@ SELECT idxFornitore, username, password, nome, indirizzo, p_iva, indirizzo_email 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("@idxCond", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_AF_getByKey"; + 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("@idxFornitore", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8932,6 +9371,23 @@ SELECT idxFornitore, username, password, nome, indirizzo, p_iva, indirizzo_email return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_app.AnagFornitoriDataTable getByKey(global::System.Nullable idxFornitore) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((idxFornitore.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxFornitore.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_app.AnagFornitoriDataTable dataTable = new DS_app.AnagFornitoriDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] @@ -10157,6 +10613,7 @@ SELECT idxFornitore, idxArea, Attivazione FROM AssF2A WHERE (idxArea = @idxArea) tableMapping.ColumnMappings.Add("idxRichiesta", "idxRichiesta"); tableMapping.ColumnMappings.Add("idxStato", "idxStato"); tableMapping.ColumnMappings.Add("idxCond", "idxCond"); + tableMapping.ColumnMappings.Add("idxPriorita", "idxPriorita"); tableMapping.ColumnMappings.Add("idxArea", "idxArea"); tableMapping.ColumnMappings.Add("idxFornitore", "idxFornitore"); tableMapping.ColumnMappings.Add("cod_fornitore", "cod_fornitore"); @@ -10200,7 +10657,7 @@ SELECT idxFornitore, idxArea, Attivazione FROM AssF2A WHERE (idxArea = @idxArea) this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_ElencolRich"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_ElencolRich"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; @@ -11212,6 +11669,336 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [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 AnagPriorTableAdapter : 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", "15.0.0.0")] + public AnagPriorTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.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", "15.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", "15.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", "15.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", "15.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 = "AnagPrior"; + tableMapping.ColumnMappings.Add("idxPriorita", "idxPriorita"); + tableMapping.ColumnMappings.Add("descrPriorita", "descrPriorita"); + tableMapping.ColumnMappings.Add("scadenzaGg", "scadenzaGg"); + 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].[AnagPrior] WHERE (([idxPriorita] = @Original_idxPriorita) AND " + + "([descrPriorita] = @Original_descrPriorita) AND ([scadenzaGg] = @Original_scaden" + + "zaGg))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxPriorita", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxPriorita", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_descrPriorita", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "descrPriorita", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_scadenzaGg", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scadenzaGg", 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].[AnagPrior] ([idxPriorita], [descrPriorita], [scadenzaGg]) VALU" + + "ES (@idxPriorita, @descrPriorita, @scadenzaGg);\r\nSELECT idxPriorita, descrPriori" + + "ta, scadenzaGg FROM AnagPrior WHERE (idxPriorita = @idxPriorita)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxPriorita", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxPriorita", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@descrPriorita", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "descrPriorita", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@scadenzaGg", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scadenzaGg", 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].[AnagPrior] SET [idxPriorita] = @idxPriorita, [descrPriorita] = @descrPriorita, [scadenzaGg] = @scadenzaGg WHERE (([idxPriorita] = @Original_idxPriorita) AND ([descrPriorita] = @Original_descrPriorita) AND ([scadenzaGg] = @Original_scadenzaGg)); +SELECT idxPriorita, descrPriorita, scadenzaGg FROM AnagPrior WHERE (idxPriorita = @idxPriorita)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxPriorita", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxPriorita", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@descrPriorita", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "descrPriorita", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@scadenzaGg", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scadenzaGg", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxPriorita", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxPriorita", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_descrPriorita", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "descrPriorita", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_scadenzaGg", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scadenzaGg", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::Data.Properties.Settings.Default.B2BCondConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idxPriorita, descrPriorita, scadenzaGg FROM dbo.AnagPrior"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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_app.AnagPriorDataTable 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_app.AnagPriorDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_app.AnagPriorDataTable dataTable = new DS_app.AnagPriorDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_app.AnagPriorDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_app dataSet) { + return this.Adapter.Update(dataSet, "AnagPrior"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.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", "15.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(int Original_idxPriorita, string Original_descrPriorita, double Original_scadenzaGg) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idxPriorita)); + if ((Original_descrPriorita == null)) { + throw new global::System.ArgumentNullException("Original_descrPriorita"); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_descrPriorita)); + } + this.Adapter.DeleteCommand.Parameters[2].Value = ((double)(Original_scadenzaGg)); + 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", "15.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(int idxPriorita, string descrPriorita, double scadenzaGg) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idxPriorita)); + if ((descrPriorita == null)) { + throw new global::System.ArgumentNullException("descrPriorita"); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(descrPriorita)); + } + this.Adapter.InsertCommand.Parameters[2].Value = ((double)(scadenzaGg)); + 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", "15.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(int idxPriorita, string descrPriorita, double scadenzaGg, int Original_idxPriorita, string Original_descrPriorita, double Original_scadenzaGg) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idxPriorita)); + if ((descrPriorita == null)) { + throw new global::System.ArgumentNullException("descrPriorita"); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(descrPriorita)); + } + this.Adapter.UpdateCommand.Parameters[2].Value = ((double)(scadenzaGg)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_idxPriorita)); + if ((Original_descrPriorita == null)) { + throw new global::System.ArgumentNullException("Original_descrPriorita"); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_descrPriorita)); + } + this.Adapter.UpdateCommand.Parameters[5].Value = ((double)(Original_scadenzaGg)); + 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", "15.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 descrPriorita, double scadenzaGg, int Original_idxPriorita, string Original_descrPriorita, double Original_scadenzaGg) { + return this.Update(Original_idxPriorita, descrPriorita, scadenzaGg, Original_idxPriorita, Original_descrPriorita, Original_scadenzaGg); + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -11232,6 +12019,8 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ private AnagStatiTableAdapter _anagStatiTableAdapter; + private AnagPriorTableAdapter _anagPriorTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -11303,6 +12092,20 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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 AnagPriorTableAdapter AnagPriorTableAdapter { + get { + return this._anagPriorTableAdapter; + } + set { + this._anagPriorTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -11338,6 +12141,10 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ && (this._anagStatiTableAdapter.Connection != null))) { return this._anagStatiTableAdapter.Connection; } + if (((this._anagPriorTableAdapter != null) + && (this._anagPriorTableAdapter.Connection != null))) { + return this._anagPriorTableAdapter.Connection; + } return null; } set { @@ -11363,6 +12170,9 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ if ((this._anagStatiTableAdapter != null)) { count = (count + 1); } + if ((this._anagPriorTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -11410,6 +12220,15 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ allChangedRows.AddRange(updatedRows); } } + if ((this._anagPriorTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.AnagPrior.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._anagPriorTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -11452,6 +12271,14 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ allAddedRows.AddRange(addedRows); } } + if ((this._anagPriorTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.AnagPrior.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._anagPriorTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -11462,6 +12289,14 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private int UpdateDeletedRows(DS_app dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; + if ((this._anagPriorTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.AnagPrior.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._anagPriorTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._anagStatiTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.AnagStati.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -11553,6 +12388,11 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } + if (((this._anagPriorTableAdapter != null) + && (this.MatchTableAdapterConnection(this._anagPriorTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + + "a stessa stringa di connessione."); + } global::System.Data.IDbConnection workConnection = this.Connection; if ((workConnection == null)) { throw new global::System.ApplicationException("TableAdapterManager non contiene informazioni di connessione. Impostare la propri" + @@ -11622,6 +12462,15 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ adaptersWithAcceptChangesDuringUpdate.Add(this._anagStatiTableAdapter.Adapter); } } + if ((this._anagPriorTableAdapter != null)) { + revertConnections.Add(this._anagPriorTableAdapter, this._anagPriorTableAdapter.Connection); + this._anagPriorTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._anagPriorTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._anagPriorTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._anagPriorTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._anagPriorTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -11696,6 +12545,10 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ this._anagStatiTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._anagStatiTableAdapter])); this._anagStatiTableAdapter.Transaction = null; } + if ((this._anagPriorTableAdapter != null)) { + this._anagPriorTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._anagPriorTableAdapter])); + this._anagPriorTableAdapter.Transaction = null; + } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); diff --git a/Data/DS_app.xsd b/Data/DS_app.xsd index bee2eb9..4ecdf30 100644 --- a/Data/DS_app.xsd +++ b/Data/DS_app.xsd @@ -307,6 +307,17 @@ SELECT idxFornitore, username, password, nome, indirizzo, p_iva, indirizzo_email + + + + dbo.stp_AF_getByKey + + + + + + + @@ -451,7 +462,7 @@ FROM v_AssF2C SELECT * -FROM v_ElencolRich +FROM v_ElencolRich @@ -461,6 +472,7 @@ FROM v_ElencolRich + @@ -660,6 +672,59 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ + + + + + + DELETE FROM [dbo].[AnagPrior] WHERE (([idxPriorita] = @Original_idxPriorita) AND ([descrPriorita] = @Original_descrPriorita) AND ([scadenzaGg] = @Original_scadenzaGg)) + + + + + + + + + + INSERT INTO [dbo].[AnagPrior] ([idxPriorita], [descrPriorita], [scadenzaGg]) VALUES (@idxPriorita, @descrPriorita, @scadenzaGg); +SELECT idxPriorita, descrPriorita, scadenzaGg FROM AnagPrior WHERE (idxPriorita = @idxPriorita) + + + + + + + + + + SELECT idxPriorita, descrPriorita, scadenzaGg FROM dbo.AnagPrior + + + + + + UPDATE [dbo].[AnagPrior] SET [idxPriorita] = @idxPriorita, [descrPriorita] = @descrPriorita, [scadenzaGg] = @scadenzaGg WHERE (([idxPriorita] = @Original_idxPriorita) AND ([descrPriorita] = @Original_descrPriorita) AND ([scadenzaGg] = @Original_scadenzaGg)); +SELECT idxPriorita, descrPriorita, scadenzaGg FROM AnagPrior WHERE (idxPriorita = @idxPriorita) + + + + + + + + + + + + + + + + + + + @@ -950,6 +1015,7 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ + @@ -1112,6 +1178,21 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ + + + + + + + + + + + + + + + @@ -1149,6 +1230,10 @@ SELECT idxStato, stato, descrizione, cssStato FROM AnagStati WHERE (idxStato = @ + + + + diff --git a/Data/DtProxy.cs b/Data/DtProxy.cs index 0ece7bd..aab7f1a 100644 --- a/Data/DtProxy.cs +++ b/Data/DtProxy.cs @@ -23,6 +23,7 @@ namespace Data /// protected virtual void avvioTableAdapters() { + taAF = new DS_appTableAdapters.AnagFornitoriTableAdapter(); taAS = new DS_appTableAdapters.AnagStatiTableAdapter(); taAssF2A = new DS_appTableAdapters.AssF2ATableAdapter(); taElRich = new DS_appTableAdapters.ElencolRichTableAdapter(); @@ -35,6 +36,7 @@ namespace Data string connStr = memLayer.ML.confReadString("B2BCondConnectionString"); //string connStrFiles = memLayer.ML.confReadString("B2BCondFilesConnectionString"); // connections del db vocabolario + taAF.Connection.ConnectionString = connStr; taAS.Connection.ConnectionString = connStr; taAssF2A.Connection.ConnectionString = connStr; taElRich.Connection.ConnectionString = connStr; @@ -44,6 +46,7 @@ namespace Data #region area public + public DS_appTableAdapters.AnagFornitoriTableAdapter taAF; public DS_appTableAdapters.AnagStatiTableAdapter taAS; public DS_appTableAdapters.AssF2ATableAdapter taAssF2A; public DS_appTableAdapters.ElencolRichTableAdapter taElRich; diff --git a/Data/utils.cs b/Data/utils.cs index d65e8f7..f9fe498 100644 --- a/Data/utils.cs +++ b/Data/utils.cs @@ -23,6 +23,9 @@ namespace Data bool answ = false; // se in modalità debug --> email solo a destinatario _debugEmail #if DEBUG + string newEmail = memLayer.ML.CRS("_debugEmail"); + //loggo sostituzione... + logger.lg.scriviLog(string.Format("Applicazione in DEBUG: sostituzione email destinatario {0} --> {1} prima dell'invio", destinatario, newEmail), tipoLog.INFO); destinatario = memLayer.ML.CRS("_debugEmail"); #endif // se richeisto webPush... diff --git a/PUB/CronJobs.aspx.cs b/PUB/CronJobs.aspx.cs index 1177c9c..240248a 100644 --- a/PUB/CronJobs.aspx.cs +++ b/PUB/CronJobs.aspx.cs @@ -21,6 +21,7 @@ namespace PUB // verifico richeiste NON in carico... // invio email a B2BC / Amministratore condominio + } } } \ No newline at end of file diff --git a/PUB/PUB.csproj b/PUB/PUB.csproj index a2feef8..fed61a1 100644 --- a/PUB/PUB.csproj +++ b/PUB/PUB.csproj @@ -223,6 +223,7 @@ + @@ -631,6 +632,13 @@ mod_ER_grid.ascx + + mod_ER_insNew.ascx + ASPXCodeBehind + + + mod_ER_insNew.ascx + mod_ER_richieste.ascx ASPXCodeBehind diff --git a/PUB/WebUserContols/mod_ER_insNew.ascx b/PUB/WebUserContols/mod_ER_insNew.ascx new file mode 100644 index 0000000..8a8e420 --- /dev/null +++ b/PUB/WebUserContols/mod_ER_insNew.ascx @@ -0,0 +1,53 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_ER_insNew.ascx.cs" Inherits="PUB.WebUserContols.mod_ER_insNew" %> + + +
Inserimento nuova richiesta
+
+
Urgenza
+
+ + + +
+
Area
+
+ + + + +
+
Fornitore
+
+ + + + + + + + + +
+
+ + + +
+
Messaggio
+
+ +
+
Contatto
+
+ +
+
Tel Contatto
+
+ +
+
+ + Registra richiesta + +
+
diff --git a/PUB/WebUserContols/mod_ER_insNew.ascx.cs b/PUB/WebUserContols/mod_ER_insNew.ascx.cs new file mode 100644 index 0000000..4ff5dea --- /dev/null +++ b/PUB/WebUserContols/mod_ER_insNew.ascx.cs @@ -0,0 +1,101 @@ +using Data; +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace PUB.WebUserContols +{ + public partial class mod_ER_insNew : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// Effetua update componente + /// + public void doUpdate() + { + chkShowAll.Checked = false; + fixSelCond(); + refreshFornitori(); + } + + private void refreshFornitori() + { + ddlFornitore.Items.Clear(); + ddlFornitore.DataBind(); + } + + /// + /// Condominio selezionato/richeisto + /// + public string idxCond + { + set + { + hfCondReq.Value = value; + } + } + + private void fixSelCond() + { + // se è selezionato imposto nell'hiddenField 0, altrimenti valore selezionato da ddlCOndomini + if (chkShowAll.Checked) + { + hfCond.Value = "0"; + } + else + { + hfCond.Value = hfCondReq.Value; + } + } + + + protected void chkShowAll_CheckedChanged(object sender, EventArgs e) + { + fixSelCond(); + refreshFornitori(); + } + + protected void ddlArea_SelectedIndexChanged(object sender, EventArgs e) + { + fixSelCond(); + refreshFornitori(); + } + /// + /// Aggiunta di una richiesta + /// + /// + /// + protected void lblAddNew_Click(object sender, EventArgs e) + { + int idxCond = 0; + int idxForn = 0; + int.TryParse(hfCond.Value, out idxCond); + // splitto fornitre... è idxFornitore.idxArea + string[] codForn = ddlFornitore.SelectedValue.Split('.'); + int.TryParse(codForn[0], out idxForn); + string codCollab = "A1.C1"; //!!!FARE!!! ora è hard coded... + // Registro richiesta... + DtProxy.man.taElRich.InsertQuery(idxCond, idxForn, DateTime.Now, codCollab, txtContatto.Text.Trim(), txtTelefono.Text.Trim(), txtMessaggio.Text.Trim()); + // invio email notifica al fornitore... + string mittente = memLayer.ML.CRS("_fromEmail"); + string destinatario = memLayer.ML.CRS("_adminEmail"); // parto da admin email... + try + { + destinatario = DtProxy.man.taAF.getByKey(idxForn)[0].indirizzo_email; + } + catch + { } + string oggetto = "Nuova richiesta intervento da b2bcondomini.it"; + string corpo = string.Format("Buongiorno
Ti è stata assegnata una nuova richiesta di intervento da b2bcondomini.it.
Il condominio interessato è {0}, pregasi contattare {1} al numero {2}.
La richiesta indicata è la seguente:
{3}

Seguire il link seguente per maggiori informazioni.", idxCond, txtContatto.Text, txtTelefono.Text, txtMessaggio.Text); + utils.inviaEmail(mittente, destinatario, oggetto, corpo, 3); //!!!HARD CODED a 3 tutto + Response.Redirect(devicesAuthProxy.pagCorrente); + } + } +} \ No newline at end of file diff --git a/PUB/WebUserContols/mod_ER_insNew.ascx.designer.cs b/PUB/WebUserContols/mod_ER_insNew.ascx.designer.cs new file mode 100644 index 0000000..ce1c493 --- /dev/null +++ b/PUB/WebUserContols/mod_ER_insNew.ascx.designer.cs @@ -0,0 +1,132 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace PUB.WebUserContols { + + + public partial class mod_ER_insNew { + + /// + /// Controllo ddlPrior. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlPrior; + + /// + /// Controllo odsPrior. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsPrior; + + /// + /// Controllo ddlArea. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlArea; + + /// + /// Controllo odsArea. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsArea; + + /// + /// Controllo ddlFornitore. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlFornitore; + + /// + /// Controllo odsFornitore. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsFornitore; + + /// + /// Controllo hfCond. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCond; + + /// + /// Controllo hfCondReq. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCondReq; + + /// + /// Controllo chkShowAll. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.CheckBox chkShowAll; + + /// + /// Controllo txtMessaggio. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox txtMessaggio; + + /// + /// Controllo txtContatto. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox txtContatto; + + /// + /// Controllo txtTelefono. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox txtTelefono; + + /// + /// Controllo lblAddNew. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.LinkButton lblAddNew; + } +} diff --git a/PUB/WebUserContols/mod_ER_richieste.ascx b/PUB/WebUserContols/mod_ER_richieste.ascx index 317cb27..bedc530 100644 --- a/PUB/WebUserContols/mod_ER_richieste.ascx +++ b/PUB/WebUserContols/mod_ER_richieste.ascx @@ -1,5 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_ER_richieste.ascx.cs" Inherits="PUB.WebUserContols.mod_ER_richieste" %> <%@ Register Src="~/WebUserContols/mod_ER_grid.ascx" TagPrefix="uc1" TagName="mod_ER_grid" %> +<%@ Register Src="~/WebUserContols/mod_ER_insNew.ascx" TagPrefix="uc1" TagName="mod_ER_insNew" %> +
@@ -29,7 +31,8 @@
-
Inserimento nuova richiesta
+ + <%--
Inserimento nuova richiesta
Area
@@ -71,7 +74,7 @@ Registra richiesta
-
+
--%>
Elenco Richieste Aperte Amministratore
diff --git a/PUB/WebUserContols/mod_ER_richieste.ascx.cs b/PUB/WebUserContols/mod_ER_richieste.ascx.cs index 20444d8..b943842 100644 --- a/PUB/WebUserContols/mod_ER_richieste.ascx.cs +++ b/PUB/WebUserContols/mod_ER_richieste.ascx.cs @@ -38,6 +38,7 @@ namespace PUB.WebUserContols private void saveSelections() { mod_ER_grid.idxCond = ddlCondominio.SelectedValue; + mod_ER_insNew.idxCond = ddlCondominio.SelectedValue; } protected void ddlCondominio_SelectedIndexChanged(object sender, EventArgs e) @@ -67,61 +68,13 @@ namespace PUB.WebUserContols if (divInsNew.Visible) { // aggiorno - chkShowAll.Checked = false; - fixSelCond(); - refreshFornitori(); + mod_ER_insNew.doUpdate(); + saveSelections(); } } - protected void ddlArea_SelectedIndexChanged(object sender, EventArgs e) - { - refreshFornitori(); - } - private void refreshFornitori() - { - ddlFornitore.Items.Clear(); - ddlFornitore.DataBind(); - saveSelections(); - } - protected void chkShowAll_CheckedChanged(object sender, EventArgs e) - { - fixSelCond(); - } - - private void fixSelCond() - { - // se è selezionato imposto nell'hiddenField 0, altrimenti valore selezionato da ddlCOndomini - if (chkShowAll.Checked) - { - hfCond.Value = "0"; - } - else - { - hfCond.Value = ddlCondominio.SelectedValue; - } - } - - protected void lblAddNew_Click(object sender, EventArgs e) - { - int idxCond = 0; - int idxForn = 0; - int.TryParse(hfCond.Value, out idxCond); - // splitto fornitre... è idxFornitore.idxArea - string[] codForn = ddlFornitore.SelectedValue.Split('.'); - int.TryParse(codForn[0], out idxForn); - string codCollab = "A1.C1"; //!!!FARE!!! ora è hard coded... - // Registro richiesta... - DtProxy.man.taElRich.InsertQuery(idxCond, idxForn, DateTime.Now, codCollab, txtContatto.Text.Trim(), txtTelefono.Text.Trim(), txtMessaggio.Text.Trim()); - // invio email notifica al fornitore... - string mittente = memLayer.ML.CRS("_fromEmail"); - string destinatario = memLayer.ML.CRS("_adminEmail"); // !!!FARE!!! deve recuperare email del fornitore... - string oggetto = "Nuova richiesta intervento da b2bcondomini.it"; - string corpo = string.Format("Buongiorno
Ti è stata assegnata una nuova richiesta di intervento da b2bcondomini.it.
Il condominio interessato è {0}, pregasi contattare {1} al numero {2}.
La richiesta indicata è la seguente:
{3}

Seguire il link seguente per maggiori informazioni.", idxCond, txtContatto.Text, txtTelefono.Text, txtMessaggio.Text); - utils.inviaEmail(mittente, destinatario, oggetto, corpo, 3); //!!!HARD CODED a 3 tutto - Response.Redirect(devicesAuthProxy.pagCorrente); - } protected void lbtResetCond_Click(object sender, EventArgs e) { diff --git a/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs b/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs index 4252fa0..3a8dce5 100644 --- a/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs +++ b/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs @@ -58,94 +58,13 @@ namespace PUB.WebUserContols { protected global::System.Web.UI.HtmlControls.HtmlGenericControl divInsNew; /// - /// Controllo ddlArea. + /// Controllo mod_ER_insNew. /// /// /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::System.Web.UI.WebControls.DropDownList ddlArea; - - /// - /// Controllo odsArea. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.ObjectDataSource odsArea; - - /// - /// Controllo ddlFornitore. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.DropDownList ddlFornitore; - - /// - /// Controllo odsFornitore. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.ObjectDataSource odsFornitore; - - /// - /// Controllo hfCond. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.HiddenField hfCond; - - /// - /// Controllo chkShowAll. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.CheckBox chkShowAll; - - /// - /// Controllo txtMessaggio. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.TextBox txtMessaggio; - - /// - /// Controllo txtContatto. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.TextBox txtContatto; - - /// - /// Controllo txtTelefono. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.TextBox txtTelefono; - - /// - /// Controllo lblAddNew. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.LinkButton lblAddNew; + protected global::PUB.WebUserContols.mod_ER_insNew mod_ER_insNew; /// /// Controllo divElenco.