diff --git a/Projects/WebGIM/GIM_data/DS_utility.Designer.cs b/Projects/WebGIM/GIM_data/DS_utility.Designer.cs
index 5ed84fc..29d9260 100644
--- a/Projects/WebGIM/GIM_data/DS_utility.Designer.cs
+++ b/Projects/WebGIM/GIM_data/DS_utility.Designer.cs
@@ -3648,6 +3648,10 @@ namespace GIM_data {
private global::System.Data.DataColumn columnidxMacchina;
+ private global::System.Data.DataColumn columnisFermo;
+
+ private global::System.Data.DataColumn columnscheduled;
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public v_elencoIntervFiltDataTable() {
this.TableName = "v_elencoIntervFilt";
@@ -3804,6 +3808,20 @@ namespace GIM_data {
}
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::System.Data.DataColumn isFermoColumn {
+ get {
+ return this.columnisFermo;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::System.Data.DataColumn scheduledColumn {
+ get {
+ return this.columnscheduled;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Browsable(false)]
public int Count {
@@ -3851,7 +3869,9 @@ namespace GIM_data {
System.DateTime guasto,
int idxStato,
int idxImpianto,
- int idxMacchina) {
+ int idxMacchina,
+ bool isFermo,
+ bool scheduled) {
v_elencoIntervFiltRow rowv_elencoIntervFiltRow = ((v_elencoIntervFiltRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
numIntMtz,
@@ -3871,7 +3891,9 @@ namespace GIM_data {
guasto,
idxStato,
idxImpianto,
- idxMacchina};
+ idxMacchina,
+ isFermo,
+ scheduled};
rowv_elencoIntervFiltRow.ItemArray = columnValuesArray;
this.Rows.Add(rowv_elencoIntervFiltRow);
return rowv_elencoIntervFiltRow;
@@ -3915,6 +3937,8 @@ namespace GIM_data {
this.columnidxStato = base.Columns["idxStato"];
this.columnidxImpianto = base.Columns["idxImpianto"];
this.columnidxMacchina = base.Columns["idxMacchina"];
+ this.columnisFermo = base.Columns["isFermo"];
+ this.columnscheduled = base.Columns["scheduled"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -3955,6 +3979,10 @@ namespace GIM_data {
base.Columns.Add(this.columnidxImpianto);
this.columnidxMacchina = new global::System.Data.DataColumn("idxMacchina", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnidxMacchina);
+ this.columnisFermo = new global::System.Data.DataColumn("isFermo", typeof(bool), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnisFermo);
+ this.columnscheduled = new global::System.Data.DataColumn("scheduled", typeof(bool), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnscheduled);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnnumIntMtz}, true));
this.columnnumIntMtz.AllowDBNull = false;
@@ -3977,6 +4005,7 @@ namespace GIM_data {
this.columnidxStato.AllowDBNull = false;
this.columnidxImpianto.AllowDBNull = false;
this.columnidxMacchina.AllowDBNull = false;
+ this.columnisFermo.AllowDBNull = false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -6311,6 +6340,31 @@ namespace GIM_data {
}
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public bool isFermo {
+ get {
+ return ((bool)(this[this.tablev_elencoIntervFilt.isFermoColumn]));
+ }
+ set {
+ this[this.tablev_elencoIntervFilt.isFermoColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public bool scheduled {
+ get {
+ try {
+ return ((bool)(this[this.tablev_elencoIntervFilt.scheduledColumn]));
+ }
+ catch (global::System.InvalidCastException e) {
+ throw new global::System.Data.StrongTypingException("The value for column \'scheduled\' in table \'v_elencoIntervFilt\' is DBNull.", e);
+ }
+ }
+ set {
+ this[this.tablev_elencoIntervFilt.scheduledColumn] = value;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IscodImpiantoNull() {
return this.IsNull(this.tablev_elencoIntervFilt.codImpiantoColumn);
@@ -6420,6 +6474,16 @@ namespace GIM_data {
public void SetdurataOffNull() {
this[this.tablev_elencoIntervFilt.durataOffColumn] = global::System.Convert.DBNull;
}
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public bool IsscheduledNull() {
+ return this.IsNull(this.tablev_elencoIntervFilt.scheduledColumn);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void SetscheduledNull() {
+ this[this.tablev_elencoIntervFilt.scheduledColumn] = global::System.Convert.DBNull;
+ }
}
///
@@ -9134,13 +9198,12 @@ namespace GIM_data.DS_utilityTableAdapters {
tableMapping.ColumnMappings.Add("fineIntervento", "fineIntervento");
tableMapping.ColumnMappings.Add("descrizioneIntervento", "descrizioneIntervento");
tableMapping.ColumnMappings.Add("descrCausale", "descrCausale");
- tableMapping.ColumnMappings.Add("minErogati", "minErogati");
- tableMapping.ColumnMappings.Add("durataMtz", "durataMtz");
- tableMapping.ColumnMappings.Add("durataOff", "durataOff");
tableMapping.ColumnMappings.Add("guasto", "guasto");
tableMapping.ColumnMappings.Add("idxStato", "idxStato");
tableMapping.ColumnMappings.Add("idxImpianto", "idxImpianto");
tableMapping.ColumnMappings.Add("idxMacchina", "idxMacchina");
+ tableMapping.ColumnMappings.Add("isFermo", "isFermo");
+ tableMapping.ColumnMappings.Add("scheduled", "scheduled");
this._adapter.TableMappings.Add(tableMapping);
}
@@ -9152,24 +9215,39 @@ namespace GIM_data.DS_utilityTableAdapters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
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 * FROM dbo.v_elencoIntervFilt";
+ this._commandCollection[0].CommandText = "SELECT numIntMtz, richiesta, codImpianto, nomeImpianto, codMacchina, nomeMacchina" +
+ ", descrizione, inizioIntervento, fineIntervento, descrizioneIntervento, descrCau" +
+ "sale, guasto, idxStato, idxImpianto, idxMacchina, isFermo, scheduled FROM v_elen" +
+ "coIntervFilt";
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 = @"SELECT codImpianto, codMacchina, descrCausale, descrizione, descrizioneIntervento, durataMtz, durataOff, fineIntervento, guasto, idxImpianto, idxMacchina, idxStato, inizioIntervento, minErogati, nomeImpianto, nomeMacchina, numIntMtz, richiesta FROM v_elencoIntervFilt WHERE (richiesta BETWEEN @inizio AND @fine)";
- this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
- this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 0, 0, "richiesta", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 0, 0, "richiesta", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].CommandText = "dbo.stp_elencoIntByIntervDate";
+ 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("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, 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 = @"SELECT v_elencoIntervFilt.codImpianto, v_elencoIntervFilt.codMacchina, v_elencoIntervFilt.descrCausale, v_elencoIntervFilt.descrizione, v_elencoIntervFilt.descrizioneIntervento, v_elencoIntervFilt.durataMtz, v_elencoIntervFilt.durataOff, v_elencoIntervFilt.fineIntervento, v_elencoIntervFilt.guasto, v_elencoIntervFilt.idxImpianto, v_elencoIntervFilt.idxMacchina, v_elencoIntervFilt.idxStato, v_elencoIntervFilt.inizioIntervento, v_elencoIntervFilt.minErogati, v_elencoIntervFilt.nomeImpianto, v_elencoIntervFilt.nomeMacchina, v_elencoIntervFilt.numIntMtz, v_elencoIntervFilt.richiesta FROM v_elencoIntervFilt INNER JOIN FiltroImpianti ON v_elencoIntervFilt.idxImpianto = FiltroImpianti.idxImpianto INNER JOIN FiltroMacchine ON v_elencoIntervFilt.idxMacchina = FiltroMacchine.idxMacchina INNER JOIN FiltroStati ON v_elencoIntervFilt.idxStato = FiltroStati.idxStato WHERE (v_elencoIntervFilt.richiesta BETWEEN @inizio AND @fine) AND (FiltroStati.username = @username) AND (FiltroMacchine.username = @username) AND (FiltroImpianti.username = @username)";
- this._commandCollection[2].CommandType = global::System.Data.CommandType.Text;
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 0, 0, "richiesta", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 0, 0, "richiesta", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@username", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "username", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[2].CommandText = "dbo.stp_elencoIntByIntervDateUserFilt";
+ 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("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@username", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[3].Connection = this.Connection;
+ this._commandCollection[3].CommandText = "dbo.stp_elencoIntByIntervDateUserFilt_fermaPrev";
+ 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("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@username", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@soloMaccFerma", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@includiPreventiva", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -9197,10 +9275,20 @@ namespace GIM_data.DS_utilityTableAdapters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
- public virtual DS_utility.v_elencoIntervFiltDataTable getByIntervDate(System.DateTime inizio, System.DateTime fine) {
+ public virtual DS_utility.v_elencoIntervFiltDataTable getByIntervDate(global::System.Nullable inizio, global::System.Nullable fine) {
this.Adapter.SelectCommand = this.CommandCollection[1];
- this.Adapter.SelectCommand.Parameters[0].Value = ((System.DateTime)(inizio));
- this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(fine));
+ if ((inizio.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(inizio.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ if ((fine.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(fine.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
+ }
DS_utility.v_elencoIntervFiltDataTable dataTable = new DS_utility.v_elencoIntervFiltDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
@@ -9209,15 +9297,65 @@ namespace GIM_data.DS_utilityTableAdapters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
- public virtual DS_utility.v_elencoIntervFiltDataTable getByIntervDateUsernameFilt(System.DateTime inizio, System.DateTime fine, string username) {
+ public virtual DS_utility.v_elencoIntervFiltDataTable getByIntervDateUsernameFilt(global::System.Nullable inizio, global::System.Nullable fine, string username) {
this.Adapter.SelectCommand = this.CommandCollection[2];
- this.Adapter.SelectCommand.Parameters[0].Value = ((System.DateTime)(inizio));
- this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(fine));
- if ((username == null)) {
- throw new global::System.ArgumentNullException("username");
+ if ((inizio.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(inizio.Value));
}
else {
- this.Adapter.SelectCommand.Parameters[2].Value = ((string)(username));
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ if ((fine.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(fine.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ if ((username == null)) {
+ this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[3].Value = ((string)(username));
+ }
+ DS_utility.v_elencoIntervFiltDataTable dataTable = new DS_utility.v_elencoIntervFiltDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+ public virtual DS_utility.v_elencoIntervFiltDataTable getByIntervDateUsernameFilt_fermaPrev(global::System.Nullable inizio, global::System.Nullable fine, string username, global::System.Nullable soloMaccFerma, global::System.Nullable includiPreventiva) {
+ this.Adapter.SelectCommand = this.CommandCollection[3];
+ if ((inizio.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(inizio.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ if ((fine.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(fine.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ if ((username == null)) {
+ this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[3].Value = ((string)(username));
+ }
+ if ((soloMaccFerma.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[4].Value = ((bool)(soloMaccFerma.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value;
+ }
+ if ((includiPreventiva.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[5].Value = ((bool)(includiPreventiva.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value;
}
DS_utility.v_elencoIntervFiltDataTable dataTable = new DS_utility.v_elencoIntervFiltDataTable();
this.Adapter.Fill(dataTable);
@@ -9331,7 +9469,7 @@ namespace GIM_data.DS_utilityTableAdapters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "dbo.sp_elencoIntMTBF_MTTR";
@@ -9340,6 +9478,16 @@ namespace GIM_data.DS_utilityTableAdapters {
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@username", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[1].Connection = this.Connection;
+ this._commandCollection[1].CommandText = "dbo.stp_elencoIntMTBF_MTTR_fermaPrev";
+ 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("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@username", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@soloMaccFerma", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@includiPreventiva", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -9399,6 +9547,46 @@ namespace GIM_data.DS_utilityTableAdapters {
this.Adapter.Fill(dataTable);
return dataTable;
}
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+ public virtual DS_utility.sp_elencoIntMTBF_MTTRDataTable getByFermaPrev(global::System.Nullable inizio, global::System.Nullable fine, string username, global::System.Nullable soloMaccFerma, global::System.Nullable includiPreventiva) {
+ this.Adapter.SelectCommand = this.CommandCollection[1];
+ if ((inizio.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(inizio.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ if ((fine.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(fine.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ if ((username == null)) {
+ this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[3].Value = ((string)(username));
+ }
+ if ((soloMaccFerma.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[4].Value = ((bool)(soloMaccFerma.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value;
+ }
+ if ((includiPreventiva.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[5].Value = ((bool)(includiPreventiva.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value;
+ }
+ DS_utility.sp_elencoIntMTBF_MTTRDataTable dataTable = new DS_utility.sp_elencoIntMTBF_MTTRDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
}
///
diff --git a/Projects/WebGIM/GIM_data/DS_utility.xsd b/Projects/WebGIM/GIM_data/DS_utility.xsd
index ba9a9e4..687b63b 100644
--- a/Projects/WebGIM/GIM_data/DS_utility.xsd
+++ b/Projects/WebGIM/GIM_data/DS_utility.xsd
@@ -4,7 +4,7 @@
-
+
@@ -258,7 +258,7 @@ WHERE (conditio = @conditio)
- SELECT * FROM dbo.v_elencoIntervFilt
+ SELECT numIntMtz, richiesta, codImpianto, nomeImpianto, codMacchina, nomeMacchina, descrizione, inizioIntervento, fineIntervento, descrizioneIntervento, descrCausale, guasto, idxStato, idxImpianto, idxMacchina, isFermo, scheduled FROM v_elencoIntervFilt
@@ -276,34 +276,50 @@ WHERE (conditio = @conditio)
-
-
-
+
+
-
+
-
- SELECT codImpianto, codMacchina, descrCausale, descrizione, descrizioneIntervento, durataMtz, durataOff, fineIntervento, guasto, idxImpianto, idxMacchina, idxStato, inizioIntervento, minErogati, nomeImpianto, nomeMacchina, numIntMtz, richiesta FROM v_elencoIntervFilt WHERE (richiesta BETWEEN @inizio AND @fine)
+
+ dbo.stp_elencoIntByIntervDate
-
-
+
+
+
-
+
-
- SELECT v_elencoIntervFilt.codImpianto, v_elencoIntervFilt.codMacchina, v_elencoIntervFilt.descrCausale, v_elencoIntervFilt.descrizione, v_elencoIntervFilt.descrizioneIntervento, v_elencoIntervFilt.durataMtz, v_elencoIntervFilt.durataOff, v_elencoIntervFilt.fineIntervento, v_elencoIntervFilt.guasto, v_elencoIntervFilt.idxImpianto, v_elencoIntervFilt.idxMacchina, v_elencoIntervFilt.idxStato, v_elencoIntervFilt.inizioIntervento, v_elencoIntervFilt.minErogati, v_elencoIntervFilt.nomeImpianto, v_elencoIntervFilt.nomeMacchina, v_elencoIntervFilt.numIntMtz, v_elencoIntervFilt.richiesta FROM v_elencoIntervFilt INNER JOIN FiltroImpianti ON v_elencoIntervFilt.idxImpianto = FiltroImpianti.idxImpianto INNER JOIN FiltroMacchine ON v_elencoIntervFilt.idxMacchina = FiltroMacchine.idxMacchina INNER JOIN FiltroStati ON v_elencoIntervFilt.idxStato = FiltroStati.idxStato WHERE (v_elencoIntervFilt.richiesta BETWEEN @inizio AND @fine) AND (FiltroStati.username = @username) AND (FiltroMacchine.username = @username) AND (FiltroImpianti.username = @username)
+
+ dbo.stp_elencoIntByIntervDateUserFilt
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ dbo.stp_elencoIntByIntervDateUserFilt_fermaPrev
+
+
+
+
+
+
+
@@ -335,7 +351,23 @@ WHERE (conditio = @conditio)
-
+
+
+
+
+ dbo.stp_elencoIntMTBF_MTTR_fermaPrev
+
+
+
+
+
+
+
+
+
+
+
+
@@ -432,8 +464,8 @@ WHERE (conditio = @conditio)
-
-
+
+
@@ -446,23 +478,23 @@ WHERE (conditio = @conditio)
-
-
+
+
-
+
-
-
+
+
@@ -475,8 +507,8 @@ WHERE (conditio = @conditio)
-
-
+
+
@@ -489,23 +521,23 @@ WHERE (conditio = @conditio)
-
-
+
+
-
+
-
-
+
+
@@ -516,32 +548,12 @@ WHERE (conditio = @conditio)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -555,11 +567,31 @@ WHERE (conditio = @conditio)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -572,21 +604,21 @@ WHERE (conditio = @conditio)
-
+
-
+
-
+
@@ -599,6 +631,66 @@ WHERE (conditio = @conditio)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -613,13 +705,6 @@ WHERE (conditio = @conditio)
-
-
-
-
-
-
-
@@ -634,120 +719,69 @@ WHERE (conditio = @conditio)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
@@ -760,8 +794,8 @@ WHERE (conditio = @conditio)
-
-
+
+
@@ -774,14 +808,14 @@ WHERE (conditio = @conditio)
-
+
-
+
@@ -794,61 +828,61 @@ WHERE (conditio = @conditio)
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
-
+
+
+
diff --git a/Projects/WebGIM/GIM_data/DS_utility.xss b/Projects/WebGIM/GIM_data/DS_utility.xss
index bb4d9dd..b276841 100644
--- a/Projects/WebGIM/GIM_data/DS_utility.xss
+++ b/Projects/WebGIM/GIM_data/DS_utility.xss
@@ -4,7 +4,7 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
-->
-
+
@@ -17,11 +17,11 @@
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/Projects/WebGIM/GIM_data/bin/GIM_data.dll b/Projects/WebGIM/GIM_data/bin/GIM_data.dll
index dfa6ea0..1cf78f1 100644
Binary files a/Projects/WebGIM/GIM_data/bin/GIM_data.dll and b/Projects/WebGIM/GIM_data/bin/GIM_data.dll differ
diff --git a/Projects/WebGIM/GIM_data/reportExporter.cs b/Projects/WebGIM/GIM_data/reportExporter.cs
index 3415b8f..39d19a7 100644
--- a/Projects/WebGIM/GIM_data/reportExporter.cs
+++ b/Projects/WebGIM/GIM_data/reportExporter.cs
@@ -75,17 +75,40 @@ public class reportExporter
///
/// report ammessi: ElencoInterventi / MTBF_MTTR
/// oggetto che contiene data inizio e data fine dell'analisi richiesta per il report
+ /// username (per caricare i suoi filtraggi...
+ /// se si devono includere SOLO i dati di macchina ferma
+ /// se si deve includere anche nel report le fermate di mtz preventiva
/// tabella dati
- private DataTable caricaDati(reportRichiesto tipoReport, intervalloDate periodoAnalizzato, string username)
+ private DataTable caricaDati(reportRichiesto tipoReport, intervalloDate periodoAnalizzato, string username, bool soloMacchinaFerma, bool includiMtzPrev)
{
DataTable tab = new DataTable();
switch (tipoReport)
{
case reportRichiesto.ElencoInterventi:
- tab = (DataTable)TA_app.obj.taElencoIntFilt.getByIntervDateUsernameFilt(periodoAnalizzato.inizio, periodoAnalizzato.fine, username);
+ // controllo: se include mtz prev e non solo ferma
+ if (!soloMacchinaFerma && includiMtzPrev)
+ {
+ // ...uso metodo std
+ tab = (DataTable)TA_app.obj.taElencoIntFilt.getByIntervDateUsernameFilt(periodoAnalizzato.inizio, periodoAnalizzato.fine, username);
+ }
+ else
+ {
+ // altrimenti stored compelta (e + lenta)
+ tab = (DataTable)TA_app.obj.taElencoIntFilt.getByIntervDateUsernameFilt_fermaPrev(periodoAnalizzato.inizio, periodoAnalizzato.fine, username, soloMacchinaFerma, includiMtzPrev);
+ }
break;
case reportRichiesto.MTBF_MTTR:
- tab = (DataTable)TA_app.obj.taElenco_MTBF_MTTR.GetData(periodoAnalizzato.inizio, periodoAnalizzato.fine, username);
+ // controllo: se include mtz prev e non solo ferma
+ if (!soloMacchinaFerma && includiMtzPrev)
+ {
+ // ...uso metodo std
+ tab = (DataTable)TA_app.obj.taElenco_MTBF_MTTR.GetData(periodoAnalizzato.inizio, periodoAnalizzato.fine, username);
+ }
+ else
+ {
+ // altrimenti stored compelta (e + lenta)
+ tab = (DataTable)TA_app.obj.taElenco_MTBF_MTTR.getByFermaPrev(periodoAnalizzato.inizio, periodoAnalizzato.fine, username, soloMacchinaFerma, includiMtzPrev);
+ }
break;
default:
break;
@@ -156,7 +179,10 @@ public class reportExporter
///
/// report ammessi: ElencoInterventi / MTBF_MTTR
/// oggetto che contiene data inizio e data fine dell'analisi richiesta per il report
- public void popolaPdfStream(reportRichiesto tipoReport, intervalloDate periodoAnalizzato, string username)
+ /// username (per caricare i suoi filtraggi...
+ /// se si devono includere SOLO i dati di macchina ferma
+ /// se si deve includere anche nel report le fermate di mtz preventiva
+ public void popolaPdfStream(reportRichiesto tipoReport, intervalloDate periodoAnalizzato, string username, bool soloMacchinaFerma, bool includiMtzPrev)
{
LocalReport report = new LocalReport();
string deviceInfo = "";
@@ -164,7 +190,7 @@ public class reportExporter
{
case reportRichiesto.ElencoInterventi:
report.ReportPath = @".\Reports\ReportInterventi.rdlc";
- report.DataSources.Add(new ReportDataSource("WebGim", caricaDati(tipoReport, periodoAnalizzato, username)));
+ report.DataSources.Add(new ReportDataSource("WebGim", caricaDati(tipoReport, periodoAnalizzato, username, soloMacchinaFerma, includiMtzPrev)));
deviceInfo = "" +
" PDF" +
" 21cm" +
@@ -177,7 +203,7 @@ public class reportExporter
break;
case reportRichiesto.MTBF_MTTR:
report.ReportPath = @".\Reports\Report_MTBF_MTTR.rdlc";
- report.DataSources.Add(new ReportDataSource("WebGim", caricaDati(tipoReport, periodoAnalizzato, username)));
+ report.DataSources.Add(new ReportDataSource("WebGim", caricaDati(tipoReport, periodoAnalizzato, username, soloMacchinaFerma, includiMtzPrev)));
deviceInfo = "" +
" PDF" +
" 21cm" +
diff --git a/Projects/WebGIM/GIM_site/Appunti.txt b/Projects/WebGIM/GIM_site/Appunti.txt
index 5418ab0..5f28270 100644
--- a/Projects/WebGIM/GIM_site/Appunti.txt
+++ b/Projects/WebGIM/GIM_site/Appunti.txt
@@ -1,29 +1 @@
------------------------
-- 20080114
-------------------------
-ok Modificare comportamento cancellabilità impianti: il 1° NON DEVE ESSERE cancellabile...
-
-
-------------------------
-- 20080113
-------------------------
-
-ok Prerequisiti:
-ok - DB:
-ok - SteamWare_Anagrafica
-ok - SteamWare_Vocabolario
-ok - GIM
-
-ok To Do's:
-ok - Realizzare modulo gestione db steamware che faccia creazione/update secondo versione
-
-NOTE:
-ok - se la versione del db è nel web.config di sviluppo, va riportata anche nel web.config del cliente! o trovare un altro modo?!?
-
-
- ANAGRAFICA:
-ok copiare versione anagrafica di Steamware SOLO CON GIM (anche ci fosse altro cambia poco comunque...)
-
- Iscrizione automatica utenti
-ok - poiché non daremo URM e alla bse gli utenti DEVONo essere di tipo GIM_U, va creata una pagina x inserire il cliente in caso di unauth nella tab DIRITTI con ruolo base da WebConfig ("dirittoAutoEnroll") - deve anche chiedere nome/cognome/email utente
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Projects/WebGIM/GIM_site/ExportPdf.aspx.cs b/Projects/WebGIM/GIM_site/ExportPdf.aspx.cs
index 6b6c6c0..af92363 100644
--- a/Projects/WebGIM/GIM_site/ExportPdf.aspx.cs
+++ b/Projects/WebGIM/GIM_site/ExportPdf.aspx.cs
@@ -17,6 +17,8 @@ public partial class ExportPdf : System.Web.UI.Page
periodo.inizio = Convert.ToDateTime(Request.QueryString["inizio"]);
periodo.fine = Convert.ToDateTime(Request.QueryString["fine"]);
reportRichiesto tipo = (reportRichiesto)Convert.ToInt32(Request.QueryString["tipo"]);
+ bool soloMacchinaFerma = Convert.ToBoolean(Request.QueryString["onlyMacchFerm"]);
+ bool includiMtzPrev = Convert.ToBoolean(Request.QueryString["mtzPrev"]);
// eseguo export
reportExporter re = new reportExporter();
// in base al tipo passo un metodo con idx o con parametro Intervallo analisi...
@@ -24,7 +26,7 @@ public partial class ExportPdf : System.Web.UI.Page
{
case reportRichiesto.ElencoInterventi:
reportName = "elenco_interventi";
- re.popolaPdfStream(tipo, periodo, username);
+ re.popolaPdfStream(tipo, periodo, username, soloMacchinaFerma, includiMtzPrev);
break;
case reportRichiesto.ElencoMacchine:
reportName = "elenco_macchine";
@@ -32,7 +34,7 @@ public partial class ExportPdf : System.Web.UI.Page
break;
case reportRichiesto.MTBF_MTTR:
reportName = "MTBF_MTTR";
- re.popolaPdfStream(tipo, periodo, username);
+ re.popolaPdfStream(tipo, periodo, username, soloMacchinaFerma, includiMtzPrev);
break;
case reportRichiesto.RichiestaIntervento:
reportName = "richiesta";
diff --git a/Projects/WebGIM/GIM_site/GIM_site.csproj b/Projects/WebGIM/GIM_site/GIM_site.csproj
index 52e38be..8cb12d0 100644
--- a/Projects/WebGIM/GIM_site/GIM_site.csproj
+++ b/Projects/WebGIM/GIM_site/GIM_site.csproj
@@ -1042,7 +1042,7 @@
False
True
- 51110
+ 51111
/
http://localhost/GIM_site
False
diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_reportInterventi.ascx.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_reportInterventi.ascx.cs
index 3e356b9..ffdaa66 100644
--- a/Projects/WebGIM/GIM_site/WebUserControls/mod_reportInterventi.ascx.cs
+++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_reportInterventi.ascx.cs
@@ -65,23 +65,23 @@ public partial class mod_reportInterventi : System.Web.UI.UserControl
///
private string formattaUrl(reportRichiesto tipo, intervalloDate periodo)
{
- string answ =String.Format("./ExportPdf.aspx?tipo={0}&inizio={1}&fine={2}&username={3}", Convert.ToInt32(tipo), periodo.inizio, periodo.fine, user_std.UtSn.userNameAD); // !!! verificare se . o ~
+ string answ = String.Format("./ExportPdf.aspx?tipo={0}&inizio={1}&fine={2}&username={3}", Convert.ToInt32(tipo), periodo.inizio, periodo.fine, user_std.UtSn.userNameAD); // !!! verificare se . o ~
// effettuo controlli valori checkBox
if (chkShowMtzPrev.Checked)
{
- answ += "&mtzPrev=1";
+ answ += "&mtzPrev=true";
}
else
{
- answ += "&mtzPrev=0";
+ answ += "&mtzPrev=false";
}
if (chkShowOnlyMacchFerma.Checked)
{
- answ += "&onlyMacchFerm=1";
+ answ += "&onlyMacchFerm=true";
}
else
{
- answ += "&onlyMacchFerm=0";
+ answ += "&onlyMacchFerm=false";
}
return answ;
}
@@ -235,7 +235,7 @@ public partial class mod_reportInterventi : System.Web.UI.UserControl
}
#endregion
-
+
#endregion
diff --git a/Projects/WebGIM/GIM_site/bin/GIM_data.dll b/Projects/WebGIM/GIM_site/bin/GIM_data.dll
index dfa6ea0..1cf78f1 100644
Binary files a/Projects/WebGIM/GIM_site/bin/GIM_data.dll and b/Projects/WebGIM/GIM_site/bin/GIM_data.dll differ
diff --git a/Projects/WebGIM/GIM_site/bin/GIM_site.dll b/Projects/WebGIM/GIM_site/bin/GIM_site.dll
index 2d60118..7792a5f 100644
Binary files a/Projects/WebGIM/GIM_site/bin/GIM_site.dll and b/Projects/WebGIM/GIM_site/bin/GIM_site.dll differ
diff --git a/Projects/WebGIM/GIM_site/obj/Debug/GIM_site.dll b/Projects/WebGIM/GIM_site/obj/Debug/GIM_site.dll
index 2d60118..7792a5f 100644
Binary files a/Projects/WebGIM/GIM_site/obj/Debug/GIM_site.dll and b/Projects/WebGIM/GIM_site/obj/Debug/GIM_site.dll differ
diff --git a/Projects/WebGIM/GIM_site/obj/Debug/ResolveAssemblyReference.cache b/Projects/WebGIM/GIM_site/obj/Debug/ResolveAssemblyReference.cache
index f7b68c1..5da8fda 100644
Binary files a/Projects/WebGIM/GIM_site/obj/Debug/ResolveAssemblyReference.cache and b/Projects/WebGIM/GIM_site/obj/Debug/ResolveAssemblyReference.cache differ