This fixed #4

Schacht können nun wieder gespeichert werden

Converter um Schachttype erweitert.
This commit is contained in:
2023-08-08 09:56:32 +02:00
parent c5a2a15865
commit e7891c1a05
2 changed files with 3 additions and 1 deletions

View File

@@ -99,9 +99,10 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
public async Task<Schacht> Update(Schacht entity)
{
// TODO: Typo in Schachtype beheben. Dies erfordert jedoch ein Datenbank updater Siehe Issue #7
string command = @"UPDATE " + tableName + " SET " +
"objektbezeichnung=@1, deckelrechtswert=@2, deckelhochwert=@3, deckelhoehe=@4, " +
"sohlrechtswert=@5, sohlhochwert=@6, sohlhoehe=@7, entwaesserung=@8, schachttype=@9, vermesser=@10, aufnahmedatum=@11, ref_projekt_id=@12 WHERE schacht_id=@13";
"sohlrechtswert=@5, sohlhochwert=@6, sohlhoehe=@7, entwaesserung=@8, schachtype=@9, vermesser=@10, aufnahmedatum=@11, ref_projekt_id=@12 WHERE schacht_id=@13";
using(var cmd = new NpgsqlCommand(command,conn))
{
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);

View File

@@ -23,6 +23,7 @@ namespace StammGenerator.Converters
if (targetType == typeof(EEntwaeserung)) return (EEntwaeserung)parameter;
if (targetType == typeof(EExportType)) return (EExportType)parameter;
if (targetType == typeof(EKodierungssystem)) return (EKodierungssystem)parameter;
if (targetType == typeof(ESchachtType)) return (ESchachtType)parameter;
throw new NotImplementedException();
}
}