VerificationTaskHandlers.cs 615 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Core;
using Sungero.CoreEntities;
using DirRX.CaseArchiving.VerificationTask;

namespace DirRX.CaseArchiving
{
  partial class VerificationTaskServerHandlers
  {
    public override void BeforeSave(Sungero.Domain.BeforeSaveEventArgs e)
    {
      // Выдать права на документы, для всех, кому выданы права на задачу.
      if (_obj.State.IsChanged)
        Sungero.Docflow.PublicFunctions.Module.GrantManualReadRightForAttachments(_obj, _obj.AllAttachments.ToList());
    }
  }
}