diff --git a/ETS_Data/Ds_ProjEts.xsd b/ETS_Data/Ds_ProjEts.xsd index 4fa180c..1fd2631 100644 --- a/ETS_Data/Ds_ProjEts.xsd +++ b/ETS_Data/Ds_ProjEts.xsd @@ -1181,6 +1181,96 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM + + + + + + DELETE FROM [dbo].[ImpiegoRisorse] WHERE (([Anno] = @Original_Anno) AND ([Sett] = @Original_Sett) AND ([idxDipendente] = @Original_idxDipendente) AND ([idxFase] = @Original_idxFase) AND ((@IsNull_OreTot = 1 AND [OreTot] IS NULL) OR ([OreTot] = @Original_OreTot))) + + + + + + + + + + + + + INSERT INTO [dbo].[ImpiegoRisorse] ([Anno], [Sett], [idxDipendente], [idxFase], [OreTot]) VALUES (@Anno, @Sett, @idxDipendente, @idxFase, @OreTot); +SELECT Anno, Sett, idxDipendente, idxFase, OreTot FROM ImpiegoRisorse WHERE (Anno = @Anno) AND (Sett = @Sett) AND (idxDipendente = @idxDipendente) AND (idxFase = @idxFase) + + + + + + + + + + + + SELECT Anno, Sett, idxDipendente, idxFase, OreTot FROM dbo.ImpiegoRisorse + + + + + + UPDATE [dbo].[ImpiegoRisorse] SET [Anno] = @Anno, [Sett] = @Sett, [idxDipendente] = @idxDipendente, [idxFase] = @idxFase, [OreTot] = @OreTot WHERE (([Anno] = @Original_Anno) AND ([Sett] = @Original_Sett) AND ([idxDipendente] = @Original_idxDipendente) AND ([idxFase] = @Original_idxFase) AND ((@IsNull_OreTot = 1 AND [OreTot] IS NULL) OR ([OreTot] = @Original_OreTot))); +SELECT Anno, Sett, idxDipendente, idxFase, OreTot FROM ImpiegoRisorse WHERE (Anno = @Anno) AND (Sett = @Sett) AND (idxDipendente = @idxDipendente) AND (idxFase = @idxFase) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbo.stp_IR_getFullSettimana + + + + + + + + + + + + dbo.stp_IR_importSettimana + + + + + + + + + + @@ -1189,7 +1279,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1232,7 +1322,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1282,7 +1372,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1371,7 +1461,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1415,7 +1505,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1460,7 +1550,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1540,7 +1630,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1588,7 +1678,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1605,7 +1695,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1626,7 +1716,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1647,7 +1737,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1782,7 +1872,7 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM - + @@ -1801,6 +1891,17 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM + + + + + + + + + + + @@ -1856,15 +1957,22 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/ETS_Data/Ds_ProjEts.xss b/ETS_Data/Ds_ProjEts.xss index 94d5fdf..4098bb4 100644 --- a/ETS_Data/Ds_ProjEts.xss +++ b/ETS_Data/Ds_ProjEts.xss @@ -4,23 +4,24 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - + + + + + + + + + + + + + - + 370 @@ -32,7 +33,7 @@ - + 876 @@ -44,7 +45,7 @@ - + 1107 @@ -56,7 +57,7 @@ - + 1107 @@ -76,7 +77,7 @@ - + 495 @@ -92,7 +93,7 @@ - + 172 diff --git a/ETS_Data/Ds_ProjEts1.Designer.cs b/ETS_Data/Ds_ProjEts1.Designer.cs index 5e2b2a1..560aee2 100644 --- a/ETS_Data/Ds_ProjEts1.Designer.cs +++ b/ETS_Data/Ds_ProjEts1.Designer.cs @@ -48,6 +48,8 @@ namespace ETS_Data { private BazaarRisorseDataTable tableBazaarRisorse; + private ImpiegoRisorseDataTable tableImpiegoRisorse; + private global::System.Data.DataRelation relationAnagProgetti_AnagFasi; private global::System.Data.DataRelation relationDatiCommessa_AnagFasi; @@ -124,6 +126,9 @@ namespace ETS_Data { if ((ds.Tables["BazaarRisorse"] != null)) { base.Tables.Add(new BazaarRisorseDataTable(ds.Tables["BazaarRisorse"])); } + if ((ds.Tables["ImpiegoRisorse"] != null)) { + base.Tables.Add(new ImpiegoRisorseDataTable(ds.Tables["ImpiegoRisorse"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -262,6 +267,16 @@ namespace ETS_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 ImpiegoRisorseDataTable ImpiegoRisorse { + get { + return this.tableImpiegoRisorse; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -365,6 +380,9 @@ namespace ETS_Data { if ((ds.Tables["BazaarRisorse"] != null)) { base.Tables.Add(new BazaarRisorseDataTable(ds.Tables["BazaarRisorse"])); } + if ((ds.Tables["ImpiegoRisorse"] != null)) { + base.Tables.Add(new ImpiegoRisorseDataTable(ds.Tables["ImpiegoRisorse"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -470,6 +488,12 @@ namespace ETS_Data { this.tableBazaarRisorse.InitVars(); } } + this.tableImpiegoRisorse = ((ImpiegoRisorseDataTable)(base.Tables["ImpiegoRisorse"])); + if ((initTable == true)) { + if ((this.tableImpiegoRisorse != null)) { + this.tableImpiegoRisorse.InitVars(); + } + } this.relationAnagProgetti_AnagFasi = this.Relations["AnagProgetti_AnagFasi"]; this.relationDatiCommessa_AnagFasi = this.Relations["DatiCommessa_AnagFasi"]; this.relationDatiCommessa_DatiCommForn = this.Relations["DatiCommessa_DatiCommForn"]; @@ -510,6 +534,8 @@ namespace ETS_Data { base.Tables.Add(this.tableDipendenti); this.tableBazaarRisorse = new BazaarRisorseDataTable(); base.Tables.Add(this.tableBazaarRisorse); + this.tableImpiegoRisorse = new ImpiegoRisorseDataTable(); + base.Tables.Add(this.tableImpiegoRisorse); this.relationAnagProgetti_AnagFasi = new global::System.Data.DataRelation("AnagProgetti_AnagFasi", new global::System.Data.DataColumn[] { this.tableAnagProgetti.idxProgettoColumn}, new global::System.Data.DataColumn[] { this.tableAnagFasi.idxProgettoColumn}, false); @@ -608,6 +634,12 @@ namespace ETS_Data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeImpiegoRisorse() { + 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) { @@ -699,6 +731,9 @@ namespace ETS_Data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void BazaarRisorseRowChangeEventHandler(object sender, BazaarRisorseRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void ImpiegoRisorseRowChangeEventHandler(object sender, ImpiegoRisorseRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -5967,6 +6002,328 @@ namespace ETS_Data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ImpiegoRisorseDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnAnno; + + private global::System.Data.DataColumn columnSett; + + private global::System.Data.DataColumn columnidxDipendente; + + private global::System.Data.DataColumn columnidxFase; + + private global::System.Data.DataColumn columnOreTot; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ImpiegoRisorseDataTable() { + this.TableName = "ImpiegoRisorse"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal ImpiegoRisorseDataTable(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 ImpiegoRisorseDataTable(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 AnnoColumn { + get { + return this.columnAnno; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn SettColumn { + get { + return this.columnSett; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn idxDipendenteColumn { + get { + return this.columnidxDipendente; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn idxFaseColumn { + get { + return this.columnidxFase; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn OreTotColumn { + get { + return this.columnOreTot; + } + } + + [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 ImpiegoRisorseRow this[int index] { + get { + return ((ImpiegoRisorseRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ImpiegoRisorseRowChangeEventHandler ImpiegoRisorseRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ImpiegoRisorseRowChangeEventHandler ImpiegoRisorseRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ImpiegoRisorseRowChangeEventHandler ImpiegoRisorseRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ImpiegoRisorseRowChangeEventHandler ImpiegoRisorseRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddImpiegoRisorseRow(ImpiegoRisorseRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ImpiegoRisorseRow AddImpiegoRisorseRow(int Anno, int Sett, int idxDipendente, int idxFase, int OreTot) { + ImpiegoRisorseRow rowImpiegoRisorseRow = ((ImpiegoRisorseRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + Anno, + Sett, + idxDipendente, + idxFase, + OreTot}; + rowImpiegoRisorseRow.ItemArray = columnValuesArray; + this.Rows.Add(rowImpiegoRisorseRow); + return rowImpiegoRisorseRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ImpiegoRisorseRow FindByAnnoSettidxDipendenteidxFase(int Anno, int Sett, int idxDipendente, int idxFase) { + return ((ImpiegoRisorseRow)(this.Rows.Find(new object[] { + Anno, + Sett, + idxDipendente, + idxFase}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + ImpiegoRisorseDataTable cln = ((ImpiegoRisorseDataTable)(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 ImpiegoRisorseDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnAnno = base.Columns["Anno"]; + this.columnSett = base.Columns["Sett"]; + this.columnidxDipendente = base.Columns["idxDipendente"]; + this.columnidxFase = base.Columns["idxFase"]; + this.columnOreTot = base.Columns["OreTot"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnAnno = new global::System.Data.DataColumn("Anno", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAnno); + this.columnSett = new global::System.Data.DataColumn("Sett", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSett); + this.columnidxDipendente = new global::System.Data.DataColumn("idxDipendente", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidxDipendente); + this.columnidxFase = new global::System.Data.DataColumn("idxFase", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidxFase); + this.columnOreTot = new global::System.Data.DataColumn("OreTot", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnOreTot); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnAnno, + this.columnSett, + this.columnidxDipendente, + this.columnidxFase}, true)); + this.columnAnno.AllowDBNull = false; + this.columnSett.AllowDBNull = false; + this.columnidxDipendente.AllowDBNull = false; + this.columnidxFase.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ImpiegoRisorseRow NewImpiegoRisorseRow() { + return ((ImpiegoRisorseRow)(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 ImpiegoRisorseRow(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(ImpiegoRisorseRow); + } + + [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.ImpiegoRisorseRowChanged != null)) { + this.ImpiegoRisorseRowChanged(this, new ImpiegoRisorseRowChangeEvent(((ImpiegoRisorseRow)(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.ImpiegoRisorseRowChanging != null)) { + this.ImpiegoRisorseRowChanging(this, new ImpiegoRisorseRowChangeEvent(((ImpiegoRisorseRow)(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.ImpiegoRisorseRowDeleted != null)) { + this.ImpiegoRisorseRowDeleted(this, new ImpiegoRisorseRowChangeEvent(((ImpiegoRisorseRow)(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.ImpiegoRisorseRowDeleting != null)) { + this.ImpiegoRisorseRowDeleting(this, new ImpiegoRisorseRowChangeEvent(((ImpiegoRisorseRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveImpiegoRisorseRow(ImpiegoRisorseRow 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_ProjEts ds = new Ds_ProjEts(); + 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 = "ImpiegoRisorseDataTable"; + 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. /// @@ -9884,6 +10241,93 @@ namespace ETS_Data { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class ImpiegoRisorseRow : global::System.Data.DataRow { + + private ImpiegoRisorseDataTable tableImpiegoRisorse; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal ImpiegoRisorseRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableImpiegoRisorse = ((ImpiegoRisorseDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Anno { + get { + return ((int)(this[this.tableImpiegoRisorse.AnnoColumn])); + } + set { + this[this.tableImpiegoRisorse.AnnoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Sett { + get { + return ((int)(this[this.tableImpiegoRisorse.SettColumn])); + } + set { + this[this.tableImpiegoRisorse.SettColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int idxDipendente { + get { + return ((int)(this[this.tableImpiegoRisorse.idxDipendenteColumn])); + } + set { + this[this.tableImpiegoRisorse.idxDipendenteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int idxFase { + get { + return ((int)(this[this.tableImpiegoRisorse.idxFaseColumn])); + } + set { + this[this.tableImpiegoRisorse.idxFaseColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int OreTot { + get { + try { + return ((int)(this[this.tableImpiegoRisorse.OreTotColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'OreTot\' in table \'ImpiegoRisorse\' is DBNull.", e); + } + } + set { + this[this.tableImpiegoRisorse.OreTotColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsOreTotNull() { + return this.IsNull(this.tableImpiegoRisorse.OreTotColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetOreTotNull() { + this[this.tableImpiegoRisorse.OreTotColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -10291,6 +10735,40 @@ namespace ETS_Data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class ImpiegoRisorseRowChangeEvent : global::System.EventArgs { + + private ImpiegoRisorseRow 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 ImpiegoRisorseRowChangeEvent(ImpiegoRisorseRow 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 ImpiegoRisorseRow 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 ETS_Data.Ds_ProjEtsTableAdapters { @@ -15878,6 +16356,428 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM } } + /// + ///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 ImpiegoRisorseTableAdapter : 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 ImpiegoRisorseTableAdapter() { + 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 = "ImpiegoRisorse"; + tableMapping.ColumnMappings.Add("Anno", "Anno"); + tableMapping.ColumnMappings.Add("Sett", "Sett"); + tableMapping.ColumnMappings.Add("idxDipendente", "idxDipendente"); + tableMapping.ColumnMappings.Add("idxFase", "idxFase"); + tableMapping.ColumnMappings.Add("OreTot", "OreTot"); + 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].[ImpiegoRisorse] WHERE (([Anno] = @Original_Anno) AND ([Sett] = @Original_Sett) AND ([idxDipendente] = @Original_idxDipendente) AND ([idxFase] = @Original_idxFase) AND ((@IsNull_OreTot = 1 AND [OreTot] IS NULL) OR ([OreTot] = @Original_OreTot)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Anno", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Anno", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Sett", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Sett", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxDipendente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxDipendente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFase", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxFase", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_OreTot", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OreTot", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OreTot", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OreTot", 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].[ImpiegoRisorse] ([Anno], [Sett], [idxDipendente], [idxFase], [OreTot]) VALUES (@Anno, @Sett, @idxDipendente, @idxFase, @OreTot); +SELECT Anno, Sett, idxDipendente, idxFase, OreTot FROM ImpiegoRisorse WHERE (Anno = @Anno) AND (Sett = @Sett) AND (idxDipendente = @idxDipendente) AND (idxFase = @idxFase)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Anno", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Anno", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Sett", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Sett", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxDipendente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxDipendente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxFase", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxFase", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OreTot", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OreTot", 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].[ImpiegoRisorse] SET [Anno] = @Anno, [Sett] = @Sett, [idxDipendente] = @idxDipendente, [idxFase] = @idxFase, [OreTot] = @OreTot WHERE (([Anno] = @Original_Anno) AND ([Sett] = @Original_Sett) AND ([idxDipendente] = @Original_idxDipendente) AND ([idxFase] = @Original_idxFase) AND ((@IsNull_OreTot = 1 AND [OreTot] IS NULL) OR ([OreTot] = @Original_OreTot))); +SELECT Anno, Sett, idxDipendente, idxFase, OreTot FROM ImpiegoRisorse WHERE (Anno = @Anno) AND (Sett = @Sett) AND (idxDipendente = @idxDipendente) AND (idxFase = @idxFase)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Anno", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Anno", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Sett", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Sett", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxDipendente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxDipendente", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxFase", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxFase", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OreTot", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OreTot", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Anno", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Anno", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Sett", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Sett", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxDipendente", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxDipendente", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFase", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxFase", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_OreTot", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OreTot", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OreTot", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OreTot", 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 = global::ETS_Data.Properties.Settings.Default.ETS_PROJConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT Anno, Sett, idxDipendente, idxFase, OreTot FROM dbo.ImpiegoRisorse"; + 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_IR_getFullSettimana"; + 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("@Anno", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Settimana", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_IR_importSettimana"; + 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("@Anno", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Settimana", 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()] + [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_ProjEts.ImpiegoRisorseDataTable 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_ProjEts.ImpiegoRisorseDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + Ds_ProjEts.ImpiegoRisorseDataTable dataTable = new Ds_ProjEts.ImpiegoRisorseDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual Ds_ProjEts.ImpiegoRisorseDataTable getFullWeek(global::System.Nullable Anno, global::System.Nullable Settimana) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((Anno.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Anno.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((Settimana.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((int)(Settimana.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + Ds_ProjEts.ImpiegoRisorseDataTable dataTable = new Ds_ProjEts.ImpiegoRisorseDataTable(); + 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_ProjEts.ImpiegoRisorseDataTable 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_ProjEts dataSet) { + return this.Adapter.Update(dataSet, "ImpiegoRisorse"); + } + + [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(int Original_Anno, int Original_Sett, int Original_idxDipendente, int Original_idxFase, global::System.Nullable Original_OreTot) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Anno)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_Sett)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_idxDipendente)); + this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_idxFase)); + if ((Original_OreTot.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_OreTot.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; + } + 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(int Anno, int Sett, int idxDipendente, int idxFase, global::System.Nullable OreTot) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Anno)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Sett)); + this.Adapter.InsertCommand.Parameters[2].Value = ((int)(idxDipendente)); + this.Adapter.InsertCommand.Parameters[3].Value = ((int)(idxFase)); + if ((OreTot.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((int)(OreTot.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + 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(int Anno, int Sett, int idxDipendente, int idxFase, global::System.Nullable OreTot, int Original_Anno, int Original_Sett, int Original_idxDipendente, int Original_idxFase, global::System.Nullable Original_OreTot) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Anno)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Sett)); + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(idxDipendente)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(idxFase)); + if ((OreTot.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(OreTot.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_Anno)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Sett)); + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_idxDipendente)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_idxFase)); + if ((Original_OreTot.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_OreTot.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + } + 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(global::System.Nullable OreTot, int Original_Anno, int Original_Sett, int Original_idxDipendente, int Original_idxFase, global::System.Nullable Original_OreTot) { + return this.Update(Original_Anno, Original_Sett, Original_idxDipendente, Original_idxFase, OreTot, Original_Anno, Original_Sett, Original_idxDipendente, Original_idxFase, Original_OreTot); + } + + [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 importSettimana(global::System.Nullable Anno, global::System.Nullable Settimana) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + if ((Anno.HasValue == true)) { + command.Parameters[1].Value = ((int)(Anno.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((Settimana.HasValue == true)) { + command.Parameters[2].Value = ((int)(Settimana.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + 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; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -15908,6 +16808,8 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM private BazaarRisorseTableAdapter _bazaarRisorseTableAdapter; + private ImpiegoRisorseTableAdapter _impiegoRisorseTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -16049,6 +16951,20 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM } } + [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 ImpiegoRisorseTableAdapter ImpiegoRisorseTableAdapter { + get { + return this._impiegoRisorseTableAdapter; + } + set { + this._impiegoRisorseTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -16104,6 +17020,10 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM && (this._bazaarRisorseTableAdapter.Connection != null))) { return this._bazaarRisorseTableAdapter.Connection; } + if (((this._impiegoRisorseTableAdapter != null) + && (this._impiegoRisorseTableAdapter.Connection != null))) { + return this._impiegoRisorseTableAdapter.Connection; + } return null; } set { @@ -16144,6 +17064,9 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM if ((this._bazaarRisorseTableAdapter != null)) { count = (count + 1); } + if ((this._impiegoRisorseTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -16236,6 +17159,15 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM allChangedRows.AddRange(updatedRows); } } + if ((this._impiegoRisorseTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ImpiegoRisorse.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._impiegoRisorseTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -16318,6 +17250,14 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM allAddedRows.AddRange(addedRows); } } + if ((this._impiegoRisorseTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ImpiegoRisorse.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._impiegoRisorseTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -16328,6 +17268,14 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private int UpdateDeletedRows(Ds_ProjEts dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; + if ((this._impiegoRisorseTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ImpiegoRisorse.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._impiegoRisorseTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._bazaarRisorseTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.BazaarRisorse.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -16484,6 +17432,11 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } + if (((this._impiegoRisorseTableAdapter != null) + && (this.MatchTableAdapterConnection(this._impiegoRisorseTableAdapter.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" + @@ -16597,6 +17550,15 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM adaptersWithAcceptChangesDuringUpdate.Add(this._bazaarRisorseTableAdapter.Adapter); } } + if ((this._impiegoRisorseTableAdapter != null)) { + revertConnections.Add(this._impiegoRisorseTableAdapter, this._impiegoRisorseTableAdapter.Connection); + this._impiegoRisorseTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._impiegoRisorseTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._impiegoRisorseTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._impiegoRisorseTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._impiegoRisorseTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -16691,6 +17653,10 @@ SELECT Anno, Sett, idxDipendente, idxFase, Allocazione, SchemaWeek, OreTot FROM this._bazaarRisorseTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._bazaarRisorseTableAdapter])); this._bazaarRisorseTableAdapter.Transaction = null; } + if ((this._impiegoRisorseTableAdapter != null)) { + this._impiegoRisorseTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._impiegoRisorseTableAdapter])); + this._impiegoRisorseTableAdapter.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/PROJ-ETS/PROJ-ETS/BazaarRA.aspx b/PROJ-ETS/PROJ-ETS/BazaarRA.aspx index e73d038..a851df9 100644 --- a/PROJ-ETS/PROJ-ETS/BazaarRA.aspx +++ b/PROJ-ETS/PROJ-ETS/BazaarRA.aspx @@ -1,5 +1,6 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Bazaar.master" AutoEventWireup="true" CodeBehind="BazaarRA.aspx.cs" Inherits="PROJ_ETS.BazaarRA" %> +<%@ Register src="WebUserControls/mod_weekRA.ascx" tagname="mod_weekRA" tagprefix="uc1" %> -

- mostra impiego totale del registro attività (mesh table?!?)

+ +
diff --git a/PROJ-ETS/PROJ-ETS/BazaarRA.aspx.designer.cs b/PROJ-ETS/PROJ-ETS/BazaarRA.aspx.designer.cs index 7e88636..b4ced64 100644 --- a/PROJ-ETS/PROJ-ETS/BazaarRA.aspx.designer.cs +++ b/PROJ-ETS/PROJ-ETS/BazaarRA.aspx.designer.cs @@ -3,15 +3,22 @@ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ -namespace PROJ_ETS -{ - - - public partial class BazaarRA - { +namespace PROJ_ETS { + + + public partial class BazaarRA { + + /// + /// mod_weekRA1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::PROJ_ETS.WebUserControls.mod_weekRA mod_weekRA1; } } diff --git a/PROJ-ETS/PROJ-ETS/PROJ-ETS.csproj b/PROJ-ETS/PROJ-ETS/PROJ-ETS.csproj index c8a4314..69be862 100644 --- a/PROJ-ETS/PROJ-ETS/PROJ-ETS.csproj +++ b/PROJ-ETS/PROJ-ETS/PROJ-ETS.csproj @@ -339,6 +339,7 @@ Designer + Designer @@ -698,6 +699,13 @@ mod_weekPlan.ascx + + mod_weekRA.ascx + ASPXCodeBehind + + + mod_weekRA.ascx + diff --git a/PROJ-ETS/PROJ-ETS/Web.config b/PROJ-ETS/PROJ-ETS/Web.config index 045e5bd..dcd8fca 100644 --- a/PROJ-ETS/PROJ-ETS/Web.config +++ b/PROJ-ETS/PROJ-ETS/Web.config @@ -26,7 +26,7 @@ - + diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekPlan.ascx b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekPlan.ascx index 57ff45f..85ec03b 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekPlan.ascx +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekPlan.ascx @@ -13,13 +13,13 @@ -
+
-
+
-
+
@@ -73,8 +73,7 @@ - con checkbox x selezione multipla -
+
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekPlan.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekPlan.ascx.cs index 7f80e33..b0210fd 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekPlan.ascx.cs +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekPlan.ascx.cs @@ -293,7 +293,8 @@ namespace PROJ_ETS.WebUserControls else { rigaDip = (Ds_ProjEts.DipendentiRow)tabDip.Select(string.Format("idxDipendente={0}", tabD2ATR[pos_x].idxDipendente))[0]; - cell.Text = rigaDip.SIGLA; + //cell.Text = rigaDip.SIGLA; + cell.Text = rigaDip.Nome.Substring(0, 1) + rigaDip.Cognome.Substring(0, 1) + rigaDip.Cognome.Substring(1, 2).ToLower(); cell.ToolTip = string.Format("{0} {1}", rigaDip.Nome, rigaDip.Cognome); } riga.Cells.Add(cell); diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekRA.ascx b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekRA.ascx new file mode 100644 index 0000000..4fe9abc --- /dev/null +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekRA.ascx @@ -0,0 +1,33 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_weekRA.ascx.cs" Inherits="PROJ_ETS.WebUserControls.mod_weekRA" %> + +
+
+ Anno:  + + + +
+
+ Settimana:  + + + +
+
+ +
+
+ +
+
+ +
+
+
+
+ + + +
+
+
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekRA.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekRA.ascx.cs new file mode 100644 index 0000000..3e72eab --- /dev/null +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekRA.ascx.cs @@ -0,0 +1,422 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using ETS_Data; + +namespace PROJ_ETS.WebUserControls +{ + public partial class mod_weekRA : System.Web.UI.UserControl + { + /// + /// evento nuovi valori caricati + /// + public event EventHandler eh_newVal; + protected int numDip = 0; + protected int numComm = 0; + protected int IdxDipSel + { + get + { + int answ = 0; + try + { + answ = utils.obj.IntSessionObj("IdxDipSel"); + } + catch + { } + return answ; + } + set + { + utils.obj.setSessionVal("IdxDipSel", value); + } + } + protected int IdxFaseSel + { + get + { + int answ = 0; + try + { + answ = utils.obj.IntSessionObj("IdxFaseSel"); + } + catch + { } + return answ; + } + set + { + utils.obj.setSessionVal("IdxFaseSel", value); + } + } + protected ETS_Data.Type.BazaarRes[,] TabellaRisorse; + protected int[] oreTotDip; + protected int[] oreTotComm; + protected Ds_ProjEts.DipendentiDataTable tabDip = new Ds_ProjEts.DipendentiDataTable(); + protected Ds_ProjEts.Dip2ATRDataTable tabD2ATR = new Ds_ProjEts.Dip2ATRDataTable(); + protected Ds_ProjEts.BazaarRisorseDataTable tabBaz = new Ds_ProjEts.BazaarRisorseDataTable(); + protected Ds_ProjEts.BazaarRisorseDataTable tabBazSingle = new Ds_ProjEts.BazaarRisorseDataTable(); + protected DS_utilsProjEts.v_selCommesseDataTable tabComm = new DS_utilsProjEts.v_selCommesseDataTable(); + protected Ds_ProjEts.BazaarRisorseRow rigaBaz; + protected Ds_ProjEts.DipendentiRow rigaDip; + protected DS_utilsProjEts.v_selCommesseRow rigaComm; + /// + /// istante corrente + /// + protected DateTime adesso + { + set + { + utils.obj.setSessionVal("timeBazaar", value); + } + get + { + DateTime answ = DateTime.Now; + try + { + answ = (DateTime)utils.obj.objSessionObj("timeBazaar"); + } + catch + { } + return answ; + } + } + /// + /// caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + setDdlPeriodo(); + //importo sett corrente + lnkW.Text = string.Format("W{0:0#}", datario.WeekOfYearISO8601(DateTime.Now)); + } + // carico tabelle: elenco dipendenti (raggruppato x tipo) ed elenco dip in bazaar... + tabDip = DataProxy_ProjEts.DP.taDip.GetData(); + tabD2ATR = DataProxy_ProjEts.DP.taD2ATR.getBazOrd(); + // faccio udpate! + doUpdate(); + } + /// + /// imposta DDL del periodo + /// + private void setDdlPeriodo() + { + ddlAnno.SelectedValue = adesso.Year.ToString(); + ddlWeek.SelectedValue = (datario.WeekOfYearISO8601(adesso)).ToString(); + } + /// + /// esegue update controllo + /// + public void doUpdate() + { + caricaDatiBlocco(); + disegnaTabella(); + } + /// + /// anno selezionato + /// + protected int anno + { + get + { + int answ = adesso.Year; + try + { + answ = Convert.ToInt32(ddlAnno.SelectedValue); + } + catch + { } + return answ; + } + } + /// + /// settimana selezionato + /// + protected int settimana + { + get + { + int answ = datario.WeekOfYearISO8601(adesso); + try + { + answ = Convert.ToInt32(ddlWeek.SelectedValue); + } + catch + { } + return answ; + } + } + + /// + /// carica i dati del blocco in un oggetto BlockMap (compreso attive/inattive) + /// + private void caricaDatiBlocco() + { + int totCelle = 0; + int idxDip = 0; + // recupero il numero di TUTTE le celle + string css = ""; + string tooltip = ""; + try + { + // carico TUTTE le celle del bazaar... + tabBaz = DataProxy_ProjEts.DP.taBaz.getByAnnoSett(anno, settimana); + tabComm = DataProxy_ProjEts.DP.taSelCom.getAttiveBySearchLike("%"); // leggo tutte commesse attive... + // calcolo il primo dip + idxDip = tabBaz[0].idxDipendente; + // calcolo num celel totali + totCelle = tabBaz.Rows.Count; + // calcolo numero commesse! + tabBazSingle = DataProxy_ProjEts.DP.taBaz.getByAnnoSettDip(anno, settimana, idxDip); + numComm = tabBazSingle.Rows.Count; + // calcolo num commesse! + numDip = totCelle / numComm; + } + catch + { + numDip = 0; + numComm = 0; + } + if (numDip > 0 && numComm > 0) + { + // inizializzo i miei array... + TabellaRisorse = new ETS_Data.Type.BazaarRes[numDip, numComm]; + oreTotDip = new int[numDip]; + oreTotComm = new int[numComm]; + // carico i dati nell'array: di default tutto VUOTO, con posizione attiva... + for (int pos_y = 0; pos_y < numComm; pos_y++) + { + for (int pos_x = 0; pos_x < numDip; pos_x++) + { + // carico valori x la singola cella + rigaBaz = (Ds_ProjEts.BazaarRisorseRow)tabBaz.Select(string.Format("idxDipendente={0} AND idxFase={1}", tabD2ATR[pos_x].idxDipendente, tabBazSingle[pos_y].idxFase))[0]; + rigaDip = (Ds_ProjEts.DipendentiRow)tabDip.Select(string.Format("idxDipendente={0}", tabD2ATR[pos_x].idxDipendente))[0]; + rigaComm = (DS_utilsProjEts.v_selCommesseRow)tabComm.Select(string.Format("value = {0}", tabBazSingle[pos_y].idxFase))[0]; + if (rigaBaz.OreTot == 0) + { + css = "cTab cEmp"; + } + else if (rigaBaz.OreTot < utils.obj.confReadInt("soglia1")) + { + css = "cTab cS01"; + } + else if (rigaBaz.OreTot < utils.obj.confReadInt("soglia2")) + { + css = "cTab cS02"; + } + else if (rigaBaz.OreTot < utils.obj.confReadInt("soglia3")) + { + css = "cTab cS03"; + } + else if (rigaBaz.OreTot < utils.obj.confReadInt("soglia4")) + { + css = "cTab cS04"; + } + else + { + css = "cTab cOvr"; + } + tooltip = string.Format("{2} / {0} {1}", rigaDip.Nome, rigaDip.Cognome, rigaComm.label.Substring(0, 9)); + TabellaRisorse[pos_x, pos_y] = new ETS_Data.Type.BazaarRes(rigaBaz.SchemaWeek, tooltip, css, rigaBaz.idxDipendente, string.Format("{0} {1}", rigaDip.Nome, rigaDip.Cognome), rigaDip.SIGLA, rigaBaz.idxFase, rigaBaz.SchemaWeek, rigaBaz.OreTot); + // aggiorno totali righe/colonne (comemsse/dip) + oreTotDip[pos_x] += rigaBaz.OreTot; + oreTotComm[pos_y] += rigaBaz.OreTot; + } + } + } + } + /// + /// disegna la riga di intestazione/chiusura x dipendenti + /// + /// true = mostra totale ore / false = mostra sigla dip + nome/cognome tooltip + private void setupRigaDip(bool showOre) + { + TableRow riga = new TableRow(); + TableCell cell; + // cella vuota iniziale + cell = new TableCell(); + riga.Cells.Add(cell); + // variabili accessorie x dip + Ds_ProjEts.DipendentiRow rigaDip; + // preparo celle! + for (int pos_x = 0; pos_x < numDip; pos_x++) + { + cell = new TableCell(); + cell.CssClass = "cBia"; + if (showOre) + { + cell.Text = string.Format("{0:0#} h", oreTotDip[pos_x]); + cell.ToolTip = ""; + // SE sono oltre 40h coloro di rosso!!! + if (oreTotDip[pos_x] > 40) + { + cell.CssClass = "cBia lblErrore"; + } + } + else + { + rigaDip = (Ds_ProjEts.DipendentiRow)tabDip.Select(string.Format("idxDipendente={0}", tabD2ATR[pos_x].idxDipendente))[0]; + //cell.Text = rigaDip.SIGLA; + cell.Text = rigaDip.Nome.Substring(0, 1) + rigaDip.Cognome.Substring(0, 1) + rigaDip.Cognome.Substring(1, 2).ToLower(); + cell.ToolTip = string.Format("{0} {1}", rigaDip.Nome, rigaDip.Cognome); + } + riga.Cells.Add(cell); + } + // cella vuota finale + cell = new TableCell(); + riga.Cells.Add(cell); + // aggiungo riga! + tblBlocco.Rows.Add(riga); + } + /// + /// crea una cella per il numero dei livelli + /// + /// + /// + /// indica se mostrare le ore totali di resoconto al posto del nome commessa + /// + private TableCell setupCellaComm(int pos_y, TableRow riga, bool showOre) + { + // variabili accessorie x dip + DS_utilsProjEts.v_selCommesseRow rigaComm; + //cella! + TableCell cell; + cell = new TableCell(); + cell.CssClass = "cBia"; + rigaComm = (DS_utilsProjEts.v_selCommesseRow)tabComm.Select(string.Format("value = {0}", tabBazSingle[pos_y].idxFase))[0]; + if (showOre) + { + // aggiungo button x fare elemento cliccabile + LinkButton lnkbDel = new LinkButton(); + // controllo se CUD è abilitato + lnkbDel.Text = string.Format("{0:0##} h", oreTotComm[pos_y]); + lnkbDel.ToolTip = string.Format("Commessa {0} (non modificabile)", rigaComm.label.Substring(0, 9)); + lnkbDel.Enabled = false; + cell.Controls.Add(lnkbDel); + } + else + { + cell.Text = rigaComm.label.Substring(0, 9); + cell.ToolTip = rigaComm.label; + } + riga.Cells.Add(cell); + return cell; + } + /// + /// esegue il vero plotting della tabella + /// + private void disegnaTabella() + { + bool tabPresente = tblBlocco.Rows.Count > 0; + if (tabPresente) + { + tblBlocco.Rows.Clear(); + } + // metto prima riga con indicazione valori NUMERICI delle colonne + setupRigaDip(false); + // ciclo nel mio array e creo di conseguenza le celle di tabella + for (int pos_y = numComm - 1; pos_y >= 0; pos_y--) + { + TableRow riga = new TableRow(); + TableCell cell; + // cella con numero livello + cell = setupCellaComm(pos_y, riga, false); + for (int pos_x = 0; pos_x < numDip; pos_x++) + { + cell = new TableCell(); + cell.CssClass = TabellaRisorse[pos_x, pos_y].Css; + // aggiungo button x fare elemento cliccabile + LinkButton lnkb = new LinkButton(); + lnkb.ToolTip = TabellaRisorse[pos_x, pos_y].ToolTip; + lnkb.Text = TabellaRisorse[pos_x, pos_y].Label; +#if false + lnkb.CssClass = "openDiag"; // server x far si ceh apra il dialog modale... + // controllo se CUD è abilitato + if (cudEnabled) + { + lnkb.Click += new EventHandler(lnkb_Click); + lnkb.CommandArgument = string.Format("{0}#{1}", TabellaRisorse[pos_x, pos_y].IdxDipendente, TabellaRisorse[pos_x, pos_y].IdxFase); + } + lnkb.Enabled = cudEnabled; +#endif + // controllo se la cella è selezionata, nel caso BOLD! + if (TabellaRisorse[pos_x, pos_y].IdxDipendente == IdxDipSel && TabellaRisorse[pos_x, pos_y].IdxFase == IdxFaseSel) + { + cell.CssClass = "selCel"; + } + cell.Controls.Add(lnkb); + // carico in cella di tabella il linkButton + riga.Cells.Add(cell); + } + cell = setupCellaComm(pos_y, riga, true); + tblBlocco.Rows.Add(riga); + } + // metto ultima riga con indicazione valori NUMERICI del totale ore x dipendente + setupRigaDip(true); + } + + /// + /// trimma una stringa per il num max di caratteri richiesti + /// + /// + /// + public string trimChar(object stringaIn, object maxChar) + { + string answ = ""; + int maxNum = 0; + try + { + answ = stringaIn.ToString(); + maxNum = Convert.ToInt32(maxChar); + } + catch + { } + if (maxNum < answ.Length) + { + answ = answ.Substring(0, maxNum) + "..."; + } + return answ; + } + + protected void ddlAnno_SelectedIndexChanged(object sender, EventArgs e) + { + doUpdate(); + } + + protected void ddlWeek_SelectedIndexChanged(object sender, EventArgs e) + { + doUpdate(); + } + /// + /// effettua selezione periodo rapida: 0 = corrente (ovvero la PROSSIMA), +1 = successiva (a seleizonata), -1 = precedente (a selezionata) + /// + /// + /// + protected void lnkW_Click(object sender, EventArgs e) + { + // sposto! + LinkButton lnk = (LinkButton)sender; + if (lnk.CommandArgument == "Curr") + { + adesso = DateTime.Now; + } + else if (lnk.CommandArgument == "Prev") + { + adesso = adesso.AddDays(-7); + } + else if (lnk.CommandArgument == "Next") + { + adesso = adesso.AddDays(7); + } + setDdlPeriodo(); + doUpdate(); + } + } +} \ No newline at end of file diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekRA.ascx.designer.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekRA.ascx.designer.cs new file mode 100644 index 0000000..039b39c --- /dev/null +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_weekRA.ascx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace PROJ_ETS.WebUserControls { + + + public partial class mod_weekRA { + + /// + /// ddlAnno control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlAnno; + + /// + /// odsYear control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsYear; + + /// + /// ddlWeek control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlWeek; + + /// + /// odsWeek control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsWeek; + + /// + /// lnkWPrev control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkWPrev; + + /// + /// lnkW control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkW; + + /// + /// lnkWNext control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkWNext; + + /// + /// tblBlocco control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Table tblBlocco; + } +} diff --git a/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll index 00ee4b5..14d045f 100644 Binary files a/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll and b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll differ diff --git a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll index 0c7ef31..f74ecc6 100644 Binary files a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll and b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll differ