Path wird aus Appsetting geladen
This commit is contained in:
@@ -3,4 +3,7 @@
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="GkvKostentragerdateiFolderPath" value="C:\GkvAbrechnung\KTDatei\" />
|
||||
</appSettings>
|
||||
</configuration>
|
||||
@@ -36,6 +36,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
||||
@@ -38,23 +38,35 @@
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0">IK Krankenkasse</Label>
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
IsEnabled="False">
|
||||
Kostenträger Path
|
||||
</Label>
|
||||
<TextBox
|
||||
x:Name="input_krankenkasse"
|
||||
x:Name="input_file"
|
||||
Grid.Row="0"
|
||||
Grid.Column="2" />
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="0">Leistungserbringergruppe</Label>
|
||||
<Label Grid.Row="1" Grid.Column="0">IK Krankenkasse</Label>
|
||||
<TextBox
|
||||
x:Name="input_leistungsgruppe"
|
||||
x:Name="input_krankenkasse"
|
||||
Grid.Row="1"
|
||||
Grid.Column="2" />
|
||||
|
||||
<Button
|
||||
<Label Grid.Row="2" Grid.Column="0">Leistungserbringergruppe</Label>
|
||||
<TextBox
|
||||
x:Name="input_leistungsgruppe"
|
||||
Grid.Row="2"
|
||||
Grid.Column="2" />
|
||||
|
||||
<Button
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Width="100"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -62,34 +74,33 @@
|
||||
Ermitteln
|
||||
</Button>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0">IK Krankenkasse</Label>
|
||||
<Label Grid.Row="4" Grid.Column="0">IK Krankenkasse</Label>
|
||||
<TextBox
|
||||
x:Name="out_ikkrankenkasse"
|
||||
Grid.Row="3"
|
||||
Grid.Column="2"
|
||||
IsEnabled="False" />
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0">IK Kostenträger</Label>
|
||||
<TextBox
|
||||
x:Name="out_ikkostentrager"
|
||||
Grid.Row="4"
|
||||
Grid.Column="2"
|
||||
IsEnabled="False" />
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0">IK Datenannahmestelle</Label>
|
||||
<Label Grid.Row="5" Grid.Column="0">IK Kostenträger</Label>
|
||||
<TextBox
|
||||
x:Name="out_ikdatenannahmestelle"
|
||||
x:Name="out_ikkostentrager"
|
||||
Grid.Row="5"
|
||||
Grid.Column="2"
|
||||
IsEnabled="False" />
|
||||
|
||||
<Label Grid.Row="6" Grid.Column="0">Bez Datenannahmestelle</Label>
|
||||
<Label Grid.Row="6" Grid.Column="0">IK Datenannahmestelle</Label>
|
||||
<TextBox
|
||||
x:Name="out_bezdatenannahmestelle"
|
||||
x:Name="out_ikdatenannahmestelle"
|
||||
Grid.Row="6"
|
||||
Grid.Column="2"
|
||||
IsEnabled="False" />
|
||||
|
||||
<Label Grid.Row="7" Grid.Column="0">Bez Datenannahmestelle</Label>
|
||||
<TextBox
|
||||
x:Name="out_bezdatenannahmestelle"
|
||||
Grid.Row="7"
|
||||
Grid.Column="2"
|
||||
IsEnabled="False" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Dakota.Logic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -22,20 +23,53 @@ namespace KTDReaderGUI
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private string KostentragerdateiFolderPath { get; set; } = ConfigurationManager.AppSettings.Get("GkvKostentragerdateiFolderPath");
|
||||
|
||||
private DakotaKTDReader Reader;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var root = Directory.GetCurrentDirectory();
|
||||
try
|
||||
{
|
||||
load();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
var path = System.IO.Path.Combine(root, "KTDatei");
|
||||
private void load()
|
||||
{
|
||||
var path = KostentragerdateiFolderPath;
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
var root = Directory.GetCurrentDirectory();
|
||||
|
||||
path = System.IO.Path.Combine(root, "KTDatei");
|
||||
}
|
||||
|
||||
input_file.Text = path;
|
||||
|
||||
Reader = new DakotaKTDReader(path);
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
calc();
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void calc()
|
||||
{
|
||||
var ikkrankenkasse = input_krankenkasse.Text;
|
||||
var leistungsgruppe = input_leistungsgruppe.Text;
|
||||
@@ -45,10 +79,17 @@ namespace KTDReaderGUI
|
||||
|
||||
var rtn = Reader.Resolve(ikkrankenkasse, leistungsgruppe.Substring(0, 2), leistungsgruppe.Substring(2, 5));
|
||||
|
||||
out_ikkrankenkasse.Text = rtn.Item3;
|
||||
out_ikkostentrager.Text = rtn.Item2;
|
||||
out_ikdatenannahmestelle.Text = rtn.Item1;
|
||||
out_bezdatenannahmestelle.Text = rtn.Item4;
|
||||
if (rtn is null)
|
||||
{
|
||||
MessageBox.Show("Eingabe konnte nicht gefunden werden.");
|
||||
}
|
||||
else
|
||||
{
|
||||
out_ikkrankenkasse.Text = rtn.Item3;
|
||||
out_ikkostentrager.Text = rtn.Item2;
|
||||
out_ikdatenannahmestelle.Text = rtn.Item1;
|
||||
out_bezdatenannahmestelle.Text = rtn.Item4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user