Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e7891c1a05 | |||
| c5a2a15865 |
@@ -99,9 +99,10 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
|
|
||||||
public async Task<Schacht> Update(Schacht entity)
|
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 " +
|
string command = @"UPDATE " + tableName + " SET " +
|
||||||
"objektbezeichnung=@1, deckelrechtswert=@2, deckelhochwert=@3, deckelhoehe=@4, " +
|
"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))
|
using(var cmd = new NpgsqlCommand(command,conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using System.Windows;
|
|||||||
using CodeMeter;
|
using CodeMeter;
|
||||||
using SewerStammGen.Shared;
|
using SewerStammGen.Shared;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
|
||||||
namespace StammGenerator
|
namespace StammGenerator
|
||||||
{
|
{
|
||||||
@@ -58,6 +59,9 @@ namespace StammGenerator
|
|||||||
protected override void OnStartup(StartupEventArgs e)
|
protected override void OnStartup(StartupEventArgs e)
|
||||||
{
|
{
|
||||||
if (_host == null) return;
|
if (_host == null) return;
|
||||||
|
|
||||||
|
Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
|
||||||
|
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||||
_host.Start();
|
_host.Start();
|
||||||
|
|
||||||
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
|
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
|
||||||
@@ -65,5 +69,24 @@ namespace StammGenerator
|
|||||||
|
|
||||||
base.OnStartup(e);
|
base.OnStartup(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Exception ex = (Exception)e.ExceptionObject;
|
||||||
|
string text = "Ein Software fehler ist Aufgetreten. Bitte kontaktiere uns mit folgende Information:\n\n";
|
||||||
|
MessageBox.Show(text + " " + ex.Message + "\n\n" + ex.StackTrace);
|
||||||
|
}
|
||||||
|
catch (Exception ex2)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Fatal Non-UI error", ex2.Message, MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Current_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ namespace StammGenerator.Converters
|
|||||||
if (targetType == typeof(EEntwaeserung)) return (EEntwaeserung)parameter;
|
if (targetType == typeof(EEntwaeserung)) return (EEntwaeserung)parameter;
|
||||||
if (targetType == typeof(EExportType)) return (EExportType)parameter;
|
if (targetType == typeof(EExportType)) return (EExportType)parameter;
|
||||||
if (targetType == typeof(EKodierungssystem)) return (EKodierungssystem)parameter;
|
if (targetType == typeof(EKodierungssystem)) return (EKodierungssystem)parameter;
|
||||||
|
if (targetType == typeof(ESchachtType)) return (ESchachtType)parameter;
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user