I am trying to add an item to my list inside viewcontroller but I get this error:
BmsSupportPortalX.Module.BusinessObjects.Database.LG_124_01_QPRODUCT.altMalzemeler.get returned null.
Here is the method I am trying to use to add items to my list inside businessobject:
LG_124_01_QPRODUCT task = (LG_124_01_QPRODUCT)View.CurrentObject;
foreach (altMamüller note in e.PopupWindowViewSelectedObjects)
{
task.altMalzemeler.Add(note);
View.Refresh();
}}
I added constructor to class but it doesn’t work this way too.
public partial class LG_124_01_QPRODUCT : XPLiteObject
{
List<altMamüller> faltMalzemeler;
[NonPersistent]
public List<altMamüller> altMalzemeler
{
get { return faltMalzemeler; }
set { SetPropertyValue<List<altMamüller>>(nameof(altMalzemeler), ref faltMalzemeler, value); }
}
public LG_124_01_QPRODUCT()
{
altMalzemeler = new List<altMamüller>();
}
}
How can I solve this problem?