StagingSetoutStore.cs 547 B

123456789101112131415161718192021
  1. using Comal.Classes;
  2. using Comal.Stores;
  3. using NPOI.HSSF.Record;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. using InABox.Core;
  7. using System;
  8. namespace PRSStores
  9. {
  10. public class StagingSetoutStore : BaseStore<StagingSetout>
  11. {
  12. protected override void BeforeSave(StagingSetout entity)
  13. {
  14. if ((entity.Setout.ID != Guid.Empty || entity.Task.ID != Guid.Empty) && entity.Archived == DateTime.MinValue)
  15. entity.Archived = DateTime.Now;
  16. base.BeforeSave(entity);
  17. }
  18. }
  19. }