Debug Config
-> Bug bei Wohneinheit gefunden
This commit is contained in:
@@ -9,7 +9,8 @@ namespace BeWo
|
||||
public enum DebugConfigMode
|
||||
{
|
||||
SimpleAutoLogin,
|
||||
FeatureWohnhilfe
|
||||
FeatureWohnhilfe,
|
||||
FeatureDakota
|
||||
}
|
||||
|
||||
public class DebugConfig
|
||||
@@ -21,7 +22,7 @@ namespace BeWo
|
||||
{
|
||||
#if DEBUG
|
||||
|
||||
return _CurrentConfig ?? (_CurrentConfig = SimpleAutoLogin);
|
||||
return _CurrentConfig ?? (_CurrentConfig = FeatureDakota);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,5 +48,12 @@ namespace BeWo
|
||||
AutoLogin = true,
|
||||
SelectView = UIContext.Customer
|
||||
};
|
||||
|
||||
public static DebugConfig FeatureDakota => new DebugConfig()
|
||||
{
|
||||
DebugConfigMode = DebugConfigMode.FeatureDakota,
|
||||
AutoLogin = true,
|
||||
SelectView = UIContext.Finance
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace BeWo
|
||||
//proxy anmeldedaten
|
||||
public string proxyname;
|
||||
public string proxyUsername;
|
||||
public string proxypasswd;
|
||||
public string proxypasswd;
|
||||
|
||||
private List<BeWoProfile> _ProfileList;
|
||||
public List<BeWoProfile> ProfileList
|
||||
@@ -69,7 +69,7 @@ namespace BeWo
|
||||
get { return _ProfileList; }
|
||||
set { _ProfileList = value; }
|
||||
}
|
||||
|
||||
|
||||
public LoginControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -77,24 +77,24 @@ namespace BeWo
|
||||
DateTime dt = new DateTime(2017, 1, 1);
|
||||
if (DateTime.Now > dt)
|
||||
dt = DateTime.Now;
|
||||
|
||||
|
||||
txtCopyright.Text = String.Format("Copyright {0:yyyy} | ownSoft GmbH", dt);
|
||||
|
||||
|
||||
var checkPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\profiles.txt";
|
||||
if (File.Exists(checkPath))
|
||||
{
|
||||
//Nimm lokalen Profilpfad wenn er existiert. Wird z.B. bei Kunden mit Citrix Server genutzt, die keine Clickonce Installation vornehmen
|
||||
_ProfilesFilePath = checkPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
_ProfilesFilePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "profiles.txt");
|
||||
}
|
||||
if (File.Exists(checkPath))
|
||||
{
|
||||
//Nimm lokalen Profilpfad wenn er existiert. Wird z.B. bei Kunden mit Citrix Server genutzt, die keine Clickonce Installation vornehmen
|
||||
_ProfilesFilePath = checkPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
_ProfilesFilePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "profiles.txt");
|
||||
}
|
||||
|
||||
_ConfigFilePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "bwp.config");
|
||||
|
||||
ProfileList = new List<BeWoProfile>();
|
||||
BeWoProfile selectedProfile = null;
|
||||
BeWoProfile selectedProfile = null;
|
||||
HeightFrom = gridLogin.Height;
|
||||
HeightTo = gridLogin.Height + 64;
|
||||
LineYCoordFrom = linkLine.Y1;
|
||||
@@ -102,31 +102,31 @@ namespace BeWo
|
||||
|
||||
DataContext = this;
|
||||
|
||||
|
||||
|
||||
ReadProxyName();
|
||||
|
||||
try
|
||||
{
|
||||
ReadProfileList();
|
||||
|
||||
ReadProfileList();
|
||||
|
||||
#if DEBUG
|
||||
|
||||
|
||||
var uri = new Uri("https://localhost/Host/?k=demo&s=localhost/service");
|
||||
|
||||
var paramDic = BeWoUtils.ParseQuery(uri.Query);
|
||||
string v1, v2;
|
||||
paramDic.TryGetValue("k", out v1);
|
||||
paramDic.TryGetValue("s", out v2);
|
||||
BeWoApp.Tenant = v1;
|
||||
BeWoApp.ServerName = v2;
|
||||
if (ProfileList.Count > 0)
|
||||
ProfileList.Insert(0, new BeWoProfile(v1, v2, BeWoApp.Tenant));
|
||||
else
|
||||
ProfileList.Add(new BeWoProfile(v1, v2, BeWoApp.Tenant));
|
||||
SaveProfileListToFile();
|
||||
var paramDic = BeWoUtils.ParseQuery(uri.Query);
|
||||
string v1, v2;
|
||||
paramDic.TryGetValue("k", out v1);
|
||||
paramDic.TryGetValue("s", out v2);
|
||||
BeWoApp.Tenant = v1;
|
||||
BeWoApp.ServerName = v2;
|
||||
if (ProfileList.Count > 0)
|
||||
ProfileList.Insert(0, new BeWoProfile(v1, v2, BeWoApp.Tenant));
|
||||
else
|
||||
ProfileList.Add(new BeWoProfile(v1, v2, BeWoApp.Tenant));
|
||||
SaveProfileListToFile();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#else
|
||||
@@ -171,29 +171,29 @@ namespace BeWo
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//string ipaddress = "";
|
||||
|
||||
// --------------
|
||||
}
|
||||
|
||||
|
||||
//string ipaddress = "";
|
||||
|
||||
// --------------
|
||||
|
||||
if (ProfileList.Count == 0 || String.IsNullOrEmpty(ProfileList[0].Tenant))
|
||||
ShowEnterTenantDialog();
|
||||
ShowEnterTenantDialog();
|
||||
|
||||
//if (ProfileList.Count == 0)
|
||||
//ProfileList.Add(new BeWoProfile("Ungültiges Profil", "Bitte geben Sie hier einen gültigen Server an. Z.B. app1", "Kundennummer"));
|
||||
BeWoProfile firstProfile = null;
|
||||
if (ProfileList.Count > 0)
|
||||
firstProfile = ProfileList[0];
|
||||
ProfileList.Sort((a, b) => a.Name.CompareTo(b.Name));
|
||||
profileSelectionComboBox.ItemsSource = ProfileList;
|
||||
//ProfileList.Add(new BeWoProfile("Ungültiges Profil", "Bitte geben Sie hier einen gültigen Server an. Z.B. app1", "Kundennummer"));
|
||||
BeWoProfile firstProfile = null;
|
||||
if (ProfileList.Count > 0)
|
||||
firstProfile = ProfileList[0];
|
||||
ProfileList.Sort((a, b) => a.Name.CompareTo(b.Name));
|
||||
profileSelectionComboBox.ItemsSource = ProfileList;
|
||||
|
||||
|
||||
|
||||
if (ProfileList.Count > 0)
|
||||
{
|
||||
#if DEBUG
|
||||
@@ -207,10 +207,10 @@ namespace BeWo
|
||||
selectedProfile = firstProfile;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//if (profileSelectionComboBox.SelectedItem == null)
|
||||
profileSelectionComboBox.SelectedItem = selectedProfile;
|
||||
profileSelectionComboBox.SelectedItem = selectedProfile;
|
||||
|
||||
TextBox_Username.Focus();
|
||||
|
||||
@@ -218,9 +218,9 @@ namespace BeWo
|
||||
{
|
||||
TextBox_Username.Text = "demo";
|
||||
PasswordBox_Password.Password = "demo";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//this.lblTenant.Content = BeWoApp.Tenant;
|
||||
lblVersion.Content = BeWoApp.Version;
|
||||
|
||||
@@ -233,9 +233,9 @@ namespace BeWo
|
||||
|
||||
//linkLine.Margin = new Thickness(linkLine.Margin.Left, linkLine.Margin.Top + 25, linkLine.Margin.Right, linkLine.Margin.Bottom);
|
||||
//gridLogin.Height += 25;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void PinCertificate()
|
||||
{
|
||||
@@ -265,7 +265,7 @@ namespace BeWo
|
||||
{
|
||||
if (certificate == null || chain == null)
|
||||
return false;
|
||||
|
||||
|
||||
bool chainContainsPk = false;
|
||||
|
||||
foreach (var element in chain.ChainElements)
|
||||
@@ -458,7 +458,7 @@ namespace BeWo
|
||||
while (!myFile.EndOfStream)
|
||||
{
|
||||
var data = myFile.ReadLine();
|
||||
|
||||
|
||||
if (!String.IsNullOrEmpty(data))
|
||||
{
|
||||
if (data.Contains("selected"))
|
||||
@@ -484,65 +484,65 @@ namespace BeWo
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void ReadProfileList()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(_ProfilesFilePath))
|
||||
{
|
||||
var myFile = new StreamReader(_ProfilesFilePath, Encoding.Default);
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(_ProfilesFilePath))
|
||||
{
|
||||
var myFile = new StreamReader(_ProfilesFilePath, Encoding.Default);
|
||||
|
||||
while (!myFile.EndOfStream)
|
||||
{
|
||||
var data = myFile.ReadLine()?.Split('|');
|
||||
while (!myFile.EndOfStream)
|
||||
{
|
||||
var data = myFile.ReadLine()?.Split('|');
|
||||
|
||||
if (data?.Length >= 3)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(data[1]) && !String.IsNullOrEmpty(data[2]))
|
||||
ProfileList.Add(new BeWoProfile(data[0], data[1], data[2]));
|
||||
}
|
||||
}
|
||||
myFile.Close();
|
||||
}
|
||||
if (data?.Length >= 3)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(data[1]) && !String.IsNullOrEmpty(data[2]))
|
||||
ProfileList.Add(new BeWoProfile(data[0], data[1], data[2]));
|
||||
}
|
||||
}
|
||||
myFile.Close();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private string GetNumericServerName(string serverName)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(serverName))
|
||||
{
|
||||
int snOut = 0;
|
||||
if (!Int32.TryParse(serverName, out snOut))
|
||||
{
|
||||
String nname = serverName.Replace("app", "");
|
||||
if (nname.IndexOf('.') > 0)
|
||||
{
|
||||
return nname.Substring(0, nname.IndexOf('.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
return serverName;
|
||||
}
|
||||
private string GetNumericServerName(string serverName)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(serverName))
|
||||
{
|
||||
int snOut = 0;
|
||||
if (!Int32.TryParse(serverName, out snOut))
|
||||
{
|
||||
String nname = serverName.Replace("app", "");
|
||||
if (nname.IndexOf('.') > 0)
|
||||
{
|
||||
return nname.Substring(0, nname.IndexOf('.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
return serverName;
|
||||
}
|
||||
|
||||
private void ShowEnterTenantDialog()
|
||||
{
|
||||
BeWoProfile p = null;
|
||||
|
||||
|
||||
var cancel = false;
|
||||
var tenant = String.Empty;
|
||||
while (p == null && !cancel)
|
||||
{
|
||||
var dlg = new EnterTenantDialog {Tenant = tenant};
|
||||
var dlg = new EnterTenantDialog { Tenant = tenant };
|
||||
var result = dlg.ShowDialog();
|
||||
if (result.HasValue && result.Value)
|
||||
{
|
||||
@@ -551,14 +551,14 @@ namespace BeWo
|
||||
{
|
||||
tenant = tenant.Trim();
|
||||
}
|
||||
var server = GetServerFromTenant(tenant);
|
||||
var server = GetServerFromTenant(tenant);
|
||||
if (!String.IsNullOrEmpty(server))
|
||||
{
|
||||
p = new BeWoProfile(tenant, server, tenant);
|
||||
if (ProfileList.Count > 0)
|
||||
ProfileList.Insert(0, p);
|
||||
else
|
||||
ProfileList.Add(p);
|
||||
if (ProfileList.Count > 0)
|
||||
ProfileList.Insert(0, p);
|
||||
else
|
||||
ProfileList.Add(p);
|
||||
SaveProfileListToFile();
|
||||
}
|
||||
else
|
||||
@@ -574,14 +574,14 @@ namespace BeWo
|
||||
}
|
||||
|
||||
|
||||
private string GetServerFromTenant(string tenant)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (tenant == "demo")
|
||||
{
|
||||
return "app1.bewoplaner.de";
|
||||
}
|
||||
private string GetServerFromTenant(string tenant)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (tenant == "demo")
|
||||
{
|
||||
return "app1.bewoplaner.de";
|
||||
}
|
||||
//Server URL über Kundennummer:
|
||||
//https://bewoplaner.beyondsoft.de/getserver.php?CustomerID=1234567890
|
||||
|
||||
@@ -590,28 +590,28 @@ namespace BeWo
|
||||
//https://bewoplaner.beyondsoft.de/getcontractstate.php?CustomerID=1234567890
|
||||
|
||||
|
||||
|
||||
|
||||
String url = String.Format(GETSERVER_URL, tenant);
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
//MessageBox.Show(hostAddress);
|
||||
byte[] response = client.UploadValues(url, "POST", new NameValueCollection());
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
//MessageBox.Show(hostAddress);
|
||||
byte[] response = client.UploadValues(url, "POST", new NameValueCollection());
|
||||
|
||||
String server = System.Text.Encoding.ASCII.GetString(response);
|
||||
String server = System.Text.Encoding.ASCII.GetString(response);
|
||||
|
||||
return server;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//MessageBox.Show(String.Format("Fehler beim Prüfen der Kundennummer: {0}\n\n{1}", ex.Message, ex.StackTrace));
|
||||
return null;
|
||||
}
|
||||
return server;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//MessageBox.Show(String.Format("Fehler beim Prüfen der Kundennummer: {0}\n\n{1}", ex.Message, ex.StackTrace));
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private BeWoProfile GenerateProfileFromUri(Uri uri)
|
||||
{
|
||||
|
||||
@@ -711,10 +711,12 @@ namespace BeWo
|
||||
TextBox_Username.Focus();
|
||||
}
|
||||
|
||||
if(DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.AutoLogin)
|
||||
#if DEBUG
|
||||
if (DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.AutoLogin)
|
||||
{
|
||||
button_login_Click(this, new RoutedEventArgs());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private void ShowModalBackground()
|
||||
@@ -732,43 +734,43 @@ namespace BeWo
|
||||
private void button_login_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
if (!String.IsNullOrEmpty(proxyname))
|
||||
{
|
||||
var webProxy = WebProxy.GetDefaultProxy();
|
||||
webProxy.UseDefaultCredentials = true;
|
||||
System.Net.WebRequest.DefaultWebProxy = new WebProxy(proxyname, true);
|
||||
if (!String.IsNullOrEmpty(proxyname))
|
||||
{
|
||||
var webProxy = WebProxy.GetDefaultProxy();
|
||||
webProxy.UseDefaultCredentials = true;
|
||||
System.Net.WebRequest.DefaultWebProxy = new WebProxy(proxyname, true);
|
||||
|
||||
if (String.IsNullOrEmpty(proxyUsername))
|
||||
{
|
||||
WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultNetworkCredentials;
|
||||
}
|
||||
else
|
||||
{
|
||||
WebRequest.DefaultWebProxy.Credentials = new NetworkCredential(proxyUsername, proxypasswd);
|
||||
}
|
||||
}
|
||||
if (String.IsNullOrEmpty(proxyUsername))
|
||||
{
|
||||
WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultNetworkCredentials;
|
||||
}
|
||||
else
|
||||
{
|
||||
WebRequest.DefaultWebProxy.Credentials = new NetworkCredential(proxyUsername, proxypasswd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (ProfileList.Count == 0 || profileSelectionComboBox.SelectedItem == null)
|
||||
{
|
||||
MessageBox.Show(
|
||||
"Es wurde kein gültiges Profil gefunden. Bitte erstellen Sie zunächst ein Profil. Klicken Sie dazu auf 'Erweitert' und anschließend auf den Button 'Profile bearbeiten'",
|
||||
"Ungültiges Profil", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
var profile = profileSelectionComboBox.SelectedItem as BeWoProfile;
|
||||
if (ProfileList.Count == 0 || profileSelectionComboBox.SelectedItem == null)
|
||||
{
|
||||
MessageBox.Show(
|
||||
"Es wurde kein gültiges Profil gefunden. Bitte erstellen Sie zunächst ein Profil. Klicken Sie dazu auf 'Erweitert' und anschließend auf den Button 'Profile bearbeiten'",
|
||||
"Ungültiges Profil", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
var profile = profileSelectionComboBox.SelectedItem as BeWoProfile;
|
||||
|
||||
isNet45OrNewer = IsNet45OrNewer();
|
||||
isNet45OrNewer = IsNet45OrNewer();
|
||||
|
||||
if (!isNet45OrNewer)
|
||||
{
|
||||
if (!CheckStatusMessage(String.Format(GETNETMESSAGE_URL, profile.Tenant, BeWoApp.ShortVersion)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isNet45OrNewer)
|
||||
{
|
||||
if (!CheckStatusMessage(String.Format(GETNETMESSAGE_URL, profile.Tenant, BeWoApp.ShortVersion)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (!CheckStatusMessage(String.Format(GETSTATUSMESSAGE_URL + "&pre", profile.Tenant, BeWoApp.ShortVersion)))
|
||||
@@ -784,30 +786,30 @@ namespace BeWo
|
||||
|
||||
|
||||
ChangeServerAndTenant(profile);
|
||||
var lWaitLayer = new WaitLayer2();
|
||||
grid_root.Children.Add(lWaitLayer);
|
||||
var lWaitLayer = new WaitLayer2();
|
||||
grid_root.Children.Add(lWaitLayer);
|
||||
|
||||
string lUserName = TextBox_Username.Text;
|
||||
string lPassword = PasswordBox_Password.Password;
|
||||
string lPIN = PINTextBox.Text;
|
||||
string lTenant = BeWoApp.Tenant;
|
||||
|
||||
|
||||
if (!String.IsNullOrEmpty(lPIN))
|
||||
{
|
||||
lPIN += "_" + System.Environment.MachineName;
|
||||
}
|
||||
Action<WaitLayer2, String, String, String, String> action = Login;
|
||||
action.BeginInvoke(lWaitLayer, lUserName, lPassword, lTenant, lPIN, cb => {}, null);
|
||||
}
|
||||
string lUserName = TextBox_Username.Text;
|
||||
string lPassword = PasswordBox_Password.Password;
|
||||
string lPIN = PINTextBox.Text;
|
||||
string lTenant = BeWoApp.Tenant;
|
||||
|
||||
|
||||
if (!String.IsNullOrEmpty(lPIN))
|
||||
{
|
||||
lPIN += "_" + System.Environment.MachineName;
|
||||
}
|
||||
Action<WaitLayer2, String, String, String, String> action = Login;
|
||||
action.BeginInvoke(lWaitLayer, lUserName, lPassword, lTenant, lPIN, cb => { }, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void Login(WaitLayer2 lWaitLayer, String lUserName, String lPassword, String lTenant, String lPIN)
|
||||
{
|
||||
{
|
||||
try
|
||||
{
|
||||
//1. Versuch
|
||||
UserValidationResult result = TryLogin(lWaitLayer, lUserName, lPassword, lTenant, lPIN );
|
||||
UserValidationResult result = TryLogin(lWaitLayer, lUserName, lPassword, lTenant, lPIN);
|
||||
|
||||
//2. Versuch
|
||||
if (result == UserValidationResult.UnkownError)
|
||||
@@ -815,7 +817,7 @@ namespace BeWo
|
||||
ServiceFacade.DoOperationsServiceAsync(op => op.ResetTenant(lTenant),
|
||||
delegate
|
||||
{
|
||||
result = TryLogin(lWaitLayer ,lUserName, lPassword, lTenant, lPIN);
|
||||
result = TryLogin(lWaitLayer, lUserName, lPassword, lTenant, lPIN);
|
||||
|
||||
if (result == UserValidationResult.UnkownError)
|
||||
{
|
||||
@@ -823,7 +825,7 @@ namespace BeWo
|
||||
ServiceFacade.DoOperationsServiceAsync(op => op.ResetAllTenants(),
|
||||
delegate
|
||||
{
|
||||
result = TryLogin(lWaitLayer,lUserName, lPassword, lTenant, lPIN);
|
||||
result = TryLogin(lWaitLayer, lUserName, lPassword, lTenant, lPIN);
|
||||
|
||||
if (result == UserValidationResult.UnkownError)
|
||||
{
|
||||
@@ -862,37 +864,37 @@ namespace BeWo
|
||||
MessageBox.Show("Die Kundennummer '" + lTenant + "' ist ungültig.", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
});
|
||||
}
|
||||
String pin = lPIN;
|
||||
|
||||
if (!String.IsNullOrEmpty(lPIN) && lPIN.IndexOf('_') >= 0)
|
||||
{
|
||||
pin = lPIN.Substring(0, lPIN.IndexOf('_'));
|
||||
}
|
||||
String pin = lPIN;
|
||||
|
||||
if (result == UserValidationResult.IncorrectPin)
|
||||
{
|
||||
this.Dispatch(delegate
|
||||
{
|
||||
grid_root.Children.Remove(lWaitLayer);
|
||||
MessageBox.Show("Die Pin '" + pin + "' ist unbekannt!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
});
|
||||
}
|
||||
if (result == UserValidationResult.PinAlreadyUsed)
|
||||
{
|
||||
this.Dispatch(delegate
|
||||
{
|
||||
grid_root.Children.Remove(lWaitLayer);
|
||||
MessageBox.Show("Die Pin '" + pin + "' wurde bereits verwendet!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
});
|
||||
}
|
||||
if (result == UserValidationResult.PinExpired)
|
||||
{
|
||||
this.Dispatch(delegate
|
||||
{
|
||||
grid_root.Children.Remove(lWaitLayer);
|
||||
MessageBox.Show("Die Pin '" + pin + "' ist bereits abgelaufen!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
});
|
||||
}
|
||||
if (!String.IsNullOrEmpty(lPIN) && lPIN.IndexOf('_') >= 0)
|
||||
{
|
||||
pin = lPIN.Substring(0, lPIN.IndexOf('_'));
|
||||
}
|
||||
|
||||
if (result == UserValidationResult.IncorrectPin)
|
||||
{
|
||||
this.Dispatch(delegate
|
||||
{
|
||||
grid_root.Children.Remove(lWaitLayer);
|
||||
MessageBox.Show("Die Pin '" + pin + "' ist unbekannt!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
});
|
||||
}
|
||||
if (result == UserValidationResult.PinAlreadyUsed)
|
||||
{
|
||||
this.Dispatch(delegate
|
||||
{
|
||||
grid_root.Children.Remove(lWaitLayer);
|
||||
MessageBox.Show("Die Pin '" + pin + "' wurde bereits verwendet!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
});
|
||||
}
|
||||
if (result == UserValidationResult.PinExpired)
|
||||
{
|
||||
this.Dispatch(delegate
|
||||
{
|
||||
grid_root.Children.Remove(lWaitLayer);
|
||||
MessageBox.Show("Die Pin '" + pin + "' ist bereits abgelaufen!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
});
|
||||
}
|
||||
if (result == UserValidationResult.PasswordExpired)
|
||||
{
|
||||
//this.Dispatch(delegate
|
||||
@@ -919,7 +921,7 @@ namespace BeWo
|
||||
private UserValidationResult TryLogin(WaitLayer2 lWaitLayer, string lUserName, string lPassword, string tenant, string lPin)
|
||||
{
|
||||
UserValidationResult? result = null;
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(lUserName) && !string.IsNullOrEmpty(lPassword))
|
||||
{
|
||||
String tempUsername = lUserName;
|
||||
@@ -945,7 +947,7 @@ namespace BeWo
|
||||
clr = e.Message;
|
||||
}
|
||||
|
||||
|
||||
|
||||
tempUsername = String.Format("{0}//Version={1};CLRVersion={2};BeWoVersion={3};IsNet45OrNewer={4}", lUserName, version, clr, bewoVersion, isNet45OrNewer);
|
||||
try
|
||||
{
|
||||
@@ -953,7 +955,7 @@ namespace BeWo
|
||||
{
|
||||
try
|
||||
{
|
||||
return s.IsUserValid(tempUsername, lPassword, lPin);
|
||||
return s.IsUserValid(tempUsername, lPassword, lPin);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -969,7 +971,7 @@ namespace BeWo
|
||||
LoginResult(lWaitLayer, r, lUserName, lPassword, tenant, lPin);
|
||||
});
|
||||
|
||||
|
||||
|
||||
}, true);
|
||||
}
|
||||
catch (FaultException<BeWoFault>)
|
||||
@@ -979,7 +981,7 @@ namespace BeWo
|
||||
}
|
||||
else
|
||||
{
|
||||
if(result == null)
|
||||
if (result == null)
|
||||
result = UserValidationResult.UserUnknown;
|
||||
}
|
||||
|
||||
@@ -991,9 +993,9 @@ namespace BeWo
|
||||
return result.Value;
|
||||
}
|
||||
|
||||
private void LoginResult( WaitLayer2 lWaitLayer, UserValidationResult result, String lUserName, String lPassword, String tenant, String lPIN)
|
||||
private void LoginResult(WaitLayer2 lWaitLayer, UserValidationResult result, String lUserName, String lPassword, String tenant, String lPIN)
|
||||
{
|
||||
|
||||
|
||||
if (result == UserValidationResult.UserValid || result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded || result == UserValidationResult.TwoFactorAuthenticationFailedNoChatCodeAllowLogin)
|
||||
{
|
||||
if (result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded || result == UserValidationResult.TwoFactorAuthenticationFailedNoChatCodeAllowLogin)
|
||||
@@ -1010,7 +1012,7 @@ namespace BeWo
|
||||
message = Translator.Translate("Kein Chat Code für die Zwei Faktor Authentifizierung gefunden");
|
||||
dlg.ShowCodeField = false;
|
||||
}
|
||||
|
||||
|
||||
if (message.Contains("<") && message.Contains(">"))
|
||||
{
|
||||
dlg.SetXaml(message);
|
||||
@@ -1036,14 +1038,14 @@ namespace BeWo
|
||||
|
||||
BeWoApp.UserName = lUserName;
|
||||
BeWoApp.UserPassword = lPassword;
|
||||
|
||||
|
||||
BeWoApp.PasswortStrength = BeWoUtils.CheckPasswordSecurity(lPassword);
|
||||
|
||||
ServiceFacade.DoUserServiceAsync(s2 => s2.LoadUserByNameAndPassword(lUserName, lPassword),
|
||||
r2 =>
|
||||
{
|
||||
BeWoApp.LoggedOnUser = r2;
|
||||
|
||||
|
||||
ServiceFacade.DoOperationsServiceAsync(s => s.GetMandator(),
|
||||
m =>
|
||||
{
|
||||
@@ -1078,7 +1080,7 @@ namespace BeWo
|
||||
}
|
||||
grid_root.Children.Remove(lWaitLayer);
|
||||
MessageBox.Show(msg, "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
|
||||
|
||||
var pav = new PasswortAenderungsView();
|
||||
pav.ShowDialog();
|
||||
|
||||
@@ -1086,7 +1088,8 @@ namespace BeWo
|
||||
{
|
||||
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
LoginSuccessful?.Invoke(this, new EventArgs());
|
||||
}
|
||||
});
|
||||
@@ -1153,14 +1156,14 @@ namespace BeWo
|
||||
|
||||
}
|
||||
|
||||
private void button_configureProxy_Click(object sender, RoutedEventArgs rea)
|
||||
{
|
||||
private void button_configureProxy_Click(object sender, RoutedEventArgs rea)
|
||||
{
|
||||
ProxyLoginView proxyLogin = new ProxyLoginView();
|
||||
proxyLogin.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
|
||||
proxyLogin.ShowDialog();
|
||||
ReadProxyName();
|
||||
}
|
||||
proxyLogin.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
|
||||
proxyLogin.ShowDialog();
|
||||
ReadProxyName();
|
||||
}
|
||||
|
||||
// TODO: Verschlüsselung einbauen!
|
||||
private void ReadProxyName()
|
||||
@@ -1171,15 +1174,15 @@ namespace BeWo
|
||||
|
||||
try
|
||||
{
|
||||
var filePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
filePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat");
|
||||
}
|
||||
var filePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
filePath = Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat");
|
||||
}
|
||||
|
||||
var allLines = File.ReadAllLines(filePath);
|
||||
|
||||
foreach(var linex in allLines)
|
||||
foreach (var linex in allLines)
|
||||
{
|
||||
var decryptedLine = EncryptionUtils.DecryptString(linex);
|
||||
datai[counter] = decryptedLine;
|
||||
@@ -1195,20 +1198,22 @@ namespace BeWo
|
||||
//}
|
||||
|
||||
//file.Close();
|
||||
|
||||
|
||||
proxyname = datai[0];
|
||||
proxyUsername = datai[1];
|
||||
proxypasswd = datai[2];
|
||||
|
||||
proxyTextBox.Text = proxyname;
|
||||
|
||||
}catch(IOException i){
|
||||
}
|
||||
catch (IOException i)
|
||||
{
|
||||
//Fehlermeldung
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void SaveSelectedProfile(BeWoProfile profile)
|
||||
{
|
||||
try
|
||||
@@ -1217,7 +1222,7 @@ namespace BeWo
|
||||
{
|
||||
#if DEBUG
|
||||
sw.WriteLine("selected={0}|{1}|{2}", profile.Name, profile.Server, profile.Tenant);
|
||||
|
||||
|
||||
#else
|
||||
if (profile.Tenant != "demo")
|
||||
{
|
||||
@@ -1297,26 +1302,26 @@ namespace BeWo
|
||||
}
|
||||
|
||||
profile.Tenant = profile.Tenant.Trim();
|
||||
|
||||
//if (BeWoApp.Tenant == "7635986435")
|
||||
//{
|
||||
// if (profile.Server != "3")
|
||||
// {
|
||||
// profile.Server = "3";
|
||||
// SaveProfileListToFile();
|
||||
// }
|
||||
|
||||
//}
|
||||
//if (BeWoApp.Tenant == "7635986435")
|
||||
//{
|
||||
// if (profile.Server != "3")
|
||||
// {
|
||||
// profile.Server = "3";
|
||||
// SaveProfileListToFile();
|
||||
// }
|
||||
|
||||
var server = GetServerFromTenant(profile.Tenant);
|
||||
if (!String.IsNullOrEmpty(server) && server != profile.Server)
|
||||
{
|
||||
profile.Server = server;
|
||||
SaveProfileListToFile();
|
||||
}
|
||||
//}
|
||||
|
||||
BeWoApp.Tenant = profile.Tenant;
|
||||
BeWoApp.ServerName = GetNumericServerName(profile.Server);
|
||||
var server = GetServerFromTenant(profile.Tenant);
|
||||
if (!String.IsNullOrEmpty(server) && server != profile.Server)
|
||||
{
|
||||
profile.Server = server;
|
||||
SaveProfileListToFile();
|
||||
}
|
||||
|
||||
BeWoApp.Tenant = profile.Tenant;
|
||||
BeWoApp.ServerName = GetNumericServerName(profile.Server);
|
||||
BeWoApp.ServerAddress = profile.Server;
|
||||
|
||||
#if DEBUG
|
||||
@@ -1337,15 +1342,15 @@ namespace BeWo
|
||||
"Ungültiges Profil", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void ShowProfileStackPanel(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (profileLabel.Visibility == Visibility.Visible)
|
||||
{
|
||||
profileLabel.Visibility = Visibility.Collapsed;
|
||||
profileStackPanel.Visibility = Visibility.Collapsed;
|
||||
proxyLabel.Visibility = Visibility.Collapsed;
|
||||
proxyStackPanel.Visibility = Visibility.Collapsed;
|
||||
proxyLabel.Visibility = Visibility.Collapsed;
|
||||
proxyStackPanel.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1401,8 +1406,8 @@ namespace BeWo
|
||||
showProfileSelectionBtn.Content = "Ausblenden";
|
||||
profileLabel.Visibility = Visibility.Visible;
|
||||
profileStackPanel.Visibility = Visibility.Visible;
|
||||
proxyLabel.Visibility = Visibility.Visible;
|
||||
proxyStackPanel.Visibility = Visibility.Visible;
|
||||
proxyLabel.Visibility = Visibility.Visible;
|
||||
proxyStackPanel.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1425,17 +1430,17 @@ namespace BeWo
|
||||
if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
private bool pwvViewOffen;
|
||||
private void PasswortVergessenLinkOnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
if (pwvViewOffen) return;
|
||||
private bool pwvViewOffen;
|
||||
private void PasswortVergessenLinkOnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
if (pwvViewOffen) return;
|
||||
|
||||
var p = new PwVergessenView();
|
||||
p.Closed += (s, ex) => { pwvViewOffen = false; };
|
||||
p.Show();
|
||||
var p = new PwVergessenView();
|
||||
p.Closed += (s, ex) => { pwvViewOffen = false; };
|
||||
p.Show();
|
||||
|
||||
pwvViewOffen = true;
|
||||
}
|
||||
pwvViewOffen = true;
|
||||
}
|
||||
|
||||
private void UIElement_OnKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
@@ -1445,7 +1450,7 @@ namespace BeWo
|
||||
{
|
||||
PinEinblenden();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1476,8 +1481,8 @@ namespace BeWo
|
||||
Name = pname;
|
||||
Server = pserver;
|
||||
Tenant = ptenant;
|
||||
if (Name == null)
|
||||
Name = String.Empty;
|
||||
if (Name == null)
|
||||
Name = String.Empty;
|
||||
if (!String.IsNullOrEmpty(Tenant))
|
||||
{
|
||||
Tenant = Tenant.Trim();
|
||||
|
||||
@@ -50,7 +50,8 @@ namespace BeWo
|
||||
Wohnheim,
|
||||
Vertretungen,
|
||||
CustomerTeam,
|
||||
Scheduling
|
||||
Scheduling,
|
||||
Finance
|
||||
}
|
||||
|
||||
public partial class MainControl
|
||||
@@ -295,6 +296,9 @@ namespace BeWo
|
||||
case UIContext.Scheduling:
|
||||
view = new SchedulingMasterView();
|
||||
break;
|
||||
case UIContext.Finance:
|
||||
view = new FinanceView();
|
||||
break;
|
||||
}
|
||||
_Views[uiContext] = view;
|
||||
}
|
||||
@@ -901,7 +905,7 @@ namespace BeWo
|
||||
{
|
||||
if (DoSaveCheck())
|
||||
{
|
||||
NavigateTo(new FinanceView());
|
||||
NavigateTo(GetViewForUIContext(UIContext.Finance));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,102 +1,281 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.GkvAbrechnungOverview"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
|
||||
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:r="clr-namespace:BeWo.Security" VerticalAlignment="Stretch" Focusable="True" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
|
||||
<localView:BeWoView
|
||||
x:Class="BeWo.View.Detail.Accounting.GkvAbrechnungOverview"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
|
||||
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
|
||||
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
||||
xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
|
||||
xmlns:r="clr-namespace:BeWo.Security"
|
||||
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Focusable="True">
|
||||
|
||||
<Grid>
|
||||
<GroupBox x:Name="groupbox_editArea" Grid.Row="0" Header="GKV-Abrechnungen" Style="{DynamicResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<GroupBox
|
||||
x:Name="groupbox_editArea"
|
||||
Grid.Row="0"
|
||||
Header="GKV-Abrechnungen"
|
||||
Style="{DynamicResource ObjectEditGroupBox}">
|
||||
|
||||
<Grid Grid.IsSharedSizeScope="True" Margin="0,3,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<Grid Margin="0,3,0,0" Grid.IsSharedSizeScope="True">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<localView:YearMonthFilter Margin="3 0 0 3" VerticalAlignment="Bottom" HorizontalAlignment="Left" Grid.Column="0" x:Name="yearMonthFilter" FilterSpanChanged="YearMonthFilter_FilterSpanChanged" />
|
||||
<StackPanel Orientation="Vertical" Grid.Column="1" Margin="12,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Left">
|
||||
<RadioButton x:Name="radioFilterByInvoiceDate" Content="Nach Erstelldatum filtern" IsChecked="True" Click="radioFilterByInvoiceDate_Click" ToolTip="Filtert die angezeigten GKV-Abrechnungen nach ihrem Erstelldatum"/>
|
||||
<RadioButton x:Name="radioFilterByAccountingDate" Content="Nach Abrechnungszeitraum filtern" Click="radioFilterByInvoiceDate_Click" ToolTip="Filtert die angezeigten GKV-Abrechnungen nach ihrem Abrechnungszeitraum. Es werden alle Abrechnungen angezeigt, die den ausgewählten Monat bzw. Jahr beinhalten."/>
|
||||
<localView:YearMonthFilter
|
||||
x:Name="yearMonthFilter"
|
||||
Grid.Column="0"
|
||||
Margin="3,0,0,3"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
FilterSpanChanged="YearMonthFilter_FilterSpanChanged" />
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="12,5,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Vertical">
|
||||
<RadioButton
|
||||
x:Name="radioFilterByInvoiceDate"
|
||||
Click="radioFilterByInvoiceDate_Click"
|
||||
Content="Nach Erstelldatum filtern"
|
||||
IsChecked="True"
|
||||
ToolTip="Filtert die angezeigten GKV-Abrechnungen nach ihrem Erstelldatum" />
|
||||
<RadioButton
|
||||
x:Name="radioFilterByAccountingDate"
|
||||
Click="radioFilterByInvoiceDate_Click"
|
||||
Content="Nach Abrechnungszeitraum filtern"
|
||||
ToolTip="Filtert die angezeigten GKV-Abrechnungen nach ihrem Abrechnungszeitraum. Es werden alle Abrechnungen angezeigt, die den ausgewählten Monat bzw. Jahr beinhalten." />
|
||||
</StackPanel>
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="button_new" Grid.Column="2" Content="Neue Abrechnung" Margin="3" Click="NewButton_OnClick" Height="24" VerticalAlignment="Bottom" ToolTip="Neue GKV-Abrechnung erstellen" />
|
||||
<Button x:Name="button_reload" Grid.Column="1" Content="Aktualisieren" Margin="3" Click="ReloadButton_OnClick" Height="24" VerticalAlignment="Bottom" Width="80" ToolTip="Aktualisiere die Liste aller GKV-Abrechnungen"/>
|
||||
<Button
|
||||
x:Name="button_new"
|
||||
Grid.Column="2"
|
||||
Height="24"
|
||||
Margin="3"
|
||||
VerticalAlignment="Bottom"
|
||||
Click="NewButton_OnClick"
|
||||
Content="Neue Abrechnung"
|
||||
ToolTip="Neue GKV-Abrechnung erstellen" />
|
||||
<Button
|
||||
x:Name="button_reload"
|
||||
Grid.Column="1"
|
||||
Width="80"
|
||||
Height="24"
|
||||
Margin="3"
|
||||
VerticalAlignment="Bottom"
|
||||
Click="ReloadButton_OnClick"
|
||||
Content="Aktualisieren"
|
||||
ToolTip="Aktualisiere die Liste aller GKV-Abrechnungen" />
|
||||
</Grid>
|
||||
|
||||
<dxg:GridControl Margin="3" Grid.ColumnSpan="3" Grid.Row="1" DataSource="{Binding VMList}" x:Name="datagrid_gkvAbrechnungen" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Visibility="Collapsed">
|
||||
<dxg:GridControl
|
||||
x:Name="datagrid_gkvAbrechnungen"
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
DataSource="{Binding VMList}"
|
||||
Visibility="Collapsed">
|
||||
<dxg:GridControl.Effect>
|
||||
<DropShadowEffect Color="#FFC7D9E2"/>
|
||||
</dxg:GridControl.Effect>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn x:Name="ColumnChecked" FieldName="IsChecked" Header=" " MinWidth="30" Width="120" Visible="False"></dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="ColumnButtons" AllowEditing="False" Width="Auto" FieldName="ReportLink" Header=" ">
|
||||
<dxg:GridColumn
|
||||
x:Name="ColumnChecked"
|
||||
Width="120"
|
||||
MinWidth="30"
|
||||
FieldName="IsChecked"
|
||||
Header=" "
|
||||
Visible="False" />
|
||||
<dxg:GridColumn
|
||||
x:Name="ColumnButtons"
|
||||
Width="Auto"
|
||||
AllowEditing="False"
|
||||
FieldName="ReportLink"
|
||||
Header=" ">
|
||||
<dxg:GridColumn.DisplayTemplate>
|
||||
<ControlTemplate>
|
||||
<StackPanel Orientation="Horizontal" Margin="1">
|
||||
<Button Click="btn_details_Click" Content="¥" Padding="0" Margin="1" ToolTip="Details anzeigen" Foreground="#FFFFFF" FontSize="11" FontFamily="Webdings" x:Name="btn_details" Height="18" Width="20" VerticalAlignment="Center" />
|
||||
<StackPanel Margin="1" Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btn_details"
|
||||
Width="20"
|
||||
Height="18"
|
||||
Margin="1"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Click="btn_details_Click"
|
||||
Content="¥"
|
||||
FontFamily="Webdings"
|
||||
FontSize="11"
|
||||
Foreground="#FFFFFF"
|
||||
ToolTip="Details anzeigen" />
|
||||
<!--<Button Click="btn_nutz_Click" Content="¥" Padding="0" Margin="1" ToolTip="Nutzdatendatei" Foreground="#BBBBBB" FontSize="10" FontFamily="Webdings" x:Name="btn_nutz" Height="17" Width="20" VerticalAlignment="Center" />
|
||||
<Button Click="btn_auf_Click" Content="¥" Padding="0" Margin="1" ToolTip="Auftragsdatei" Foreground="#BBBBBB" FontSize="10" FontFamily="Webdings" x:Name="btn_auf" Height="17" Width="20" VerticalAlignment="Center" />-->
|
||||
<Button Click="btn_send_Click" Content="*" Padding="0" Margin="1" ToolTip="Senden" Foreground="#ffffff" FontSize="11" FontFamily="Wingdings" x:Name="btn_send" Height="18" Width="20" VerticalAlignment="Center"/>
|
||||
<Button Click="btn_force_send_Click" Content="r" Padding="0" Margin="1" ToolTip="DEBUG: Protokolle Löschen" Foreground="#FFFF00" FontSize="11" FontFamily="Wingdings" x:Name="btn_force_send" Height="18" Width="20" VerticalAlignment="Center" Visibility="Collapsed"/>
|
||||
<Button Click="btn_delete_Click" Content="r" Padding="0" Margin="1" ToolTip="Löschen" Foreground="#FF0000" FontSize="11" FontFamily="Webdings" x:Name="btn_delete" Height="18" Width="20" VerticalAlignment="Center" />
|
||||
<Button
|
||||
x:Name="btn_send"
|
||||
Width="20"
|
||||
Height="18"
|
||||
Margin="1"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Click="btn_send_Click"
|
||||
Content="*"
|
||||
FontFamily="Wingdings"
|
||||
FontSize="11"
|
||||
Foreground="#ffffff"
|
||||
ToolTip="Senden" />
|
||||
<Button
|
||||
x:Name="btn_force_send"
|
||||
Width="20"
|
||||
Height="18"
|
||||
Margin="1"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Click="btn_force_send_Click"
|
||||
Content="r"
|
||||
FontFamily="Wingdings"
|
||||
FontSize="11"
|
||||
Foreground="#FFFF00"
|
||||
ToolTip="DEBUG: Protokolle Löschen"
|
||||
Visibility="Collapsed" />
|
||||
<Button
|
||||
x:Name="btn_delete"
|
||||
Width="20"
|
||||
Height="18"
|
||||
Margin="1"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
Click="btn_delete_Click"
|
||||
Content="r"
|
||||
FontFamily="Webdings"
|
||||
FontSize="11"
|
||||
Foreground="#FF0000"
|
||||
ToolTip="Löschen" />
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
</dxg:GridColumn.DisplayTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="RecipientString" Width="177" Header="{markup:Translate EmpfängerSingular}" />
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AbrechnungsZeitraum" Header="Abrechnungszeitraum" Width="Auto"/>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="ErstelltAm" Header="Erstelldatum" Width="Auto">
|
||||
<dxg:GridColumn
|
||||
Width="177"
|
||||
AllowEditing="False"
|
||||
FieldName="RecipientString"
|
||||
Header="{markup:Translate EmpfängerSingular}"
|
||||
ReadOnly="True" />
|
||||
<dxg:GridColumn
|
||||
Width="Auto"
|
||||
AllowEditing="False"
|
||||
FieldName="AbrechnungsZeitraum"
|
||||
Header="Abrechnungszeitraum"
|
||||
ReadOnly="True" />
|
||||
<dxg:GridColumn
|
||||
Width="Auto"
|
||||
AllowEditing="False"
|
||||
FieldName="ErstelltAm"
|
||||
Header="Erstelldatum"
|
||||
ReadOnly="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" HorizontalContentAlignment="Right"/>
|
||||
<dxe:DateEditSettings HorizontalContentAlignment="Right" DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="GkvState" Header="Status" Width="Auto">
|
||||
<dxg:GridColumn
|
||||
Width="Auto"
|
||||
AllowEditing="False"
|
||||
FieldName="GkvState"
|
||||
Header="Status"
|
||||
ReadOnly="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayTextConverter="{StaticResource GkvState2StringConverter}"/>
|
||||
<dxe:DateEditSettings DisplayTextConverter="{StaticResource GkvState2StringConverter}" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="LastTransferDateTime" Header="Gesendet Am" Width="Auto">
|
||||
<dxg:GridColumn
|
||||
Width="Auto"
|
||||
AllowEditing="False"
|
||||
FieldName="LastTransferDateTime"
|
||||
Header="Gesendet Am"
|
||||
ReadOnly="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" HorizontalContentAlignment="Right"/>
|
||||
<dxe:DateEditSettings HorizontalContentAlignment="Right" DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="FehlermeldungColumn" FieldName="Fehlermeldung" Header="Fehlermeldung" Width="*"></dxg:GridColumn>
|
||||
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Betrag" Header="Betrag">
|
||||
<dxg:GridColumn
|
||||
x:Name="FehlermeldungColumn"
|
||||
Width="*"
|
||||
FieldName="Fehlermeldung"
|
||||
Header="Fehlermeldung" />
|
||||
<dxg:GridColumn
|
||||
AllowEditing="False"
|
||||
FieldName="Betrag"
|
||||
Header="Betrag"
|
||||
ReadOnly="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric" HorizontalContentAlignment="Right"></dxe:TextEditSettings>
|
||||
<dxe:TextEditSettings
|
||||
HorizontalContentAlignment="Right"
|
||||
DisplayFormat="c"
|
||||
Mask="c"
|
||||
MaskType="Numeric" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="PaidColumn" FieldName="Bezahlt" Header="Bezahlt" Width="Auto"></dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Notice" Header="Bemerkung" MinWidth="200" Width="3*" Tag="1024">
|
||||
<dxg:GridColumn
|
||||
x:Name="PaidColumn"
|
||||
Width="Auto"
|
||||
FieldName="Bezahlt"
|
||||
Header="Bezahlt" />
|
||||
<dxg:GridColumn
|
||||
Width="3*"
|
||||
MinWidth="200"
|
||||
FieldName="Notice"
|
||||
Header="Bemerkung"
|
||||
Tag="1024">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView NavigationStyle="Cell" Loaded="gridView_Loaded" x:Name="gridView" BestFitMode="Smart"
|
||||
AllowBestFit="True" ShowGroupPanel="False" ScrollingMode="Smart" SnapsToDevicePixels="True" ShownEditor="gridView_ShownEditor"
|
||||
CellValueChanging="gridView_CellValueChanged"
|
||||
CustomRowAppearance="TableView_OnCustomRowAppearance"
|
||||
Margin="3,22,3,3" CellValueChanged="gridView_CellValueChanged_1" RowMinHeight="24"
|
||||
/>
|
||||
<dxg:TableView
|
||||
x:Name="gridView"
|
||||
Margin="3,22,3,3"
|
||||
AllowBestFit="True"
|
||||
BestFitMode="Smart"
|
||||
CellValueChanged="gridView_CellValueChanged_1"
|
||||
CellValueChanging="gridView_CellValueChanged"
|
||||
CustomRowAppearance="TableView_OnCustomRowAppearance"
|
||||
Loaded="gridView_Loaded"
|
||||
NavigationStyle="Cell"
|
||||
RowMinHeight="24"
|
||||
ScrollingMode="Smart"
|
||||
ShowGroupPanel="False"
|
||||
ShownEditor="gridView_ShownEditor"
|
||||
SnapsToDevicePixels="True" />
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
</localView:BeWoView>
|
||||
@@ -34,7 +34,7 @@ namespace BeWo.View.Detail.Accounting
|
||||
private readonly NewGkvAbrechnungPopUpView _NewGkvAbrechnungPopUpView;
|
||||
private readonly GkvAbrechnungListVM _Viewmodel;
|
||||
|
||||
public GkvAbrechnungOverview(GkvAbrechnungListVM vm)
|
||||
public GkvAbrechnungOverview()
|
||||
{
|
||||
UpdateDataGridFilterCommand = new DelegateCommand(UpdateDataGridFilter);
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace BeWo.View.Detail.Accounting
|
||||
|
||||
DownloadLinkEngine = new DownloadLinkEngine();
|
||||
|
||||
_Viewmodel = vm;
|
||||
_Viewmodel = new GkvAbrechnungListVM();
|
||||
|
||||
DataContext = vm;
|
||||
DataContext = _Viewmodel;
|
||||
|
||||
//datagrid_gkvAbrechnungen.FixedFilter = new BinaryOperator("Datenaustauschreferenz", 1);
|
||||
|
||||
@@ -66,10 +66,7 @@ namespace BeWo.View.Detail.Accounting
|
||||
|
||||
private void CheckRights()
|
||||
{
|
||||
//if (!BeWoApp.AppSettings.AllowStorno)
|
||||
//{
|
||||
// ColumnButtons.MinWidth = 67;
|
||||
//}
|
||||
|
||||
}
|
||||
private void RefreshGkvAbrechnungenList()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Master.FinanceView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" xmlns:val="clr-namespace:BeWo.Validation" xmlns:localView="clr-namespace:BeWo.View" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
|
||||
<localView:BeWoView x:Class="BeWo.View.Master.FinanceView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" xmlns:val="clr-namespace:BeWo.Validation" xmlns:localView="clr-namespace:BeWo.View" xmlns:accounting="clr-namespace:BeWo.View.Detail.Accounting" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
|
||||
|
||||
<Grid>
|
||||
<uc:ShadowChrome>
|
||||
@@ -40,7 +40,9 @@
|
||||
Selector.Selected="tabitem_collectiveinvoice_Selected" />
|
||||
<TabItem Header="Allgemeine Rechnungen" Name="tabitem_otherinvoice" Selector.Selected="tabitem_otherinvoice_Selected" />
|
||||
<TabItem Header="Rechnungsübersicht" Name="tabitem_overviewinvoice" Selector.Selected="tabitem_overviewinvoice_Selected" />
|
||||
<TabItem Header="GKV-Abrechnungen" Name="tabitem_gkvabrechnung" Selector.Selected="tabitem_gkvabrechnung_Selected" />
|
||||
<TabItem Header="GKV-Abrechnungen" Name="tabitem_gkvabrechnung">
|
||||
<accounting:GkvAbrechnungOverview/>
|
||||
</TabItem>
|
||||
<TabItem Header="Digitale Abrechnung" Name="tabitem_gkvabrechnung_alt" Selector.Selected="tabitem_gkvabrechnung_alt_Selected" />
|
||||
<TabItem Header="Bargeldverwaltung" Name="tabitem_bargeldverwaltung" Selector.Selected="tabitem_bargeldverwaltung_Selected"/>
|
||||
<TabItem Header="Dokumente" Name="tabitem_documents" Selector.Selected="tabitem_documents_Selected" />
|
||||
|
||||
@@ -25,6 +25,14 @@ namespace BeWo.View.Master
|
||||
InitializeComponent();
|
||||
|
||||
InitRights();
|
||||
|
||||
#if DEBUG
|
||||
if(DebugConfig.CurrentConfig is DebugConfig config && config.DebugConfigMode == DebugConfigMode.FeatureDakota)
|
||||
{
|
||||
tabitem_gkvabrechnung.Visibility = Visibility.Visible;
|
||||
root.SelectedItem = tabitem_gkvabrechnung;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public override bool IsDirty
|
||||
@@ -146,14 +154,16 @@ namespace BeWo.View.Master
|
||||
tabitem_gkvabrechnung_alt.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
foreach (TabItem tabitem in root.Items)
|
||||
{
|
||||
if (tabitem.Visibility == Visibility.Visible)
|
||||
{
|
||||
tabitem.IsSelected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
root.SelectedIndex = 0;
|
||||
|
||||
//foreach (TabItem tabitem in root.Items)
|
||||
//{
|
||||
// if (tabitem.Visibility == Visibility.Visible)
|
||||
// {
|
||||
// tabitem.IsSelected = true;
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
private void tabitem_equityinvoice_Selected(object sender, RoutedEventArgs e)
|
||||
@@ -245,14 +255,6 @@ namespace BeWo.View.Master
|
||||
}
|
||||
}
|
||||
|
||||
private void tabitem_gkvabrechnung_Selected(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_OpenViews.ContainsKey(tabitem_gkvabrechnung) || _SavePerformed)
|
||||
{
|
||||
AddView(tabitem_gkvabrechnung, new GkvAbrechnungOverview(new GkvAbrechnungListVM(null)));
|
||||
}
|
||||
}
|
||||
|
||||
private void tabitem_gkvabrechnung_alt_Selected(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_OpenViews.ContainsKey(tabitem_gkvabrechnung_alt) || _SavePerformed)
|
||||
|
||||
@@ -19,6 +19,10 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
this.VMList.ListChanged += (s, e) => this.FirePropertyChanged(PropertyName_FilterResultAmountSum);
|
||||
this.VMList.ListChanged += (s, e) => this.FirePropertyChanged(PropertyName_FilterResultAmountNotPaidSum);
|
||||
}
|
||||
public GkvAbrechnungListVM() : this(null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DateTimeSpan DateTimeSpanFilter
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user