Obsoletes WasteDisposedAtLastPort_MTQ entfernt
This commit is contained in:
parent
0ad92218c2
commit
5694a3bf89
@ -114,11 +114,7 @@ namespace bsmd.database
|
|||||||
[ShowReport]
|
[ShowReport]
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
[Validation(ValidationCode.NOT_NULL)]
|
[Validation(ValidationCode.NOT_NULL)]
|
||||||
public double? WasteAmountGeneratedTillNextPort_MTQ { get; set; }
|
public double? WasteAmountGeneratedTillNextPort_MTQ { get; set; }
|
||||||
|
|
||||||
[Obsolete]
|
|
||||||
[ENI2Validation]
|
|
||||||
public double? WasteDisposedAtLastPort_MTQ { get; set; }
|
|
||||||
|
|
||||||
public string Identifier { get; set; }
|
public string Identifier { get; set; }
|
||||||
|
|
||||||
@ -179,9 +175,8 @@ namespace bsmd.database
|
|||||||
scmd.Parameters.AddWithNullableValue("@P5", this.WasteCapacity_MTQ);
|
scmd.Parameters.AddWithNullableValue("@P5", this.WasteCapacity_MTQ);
|
||||||
scmd.Parameters.AddWithNullableValue("@P6", this.WasteAmountRetained_MTQ);
|
scmd.Parameters.AddWithNullableValue("@P6", this.WasteAmountRetained_MTQ);
|
||||||
scmd.Parameters.AddWithNullableValue("@P7", this.WasteDisposalPort);
|
scmd.Parameters.AddWithNullableValue("@P7", this.WasteDisposalPort);
|
||||||
scmd.Parameters.AddWithNullableValue("@P8", this.WasteAmountGeneratedTillNextPort_MTQ);
|
scmd.Parameters.AddWithNullableValue("@P8", this.WasteAmountGeneratedTillNextPort_MTQ);
|
||||||
scmd.Parameters.AddWithNullableValue("@P9", this.WasteDisposedAtLastPort_MTQ);
|
scmd.Parameters.AddWithNullableValue("@P9", this.Identifier);
|
||||||
scmd.Parameters.AddWithNullableValue("@P10", this.Identifier);
|
|
||||||
|
|
||||||
if (this.IsNew)
|
if (this.IsNew)
|
||||||
{
|
{
|
||||||
@ -189,16 +184,16 @@ namespace bsmd.database
|
|||||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, WASId, WasteType, WasteDescription, " +
|
scmd.CommandText = string.Format("INSERT INTO {0} (Id, WASId, WasteType, WasteDescription, " +
|
||||||
"WasteDisposalAmount_MTQ, WasteCapacity_MTQ, WasteAmountRetained_MTQ, WasteDisposalPort, " +
|
"WasteDisposalAmount_MTQ, WasteCapacity_MTQ, WasteAmountRetained_MTQ, WasteDisposalPort, " +
|
||||||
"WasteAmountGeneratedTillNextPort_MTQ, WasteDisposedAtLastPort_MTQ, Identifier) " +
|
"WasteAmountGeneratedTillNextPort_MTQ, Identifier) " +
|
||||||
" VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10 )", this.Tablename);
|
" VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9 )", this.Tablename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||||
scmd.CommandText = string.Format("UPDATE {0} SET WasteType = @P2, WasteDescription = @P3, " +
|
scmd.CommandText = string.Format("UPDATE {0} SET WasteType = @P2, WasteDescription = @P3, " +
|
||||||
"WasteDisposalAmount_MTQ = @P4, WasteCapacity_MTQ = @P5, WasteAmountRetained_MTQ = @P6," +
|
"WasteDisposalAmount_MTQ = @P4, WasteCapacity_MTQ = @P5, WasteAmountRetained_MTQ = @P6," +
|
||||||
"WasteDisposalPort = @P7, WasteAmountGeneratedTillNextPort_MTQ = @P8, WasteDisposedAtLastPort_MTQ = @P9, " +
|
"WasteDisposalPort = @P7, WasteAmountGeneratedTillNextPort_MTQ = @P8, " +
|
||||||
"Identifier = @P10 WHERE Id = @ID", this.Tablename);
|
"Identifier = @P9 WHERE Id = @ID", this.Tablename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +201,7 @@ namespace bsmd.database
|
|||||||
{
|
{
|
||||||
string query = string.Format("SELECT Id, WasteType, WasteDescription, WasteDisposalAmount_MTQ, " +
|
string query = string.Format("SELECT Id, WasteType, WasteDescription, WasteDisposalAmount_MTQ, " +
|
||||||
"WasteCapacity_MTQ, WasteAmountRetained_MTQ, WasteDisposalPort, WasteAmountGeneratedTillNextPort_MTQ, " +
|
"WasteCapacity_MTQ, WasteAmountRetained_MTQ, WasteDisposalPort, WasteAmountGeneratedTillNextPort_MTQ, " +
|
||||||
"WasteDisposedAtLastPort_MTQ, Identifier FROM {0} ", this.Tablename);
|
"Identifier FROM {0} ", this.Tablename);
|
||||||
|
|
||||||
switch (filter)
|
switch (filter)
|
||||||
{
|
{
|
||||||
@ -238,9 +233,8 @@ namespace bsmd.database
|
|||||||
if (!reader.IsDBNull(4)) waste.WasteCapacity_MTQ = (float) reader.GetDouble(4);
|
if (!reader.IsDBNull(4)) waste.WasteCapacity_MTQ = (float) reader.GetDouble(4);
|
||||||
if (!reader.IsDBNull(5)) waste.WasteAmountRetained_MTQ = (float) reader.GetDouble(5);
|
if (!reader.IsDBNull(5)) waste.WasteAmountRetained_MTQ = (float) reader.GetDouble(5);
|
||||||
if (!reader.IsDBNull(6)) waste.WasteDisposalPort = reader.GetString(6);
|
if (!reader.IsDBNull(6)) waste.WasteDisposalPort = reader.GetString(6);
|
||||||
if (!reader.IsDBNull(7)) waste.WasteAmountGeneratedTillNextPort_MTQ = (float) reader.GetDouble(7);
|
if (!reader.IsDBNull(7)) waste.WasteAmountGeneratedTillNextPort_MTQ = (float) reader.GetDouble(7);
|
||||||
if (!reader.IsDBNull(8)) waste.WasteDisposedAtLastPort_MTQ = (float)reader.GetDouble(8);
|
if (!reader.IsDBNull(8)) waste.Identifier = reader.GetString(8);
|
||||||
if (!reader.IsDBNull(9)) waste.Identifier = reader.GetString(9);
|
|
||||||
result.Add(waste);
|
result.Add(waste);
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user