using Comal.Classes; using Comal.Stores; using NPOI.HSSF.Record; using System; using System.Collections.Generic; using System.Text; using InABox.Core; namespace PRSStores { public class StagingSetoutStore : BaseStore { protected override void BeforeSave(StagingSetout entity) { if ((entity.Setout.ID != Guid.Empty || entity.Task.ID != Guid.Empty) && entity.Archived == DateTime.MinValue) entity.Archived = DateTime.Now; if (!string.IsNullOrWhiteSpace(entity.SavePath) && entity.Locked == DateTime.MinValue) entity.Locked = DateTime.Now; else if (string.IsNullOrWhiteSpace(entity.SavePath) && entity.Locked != DateTime.MinValue) entity.Locked = DateTime.MinValue; base.BeforeSave(entity); } } }