ArchiveEventLogHandlers.cs 721 Bytes
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Sungero.Core;
using Sungero.CoreEntities;
using DirRX.Storage.ArchiveEventLog;

namespace DirRX.Storage
{
  partial class ArchiveEventLogServerHandlers
  {

    public override void BeforeDelete(Sungero.Domain.BeforeDeleteEventArgs e)
    {
      if (_obj.DocumentId != null)
      {
        e.AddError(ArchiveEventLogs.Resources.ErrorCannotDelete);
      }
      base.BeforeDelete(e);
    }

    public override void Created(Sungero.Domain.CreatedEventArgs e)
    {
      _obj.Created = Calendar.Now;
    }

    public override void Saving(Sungero.Domain.SavingEventArgs e)
    {
      _obj.Updated = Calendar.Now;
    }

  }
}