diff --git a/BeWo/View/Detail/CustomerView.xaml b/BeWo/View/Detail/CustomerView.xaml
index 053cdf1a4..3410b8ab0 100644
--- a/BeWo/View/Detail/CustomerView.xaml
+++ b/BeWo/View/Detail/CustomerView.xaml
@@ -238,6 +238,10 @@
NavigationStyle="Cell" />
+
+
+
+
@@ -258,6 +262,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -352,6 +380,9 @@
+
+
+
@@ -386,41 +417,71 @@
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
@@ -438,7 +499,7 @@
-->
-
+
@@ -465,7 +526,7 @@
Text="{Binding Path=EquityContribution, UpdateSourceTrigger=PropertyChanged}" />
-
+
@@ -1211,7 +1273,7 @@
-
+
@@ -1379,6 +1441,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Detail/CustomerView.xaml.cs b/BeWo/View/Detail/CustomerView.xaml.cs
index 78c643d10..8eb34a7e6 100644
--- a/BeWo/View/Detail/CustomerView.xaml.cs
+++ b/BeWo/View/Detail/CustomerView.xaml.cs
@@ -130,10 +130,12 @@ namespace BeWo.View.Detail
tabitem_chatservice.Visibility = Visibility.Collapsed;
}
+ comboBox_Nationalitaet.ItemsSource = pCustomerVM.Nationalitaeten;
+ comboBox_Aufenthalt.ItemsSource = pCustomerVM.AufenthaltsStatuse;
// HACK: Force the devexpress grid to end editing when the mouse is over savebutton
- // by setting the focus to another element.
- MouseMove += (s, e) =>
+ // by setting the focus to another element.
+ MouseMove += (s, e) =>
{
if ((grid_AbsenceTimes == null || !grid_AbsenceTimes.IsVisible) &&
(grid_EmployeeRelation == null || !grid_EmployeeRelation.IsVisible) &&
@@ -668,11 +670,25 @@ namespace BeWo.View.Detail
}
}
+ private void button_addEnvironmentFamily_Click(object sender, RoutedEventArgs e)
+ {
+ if (ValidationTrigger.Validate(groupbox_newEnvironmentPerson))
+ {
+ popup_newEnvironmentFamily.IsOpen = false;
+ ViewModel.EnvironmentPersons.AddNewVMToList();
+ }
+ }
+
private void button_cancelAddEnvironmentPerson_Click(object sender, RoutedEventArgs e)
{
popup_newEnvironmentPerson.IsOpen = false;
}
+ private void button_cancelAddEnvironmentFamily_Click(object sender, RoutedEventArgs e)
+ {
+ popup_newEnvironmentFamily.IsOpen = false;
+ }
+
private void button_addEnvironmentOrganisation_Click(object sender, RoutedEventArgs e)
{
if (ValidationTrigger.Validate(groupbox_newEnvironmentOrganisation))
@@ -1343,6 +1359,11 @@ namespace BeWo.View.Detail
popup_newEnvironmentPerson.IsOpen = true;
}
+ private void button_openAddEnvironmentFamily_Click(object sender, RoutedEventArgs e)
+ {
+ popup_newEnvironmentFamily.IsOpen = true;
+ }
+
private void button_openAddEnvironmentOrganisation_Click(object sender, RoutedEventArgs e)
{
popup_newEnvironmentOrganisation.IsOpen = true;
diff --git a/BeWo/View/Detail/PersonView.xaml b/BeWo/View/Detail/PersonView.xaml
index c92a0fb71..5596b80a0 100644
--- a/BeWo/View/Detail/PersonView.xaml
+++ b/BeWo/View/Detail/PersonView.xaml
@@ -86,56 +86,36 @@
-
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
@@ -143,18 +123,18 @@
-
+
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Detail/PersonView.xaml.cs b/BeWo/View/Detail/PersonView.xaml.cs
index 0ef503cf9..53e18dfbd 100644
--- a/BeWo/View/Detail/PersonView.xaml.cs
+++ b/BeWo/View/Detail/PersonView.xaml.cs
@@ -39,6 +39,7 @@ namespace BeWo.View.Detail
comboBox_Title.ItemsSource = pPersonVM.Titles;
comboBox_Function.ItemsSource = pPersonVM.Functions;
ComboBox_RoleInOrganisation.ItemsSource = pPersonVM.RoleInOrganisations;
+ comboBox_Nationalitaet.ItemsSource = pPersonVM.Nationalitaeten;
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Person_AllowArchiving))
{
diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml b/BeWo/View/Detail/ServiceRecordView2.xaml
index dba07375f..52b177974 100644
--- a/BeWo/View/Detail/ServiceRecordView2.xaml
+++ b/BeWo/View/Detail/ServiceRecordView2.xaml
@@ -1057,17 +1057,11 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml.cs b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
index 085487982..29dcb1f36 100644
--- a/BeWo/View/Detail/ServiceRecordView2.xaml.cs
+++ b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
@@ -252,7 +252,7 @@ namespace BeWo.View.Detail
var Settings = BeWoApp.AppSettings;
- if (BeWoApp.AppSettings.ShowSignatures)
+ if (!BeWoApp.AppSettings.ShowSignatures)
{
UnterschriftenHeader.Visible = true;
}
diff --git a/BeWo/View/PasswortAenderungsView.xaml.cs b/BeWo/View/PasswortAenderungsView.xaml.cs
index d69be15b1..198dbb1bd 100644
--- a/BeWo/View/PasswortAenderungsView.xaml.cs
+++ b/BeWo/View/PasswortAenderungsView.xaml.cs
@@ -411,8 +411,7 @@ namespace BeWo.View
break;
}
-
-
+
}
}
}
diff --git a/BeWo/ViewModel/CustomerVM.cs b/BeWo/ViewModel/CustomerVM.cs
index 0eec8dd4b..8ea345e40 100644
--- a/BeWo/ViewModel/CustomerVM.cs
+++ b/BeWo/ViewModel/CustomerVM.cs
@@ -99,8 +99,9 @@ namespace BeWo.ViewModel
public static string PropertyName_Wohnheimbuchungen = "Wohnheimbuchungen";
public static string PropertyName_Pflegegrad = "Pflegegrad";
public static string PropertyName_CustomerImage = "CustomerImage";
-
- #endregion
+ public static string PropertyName_Nationalitaet = "Nationalitaet";
+ public static string PropertyName_AufenthaltsStatus = "AufenthaltsStatus";
+ #endregion
private readonly ObservableSortCollection _PossibleCustomerCareTypes;
private readonly ObservableSortCollection _PossibleDisabilities;
@@ -178,9 +179,15 @@ namespace BeWo.ViewModel
private string _CustomerAlias;
private Pflegegrad? _Pflegegrad;
private byte[] _CustomerImage;
-
- public CustomerVM(CustomerDC pDataContract, IEnumerable pValueList, List pPossibleASCs,
+ private ValueListEntryDC _Nationalitaet;
+ private ObservableSortCollection _Nationalitaeten;
+
+ private ValueListEntryDC _AufenthaltsStatus;
+ private ObservableSortCollection _AufenthaltsStatuse;
+
+
+ public CustomerVM(CustomerDC pDataContract, IEnumerable pValueList, List pPossibleASCs,
List pPossibleASVs, List pPossibleMedArten)
: base(pDataContract, pDataContract.CustomerOid == null)
{
@@ -188,6 +195,8 @@ namespace BeWo.ViewModel
var possibleCustomerCareTypes = pValueList.Where(vle => vle.Type == ValueListEntryType.CustomerCareType);
var possibleTerminationReasons = pValueList.Where(vle => vle.Type == ValueListEntryType.TerminationReasonType);
var possiblePlacementObjectives = pValueList.Where(vle => vle.Type == ValueListEntryType.PlacementObjectiveType);
+ var possibleNationalitaeten = pValueList.Where(vle => vle.Type == ValueListEntryType.Nationality);
+ var possibleAufenthaltsStatuse = pValueList.Where(vle => vle.Type == ValueListEntryType.Aufenthaltsstatus);
_PossibleDisabilities = pDataContract.Disabilities != null
? new ObservableSortCollection(possibleDisabilities.Except(pDataContract.Disabilities), Comparer.ValueListEntryDCComparer)
@@ -196,8 +205,10 @@ namespace BeWo.ViewModel
_PossibleCustomerCareTypes = new ObservableSortCollection(possibleCustomerCareTypes, Comparer.ValueListEntryDCComparer);
_TerminationReasons = new ObservableSortCollection(possibleTerminationReasons, Comparer.ValueListEntryDCComparer);
_PlacementObjectives = new ObservableSortCollection(possiblePlacementObjectives, Comparer.ValueListEntryDCComparer);
+ _Nationalitaeten = new ObservableSortCollection(possibleNationalitaeten,Comparer.ValueListEntryDCComparer);
+ _AufenthaltsStatuse = new ObservableSortCollection(possibleAufenthaltsStatuse, Comparer.ValueListEntryDCComparer);
- _MedArten = new BindingList(pPossibleMedArten);
+ _MedArten = new BindingList(pPossibleMedArten);
pPossibleASCs.Sort((x, y) => x.Position.CompareTo(y.Position));
_AssessmentSheetCategories = new BindingList(pPossibleASCs);
@@ -1272,7 +1283,66 @@ namespace BeWo.ViewModel
}
}
-
+ public ValueListEntryDC Nationalitaet
+ {
+ get { return this._Nationalitaet; }
+
+ set
+ {
+ if (this.AreDifferent(this._Nationalitaet, value))
+ {
+ this._Nationalitaet = value;
+
+ this.StoreDirtyInformation(this.AreDifferent(DataContract.Nationalitaet, value), PropertyName_Nationalitaet);
+
+ this.FirePropertyChanged(PropertyName_Nationalitaet);
+ }
+ }
+ }
+
+ public ValueListEntryDC AufenthaltsStatus
+ {
+ get { return this._AufenthaltsStatus; }
+
+ set
+ {
+ if (this.AreDifferent(this._AufenthaltsStatus, value))
+ {
+ this._AufenthaltsStatus = value;
+
+ this.StoreDirtyInformation(this.AreDifferent(DataContract.AufenthaltsStatus, value), PropertyName_AufenthaltsStatus);
+
+ this.FirePropertyChanged(PropertyName_AufenthaltsStatus);
+ }
+ }
+ }
+
+
+ public ObservableSortCollection Nationalitaeten
+ {
+ get
+ {
+ if (_Nationalitaeten == null)
+ {
+ this._Nationalitaeten = new ObservableSortCollection();
+ }
+
+ return this._Nationalitaeten;
+ }
+ }
+
+ public ObservableSortCollection AufenthaltsStatuse
+ {
+ get
+ {
+ if (_AufenthaltsStatuse == null)
+ {
+ this._AufenthaltsStatuse = new ObservableSortCollection();
+ }
+
+ return this._AufenthaltsStatuse;
+ }
+ }
public ObservableCollection BehinderungsartenListe
@@ -1424,8 +1494,11 @@ namespace BeWo.ViewModel
_Vormund = pDataContract.Vormund;
_CustomerAlias = pDataContract.CustomerAlias;
_Pflegegrad = pDataContract.Pflegegrad;
+ _Nationalitaet = pDataContract.Nationalitaet;
+ _AufenthaltsStatus = pDataContract.AufenthaltsStatus;
- if (pDataContract.Images != null && pDataContract.Images.Count > 0)
+
+ if (pDataContract.Images != null && pDataContract.Images.Count > 0)
{
_CustomerImage = pDataContract.Images[0];
}
@@ -1566,7 +1639,11 @@ namespace BeWo.ViewModel
pDataContract.AusweisUnbefristetGueltig = _AusweisUnbefristetGueltig;
pDataContract.BeiblattGueltigBis = _BeiblattGueltigBis;
pDataContract.GradDerBehinderung = _GradDerBehinderung;
- if (_MerkzeichenListe != null)
+ pDataContract.Nationalitaet = _Nationalitaet;
+ pDataContract.AufenthaltsStatus = _AufenthaltsStatus;
+
+
+ if (_MerkzeichenListe != null)
{
pDataContract.MerkzeichenListe = _MerkzeichenListe.ToList();
}
diff --git a/BeWo/ViewModel/PersonVM.cs b/BeWo/ViewModel/PersonVM.cs
index 195f64396..17d34df7e 100644
--- a/BeWo/ViewModel/PersonVM.cs
+++ b/BeWo/ViewModel/PersonVM.cs
@@ -68,6 +68,8 @@ namespace BeWo.ViewModel
public static string PropertyName_IsMigrant = "IsMigrant";
+ public static string PropertyName_Nationalitaet = "Nationalitaet";
+
private DateTime? _DateOfBirth;
private string _FirstName;
@@ -124,7 +126,11 @@ namespace BeWo.ViewModel
private bool _IsMigrant;
- public PersonVM(PersonDC pDataContract, List pPossibleTitles, List pPossibleFunctions, List pPossibleRoleInOrganisation)
+ private ValueListEntryDC _Nationalitaet;
+
+ private ObservableSortCollection _Nationalitaeten;
+
+ public PersonVM(PersonDC pDataContract, List pPossibleTitles, List pPossibleFunctions, List pPossibleRoleInOrganisation, List pPossibleNationalitaeten)
: base(pDataContract, pDataContract.PersonOid == null)
{
this._Titles = new ObservableSortCollection(pPossibleTitles, Comparer.ValueListEntryDCComparer);
@@ -132,6 +138,8 @@ namespace BeWo.ViewModel
this._Functions = new ObservableSortCollection(pPossibleFunctions, Comparer.ValueListEntryDCComparer);
_RoleInOrganisations = new ObservableSortCollection(pPossibleRoleInOrganisation, Comparer.ValueListEntryDCComparer);
+
+ _Nationalitaeten = new ObservableSortCollection(pPossibleNationalitaeten, Comparer.ValueListEntryDCComparer);
}
public DateTime? DateOfBirth
@@ -609,6 +617,36 @@ namespace BeWo.ViewModel
}
}
+ public ValueListEntryDC Nationalitaet
+ {
+ get { return this._Nationalitaet; }
+
+ set
+ {
+ if (this.AreDifferent(this._Nationalitaet, value))
+ {
+ this._Nationalitaet = value;
+
+ this.StoreDirtyInformation(this.AreDifferent(DataContract.Nationalitaet, value), PropertyName_Nationalitaet);
+
+ this.FirePropertyChanged(PropertyName_Nationalitaet);
+ }
+ }
+ }
+
+ public ObservableSortCollection Nationalitaeten
+ {
+ get
+ {
+ if (_Nationalitaeten == null)
+ {
+ this._Nationalitaeten = new ObservableSortCollection();
+ }
+
+ return this._Nationalitaeten;
+ }
+ }
+
protected override void InitByDataContract(PersonDC pDataContract)
{
this._VarFields = new VarFieldListVM(pDataContract.VarFields);
@@ -633,6 +671,7 @@ namespace BeWo.ViewModel
this._Title = pDataContract.Title;
this._Function = pDataContract.Function;
_IsMigrant = pDataContract.IsMigrant;
+ _Nationalitaet = pDataContract.Nationalitaet;
foreach (ContactDC iContactDC in pDataContract.ContactInformations)
@@ -723,6 +762,7 @@ namespace BeWo.ViewModel
pDataContract.Function = this._Function;
pDataContract.Type = PersonType.Others;
pDataContract.IsMigrant = _IsMigrant;
+ pDataContract.Nationalitaet = _Nationalitaet;
return pDataContract;
}
diff --git a/BeWo/ViewModel/ServiceRecordVM.cs b/BeWo/ViewModel/ServiceRecordVM.cs
index b77e63f89..0f7f11b15 100644
--- a/BeWo/ViewModel/ServiceRecordVM.cs
+++ b/BeWo/ViewModel/ServiceRecordVM.cs
@@ -434,12 +434,17 @@ namespace BeWo.ViewModel
var date = _Date;
var time = _StartTime;
- if (date != null && time != null)
- {
- date = date.Value.AddHours(time.Value.Hour);
- date = date.Value.AddMinutes(time.Value.Minute);
- date = date.Value.AddSeconds(time.Value.Second);
- }
+
+ // beim addend er zeit / dadurch das dateTime und Startime gleich sind werden diese zusammen gerechnet und das löst den fehler aus.
+ //also inprinzip nur date zurück geben und kuken was danach passiert
+
+ // dadurch das eine neuentwicklung stattgefunden hat, scheint dieser bereich nicht mehr nötig zu sein
+ //if (date != null && time != null)
+ //{
+ // date = date.Value.AddHours(time.Value.Hour);
+ // date = date.Value.AddMinutes(time.Value.Minute);
+ // date = date.Value.AddSeconds(time.Value.Second);
+ //}
return date;
}
@@ -983,7 +988,7 @@ namespace BeWo.ViewModel
return false;
}
}
- set { _isUnterschrift = value; }
+ //set { _isUnterschrift = value; }
}
public int? GroupPersonCount
@@ -2126,7 +2131,11 @@ namespace BeWo.ViewModel
AreDifferent(DataContract.End, (_Date.Value + _StartTime.Value.TimeOfDay).AddMinutes(duration)) ||
AreDifferent(DataContract.Start,_Date.Value + _StartTime.Value.TimeOfDay), "TIME");
- EndTime = StartTime.Value.AddMinutes(duration);
+
+ if (StartTime != null)
+ {
+ EndTime = StartTime.Value.AddMinutes(duration);
+ }
FirePropertyChanged(PropertyName_EndTime);
}
diff --git a/BeWo/ViewModel/VMFactory.cs b/BeWo/ViewModel/VMFactory.cs
index 7578f6997..a4d582b96 100644
--- a/BeWo/ViewModel/VMFactory.cs
+++ b/BeWo/ViewModel/VMFactory.cs
@@ -380,7 +380,9 @@ namespace BeWo.ViewModel
r2 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.FunctionType,
r4 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
- ValueListEntryType.RoleInOrganisationType,
+ ValueListEntryType.RoleInOrganisationType,
+ r5 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
+ ValueListEntryType.Nationality,
r3 => pCallBack(
new PersonVM(
new PersonDC
@@ -389,7 +391,8 @@ namespace BeWo.ViewModel
},
r1,
r4,
- r3))))));
+ r5,
+ r3)))))));
}
public static void CreatePersonVMAsync(long pOid, Action pCallBack)
@@ -400,7 +403,7 @@ namespace BeWo.ViewModel
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.TitleType,
r1 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.FunctionType,
- r3 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.RoleInOrganisationType, r2 => pCallBack(new PersonVM(cb, r1, r3, r2))))));
+ r3 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.RoleInOrganisationType, r4 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.Nationality, r2 => pCallBack(new PersonVM(cb, r1, r3, r4,r2)))))));
}
public static void CreateResourceListVMAsync(Action pCallBack)
@@ -666,7 +669,9 @@ namespace BeWo.ViewModel
ValueListEntryType.DisabilityType,
ValueListEntryType.CustomerCareType,
ValueListEntryType.PlacementObjectiveType,
- ValueListEntryType.TerminationReasonType
+ ValueListEntryType.TerminationReasonType,
+ ValueListEntryType.Nationality,
+ ValueListEntryType.Aufenthaltsstatus
};
ServiceFacade.DoValueListServiceAsync(
diff --git a/Data/Entities/Customer.cs b/Data/Entities/Customer.cs
index 3c385e20e..fcd3b2da1 100644
--- a/Data/Entities/Customer.cs
+++ b/Data/Entities/Customer.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using BS.Shared;
using BS.Shared.Core;
+using BS.Shared.DataContracts;
namespace BeWo.Data.Entities
{
@@ -48,10 +49,12 @@ namespace BeWo.Data.Entities
public static string PropertyName_BehinderungsartenListe = "BehinderungsartenListe";
public static string PropertyName_CustomerAlias = "CustomerAlias";
public static string PropertyName_Pflegegrad = "Pflegegrad";
- public static string Propertyname_IsMigrant = "IsMigrant";
+ public static string PropertyName_IsMigrant = "IsMigrant";
+ public static string PropertyName_Nationalitaet = "Nationalitaet";
+ public static string PropertyName_AufenthaltsStatus = "AufenthaltsStatus";
- private Auszahlungsintervall _Auszahlungsintervall;
+ private Auszahlungsintervall _Auszahlungsintervall;
private IList _AbsenceTimes;
private Person _Ansprechpartner;
private IList _AssessmentSheetCategoryList;
@@ -94,10 +97,13 @@ namespace BeWo.Data.Entities
private string _CustomerAlias;
private Pflegegrad? _Pflegegrad;
private bool _IsMigrant;
-
+ private ValueListEntry _Nationalitaet;
+ private ValueListEntry _AufenthaltsStatus;
- public Customer()
+
+
+ public Customer()
{
_Tid = TableID.Customer;
}
@@ -660,6 +666,41 @@ namespace BeWo.Data.Entities
}
}
}
-
- }
+
+ public virtual ValueListEntry Nationalitaet
+ {
+ get
+ {
+ return this._Nationalitaet;
+ }
+
+ set
+ {
+ if (this.AreDifferent(this._Nationalitaet, value))
+ {
+ this._Nationalitaet = value;
+ }
+ }
+ }
+
+
+ public virtual ValueListEntry AufenthaltsStatus
+ {
+ get
+ {
+ return this._AufenthaltsStatus;
+ }
+
+ set
+ {
+ if (this.AreDifferent(this._AufenthaltsStatus, value))
+ {
+ this._AufenthaltsStatus = value;
+ }
+ }
+ }
+
+
+
+ }
}
\ No newline at end of file
diff --git a/Data/Entities/Person.cs b/Data/Entities/Person.cs
index e1c274cda..19eb1b063 100644
--- a/Data/Entities/Person.cs
+++ b/Data/Entities/Person.cs
@@ -43,6 +43,9 @@ namespace BeWo.Data.Entities
public static string PropertyName_IsMigrant = "IsMigrant";
+ public static string PropertyName_Nationalitaet = "Nationalitaet";
+
+
private string _Abbreviation;
private Address _Address;
@@ -77,6 +80,8 @@ namespace BeWo.Data.Entities
private bool _IsMigrant;
+ private ValueListEntry _Nationalitaet;
+
public Person()
{
this._Tid = TableID.Person;
@@ -368,6 +373,22 @@ namespace BeWo.Data.Entities
}
}
+ public virtual ValueListEntry Nationalitaet
+ {
+ get
+ {
+ return this._Nationalitaet;
+ }
+
+ set
+ {
+ if (this.AreDifferent(this._Nationalitaet, value))
+ {
+ this._Nationalitaet = value;
+ }
+ }
+ }
+
public virtual IList Images { get; set; }
}
}
\ No newline at end of file
diff --git a/Data/Mappings/Customer.hbm.xml b/Data/Mappings/Customer.hbm.xml
index 182faf699..a23e1e00c 100644
--- a/Data/Mappings/Customer.hbm.xml
+++ b/Data/Mappings/Customer.hbm.xml
@@ -31,6 +31,8 @@
+
+
diff --git a/Data/Mappings/Person.hbm.xml b/Data/Mappings/Person.hbm.xml
index 4e1837ef0..4938e9d5a 100644
--- a/Data/Mappings/Person.hbm.xml
+++ b/Data/Mappings/Person.hbm.xml
@@ -23,6 +23,7 @@
+
diff --git a/Model/Changes_13_02_2017.txt b/Model/Changes_13_02_2017.txt
new file mode 100644
index 000000000..841e7a4a3
--- /dev/null
+++ b/Model/Changes_13_02_2017.txt
@@ -0,0 +1,13 @@
+ALTER TABLE `1234567890`.`customer`
+ADD COLUMN `NationalitaetValueListEntryOid`
+BIGINT(19) NULL DEFAULT NULL COMMENT '' AFTER `IsMigrant`;
+
+
+ALTER TABLE `1234567890`.`person`
+ADD COLUMN `NationalitaetValueListEntryOid`
+BIGINT(19) NULL DEFAULT NULL COMMENT '' AFTER `IsMigrant`;
+
+
+ALTER TABLE `1234567890`.`customer`
+ADD COLUMN `AufenthaltsStatusValueListEntryOid`
+BIGINT(19) NULL DEFAULT NULL COMMENT '' AFTER `NationalitaetValueListEntryOid`;
diff --git a/Service/DCEntityMapper/CustomerDC_Customer.cs b/Service/DCEntityMapper/CustomerDC_Customer.cs
index a7aa43ba0..8f0b1ec17 100644
--- a/Service/DCEntityMapper/CustomerDC_Customer.cs
+++ b/Service/DCEntityMapper/CustomerDC_Customer.cs
@@ -50,18 +50,29 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.Medication = pEntity.Medication;
pDataContract.Environment = pEntity.Environment;
pDataContract.IsAdvisedOrAttended = pEntity.IsAdvisedOrAttended;
+
+ if (pEntity.Nationalitaet != null)
+ {
+ pDataContract.Nationalitaet = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(pEntity.Nationalitaet);
+ }
- //if(pEntity.FamilyData != null)
- //{
- // pDataContract.Kindesmutter = pEntity.FamilyData.Kindesmutter;
- // pDataContract.Kindesvater = pEntity.FamilyData.Kindesvater;
- // pDataContract.Geschwister = pEntity.FamilyData.Geschwister;
- // pDataContract.Vormund = pEntity.FamilyData.Vormund;
- // pDataContract.FamilyDataOid = pEntity.FamilyData.Oid;
- // pDataContract.FamilyDataVersion = pEntity.FamilyData.Version;
- //}
+ if (pEntity.AufenthaltsStatus != null)
+ {
+ pDataContract.AufenthaltsStatus = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(pEntity.AufenthaltsStatus);
+ }
+
- pDataContract.AusstVersAmt = pEntity.AusstVersAmt;
+ //if(pEntity.FamilyData != null)
+ //{
+ // pDataContract.Kindesmutter = pEntity.FamilyData.Kindesmutter;
+ // pDataContract.Kindesvater = pEntity.FamilyData.Kindesvater;
+ // pDataContract.Geschwister = pEntity.FamilyData.Geschwister;
+ // pDataContract.Vormund = pEntity.FamilyData.Vormund;
+ // pDataContract.FamilyDataOid = pEntity.FamilyData.Oid;
+ // pDataContract.FamilyDataVersion = pEntity.FamilyData.Version;
+ //}
+
+ pDataContract.AusstVersAmt = pEntity.AusstVersAmt;
pDataContract.AusweisGueltigVon = pEntity.AusweisGueltigVon;
pDataContract.AusweisGueltigBis = pEntity.AusweisGueltigBis;
pDataContract.AusweisUnbefristetGueltig = pEntity.AusweisUnbefristetGueltig;
@@ -152,26 +163,47 @@ namespace BeWo.Service.DCEntityMapper
pEntity.AssistanceBegin = pDataContract.AssistanceBegin;
pEntity.TerminationDate = pDataContract.TerminationDate;
pEntity.CustomerAlias = pDataContract.CustomerAlias;
-
- //if(ContainsFamilyDataData(pDataContract))
- //{
- // ConcurrencyCheck(pDataContract.FamilyDataVersion, pEntity.FamilyData);
- // pEntity.FamilyData.Oid = pDataContract.FamilyDataOid;
- // pEntity.FamilyData.Kindesmutter = pDataContract.Kindesmutter;
- // pEntity.FamilyData.Kindesvater = pDataContract.Kindesvater;
- // pEntity.FamilyData.Geschwister = pDataContract.Geschwister;
- // pEntity.FamilyData.Vormund = pDataContract.Vormund;
- //}
- //else if (pEntity.FamilyData != null)
- //{
- // // all-delete-orphan wird von NHibernate (noch) nicht unterstützt für many-to-one
- // FamilyData lFamilyData = pEntity.FamilyData;
- // pEntity.FamilyData = null;
- // DAOFactory.GenericDAO.Delete(lFamilyData);
- //}
- pEntity.AusstVersAmt = pDataContract.AusstVersAmt;
+
+ if (pDataContract.Nationalitaet == null)
+ {
+ pEntity.Nationalitaet = null;
+ }
+ else if (pEntity.Nationalitaet == null || pEntity.Nationalitaet.Oid != pDataContract.Nationalitaet.ValueListEntryOid)
+ {
+ pEntity.Nationalitaet = DAOFactory.GenericDAO.LoadByID(pDataContract.Nationalitaet.ValueListEntryOid.Value);
+ }
+
+ if (pDataContract.AufenthaltsStatus == null)
+ {
+ pEntity.AufenthaltsStatus = null;
+ }
+ else if (pEntity.AufenthaltsStatus == null || pEntity.AufenthaltsStatus.Oid != pDataContract.AufenthaltsStatus.ValueListEntryOid)
+ {
+ pEntity.AufenthaltsStatus = DAOFactory.GenericDAO.LoadByID(pDataContract.AufenthaltsStatus.ValueListEntryOid.Value);
+ }
+
+
+ //if(ContainsFamilyDataData(pDataContract))
+ //{
+ // ConcurrencyCheck(pDataContract.FamilyDataVersion, pEntity.FamilyData);
+
+ // pEntity.FamilyData.Oid = pDataContract.FamilyDataOid;
+ // pEntity.FamilyData.Kindesmutter = pDataContract.Kindesmutter;
+ // pEntity.FamilyData.Kindesvater = pDataContract.Kindesvater;
+ // pEntity.FamilyData.Geschwister = pDataContract.Geschwister;
+ // pEntity.FamilyData.Vormund = pDataContract.Vormund;
+ //}
+ //else if (pEntity.FamilyData != null)
+ //{
+ // // all-delete-orphan wird von NHibernate (noch) nicht unterstützt für many-to-one
+ // FamilyData lFamilyData = pEntity.FamilyData;
+ // pEntity.FamilyData = null;
+ // DAOFactory.GenericDAO.Delete(lFamilyData);
+ //}
+
+ pEntity.AusstVersAmt = pDataContract.AusstVersAmt;
pEntity.AusweisGueltigVon = pDataContract.AusweisGueltigVon;
pEntity.AusweisGueltigBis = pDataContract.AusweisGueltigBis;
pEntity.AusweisUnbefristetGueltig = pDataContract.AusweisUnbefristetGueltig;
diff --git a/Service/DCEntityMapper/PersonDC_Person.cs b/Service/DCEntityMapper/PersonDC_Person.cs
index 3b2f33b82..9434d000f 100644
--- a/Service/DCEntityMapper/PersonDC_Person.cs
+++ b/Service/DCEntityMapper/PersonDC_Person.cs
@@ -37,7 +37,12 @@ namespace BeWo.Service.DCEntityMapper
{
pDataContract.Function = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(pEntity.Function);
}
-
+
+ if (pEntity.Nationalitaet != null)
+ {
+ pDataContract.Nationalitaet = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(pEntity.Nationalitaet);
+ }
+
if (pEntity.Address != null)
{
pDataContract.AddressOid = pEntity.Address.Oid;
@@ -119,6 +124,15 @@ namespace BeWo.Service.DCEntityMapper
pEntity.Function = DAOFactory.GenericDAO.LoadByID(pDataContract.Function.ValueListEntryOid.Value);
}
+ if (pDataContract.Nationalitaet == null)
+ {
+ pEntity.Nationalitaet = null;
+ }
+ else if (pEntity.Nationalitaet == null || pEntity.Nationalitaet.Oid != pDataContract.Nationalitaet.ValueListEntryOid)
+ {
+ pEntity.Nationalitaet = DAOFactory.GenericDAO.LoadByID(pDataContract.Nationalitaet.ValueListEntryOid.Value);
+ }
+
if (pDataContract.ContainsAddressData())
{
if (pEntity.Address == null)
diff --git a/Service/ServiceImplementations/OperationsServiceImp.cs b/Service/ServiceImplementations/OperationsServiceImp.cs
index 441f69d5b..48272df02 100644
--- a/Service/ServiceImplementations/OperationsServiceImp.cs
+++ b/Service/ServiceImplementations/OperationsServiceImp.cs
@@ -2392,6 +2392,7 @@ namespace BeWo.Service.ServiceImplementations
dc.InsUser = sr.InsUser;
dc.DurationInStunden = sr.DurationInStunden;
+ dc.SignatureOid = sr.SignatureOid;
dc.GroupEmployeeCount = sr.GroupEmployeeCount;
dc.GroupPersonCount = sr.GroupPersonCount;
@@ -2452,6 +2453,7 @@ namespace BeWo.Service.ServiceImplementations
dc.InsertedOn = sr.InsTs;
dc.InsUser = sr.InsUser;
dc.DurationInStunden = sr.DurationInStunden;
+ dc.SignatureOid = sr.SignatureOid;
//Customer -----------------
dc.Customer = new CompactCustomerDC();
diff --git a/Shared/DataContracts/CustomerDC.cs b/Shared/DataContracts/CustomerDC.cs
index d590ce06f..158b0c65a 100644
--- a/Shared/DataContracts/CustomerDC.cs
+++ b/Shared/DataContracts/CustomerDC.cs
@@ -164,5 +164,13 @@ namespace BS.Shared.DataContracts
[DataMember]
public bool IsMigrant { get; set; }
+
+ [DataMember]
+ public ValueListEntryDC Nationalitaet { get; set; }
+
+ [DataMember]
+ public ValueListEntryDC AufenthaltsStatus { get; set; }
+
+
}
}
\ No newline at end of file
diff --git a/Shared/DataContracts/PersonDC.cs b/Shared/DataContracts/PersonDC.cs
index 7e61355c2..8d77ab6f5 100644
--- a/Shared/DataContracts/PersonDC.cs
+++ b/Shared/DataContracts/PersonDC.cs
@@ -141,6 +141,9 @@ namespace BS.Shared.DataContracts
[DataMember]
public bool IsMigrant { get; set; }
+ [DataMember]
+ public ValueListEntryDC Nationalitaet { get; set; }
+
public bool ContainsAddressData()
{
return !Utils.AreAllNullOrEmpty(this.AddressLine1, this.Street, this.PostalCode, this.Town);