| 1234567891011121314151617181920212223242526 | using Comal.Classes;using InABox.Core;using System;using System.Collections.Generic;using System.Text;namespace Comal.Stores;public class SetoutGroupStore : BaseStore<SetoutGroup>{    protected override void AfterSave(SetoutGroup entity)    {        if(entity.OptimizationDocument.HasOriginalValue(x => x.ID))        {            var setoutStore = FindSubStore<Setout>();            var setouts = setoutStore.Query(                new Filter<Setout>(x => x.Group.ID).IsEqualTo(entity.ID),                new Columns<Setout>(x => x.ID).Add(x => x.Group.ID));            foreach(var setout in setouts.ToObjects<Setout>())            {                SetoutStore.UpdateOptimisationDocument(FindSubStore<SetoutDocument>, setout, entity.OptimizationDocument.ID);            }        }    }}
 |