diff --git a/BeWo/View/Controls/WohneinheitEditPopup.xaml b/BeWo/View/Controls/WohneinheitEditPopup.xaml
index dd115fff5..618258f8c 100644
--- a/BeWo/View/Controls/WohneinheitEditPopup.xaml
+++ b/BeWo/View/Controls/WohneinheitEditPopup.xaml
@@ -32,7 +32,7 @@
+ Text="{Binding Path=WohneinheitListVM.CurrentVM.Wohnname}"/>
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/ViewModel/ListViewModel/AbstractDCListMapperVM.cs b/BeWo/ViewModel/ListViewModel/AbstractDCListMapperVM.cs
index 9e6ab8e9e..e346aff2a 100644
--- a/BeWo/ViewModel/ListViewModel/AbstractDCListMapperVM.cs
+++ b/BeWo/ViewModel/ListViewModel/AbstractDCListMapperVM.cs
@@ -139,7 +139,7 @@ namespace BeWo.ViewModel.ListViewModel
#endregion
- public VMType AddNewVMToList()
+ public virtual VMType AddNewVMToList()
{
this.VMList.Add(this.NewVM);
@@ -147,7 +147,7 @@ namespace BeWo.ViewModel.ListViewModel
VMType lVM = this.NewVM;
this.NewVM = null;
- // FirePropertyChanged("VMList");
+ //FirePropertyChanged("VMList");
return lVM;
}
diff --git a/BeWo/ViewModel/ListViewModel/WohneinheitListVM.cs b/BeWo/ViewModel/ListViewModel/WohneinheitListVM.cs
index 5c583d81e..97406b206 100644
--- a/BeWo/ViewModel/ListViewModel/WohneinheitListVM.cs
+++ b/BeWo/ViewModel/ListViewModel/WohneinheitListVM.cs
@@ -15,6 +15,20 @@ namespace BeWo.ViewModel.ListViewModel
public WohneinheitVM CurrentVM => EditVM ?? NewVM;
- public List Wohnungsnamen => VMList?.Select(x => x.Wohnname)?.Distinct().ToList() ?? new List();
- }
+ public List Wohnungsnamen => VMList?
+ .Where(x => !string.IsNullOrEmpty(x.Zimmername))
+ .Select(x => x.Wohnname)?
+ .Distinct()
+ .ToList() ?? new List();
+
+ public override WohneinheitVM AddNewVMToList()
+ {
+ var vm = base.AddNewVMToList();
+
+ FirePropertyChanged(nameof(CurrentVM));
+ FirePropertyChanged(nameof(WohneinheitVM));
+
+ return vm;
+ }
+ }
}
\ No newline at end of file
diff --git a/BeWo/ViewModel/WohneinheitVM.cs b/BeWo/ViewModel/WohneinheitVM.cs
index 598159e72..eaf185569 100644
--- a/BeWo/ViewModel/WohneinheitVM.cs
+++ b/BeWo/ViewModel/WohneinheitVM.cs
@@ -50,6 +50,8 @@ namespace BeWo.ViewModel
}
}
+ public long? Oid => _Oid;
+
public string Wohnname
{
get { return _Wohnname; }
@@ -176,9 +178,11 @@ namespace BeWo.ViewModel
_QM = value;
StoreDirtyInformation(AreDifferent(DataContract.QM, value), nameof(QM));
FirePropertyChanged(nameof(QM));
+ FirePropertyChanged(nameof(FlacheString));
}
}
}
+ public string FlacheString => QM.ToString("########0.00 qm");
public int Baujahr
{
get { return _Baujahr; }
diff --git a/Model/Changes_2024_07_15 Wohneinheit.txt b/Model/Changes_2024_07_15 Wohneinheit.txt
index b2be05cd9..c58eba977 100644
--- a/Model/Changes_2024_07_15 Wohneinheit.txt
+++ b/Model/Changes_2024_07_15 Wohneinheit.txt
@@ -23,7 +23,6 @@ CREATE TABLE `wohneinheit` (
`Zusatznotiz` varchar(1024) DEFAULT NULL,
`Stock` varchar(256) DEFAULT NULL,
PRIMARY KEY (`Oid`),
- CONSTRAINT `FK_WOHNEINHEIT_WOHNHEIM` FOREIGN KEY (`WohnheimOid`) REFERENCES `Wohnheim` (`Oid`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
CREATE TABLE `wohneinheitbelegung` (