Ejemplo n.º 1
0
 public override void RecipientLinksDeleted(Sungero.Domain.Shared.CollectionPropertyDeletedEventArgs e)
 {
     if (Equals(_deleted.Member, _obj.ResponsibleEmployee))
     {
         _obj.ResponsibleEmployee = null;
     }
 }
 public virtual void AddresseesDeleted(Sungero.Domain.Shared.CollectionPropertyDeletedEventArgs e)
 {
     if (_obj.IsManyAddressees == true && _obj.InResponseTo != null && !_obj.Addressees.Any(x => Equals(x.Correspondent, _obj.InResponseTo.Correspondent)))
     {
         _obj.InResponseTo = null;
     }
 }
Ejemplo n.º 3
0
 public virtual void MilestonesDeleted(Sungero.Domain.Shared.CollectionPropertyDeletedEventArgs e)
 {
     if (_deleted.IsCompleted.Value)
     {
         throw AppliedCodeException.Create(ContractualDocuments.Resources.CannotDeleteCompleteContractMilestone);
     }
 }
Ejemplo n.º 4
0
        public virtual void TrackingDeleted(Sungero.Domain.Shared.CollectionPropertyDeletedEventArgs e)
        {
            if (_deleted.State.Properties.ReturnDate.OriginalValue.HasValue)
            {
                throw AppliedCodeException.Create(Docflow.Resources.CantDeleteReturnedTracking);
            }

            if (_deleted.Action == Docflow.OfficialDocumentTracking.Action.Endorsement)
            {
                throw AppliedCodeException.Create(Docflow.Resources.CantDeleteAutomaticallyTracking);
            }
        }
Ejemplo n.º 5
0
 public override void VersionsDeleted(Sungero.Domain.Shared.CollectionPropertyDeletedEventArgs e)
 {
     // Если удалили последнюю версию.
     if (_obj.LastVersion != null && _deleted.Number > _obj.LastVersion.Number)
     {
         var info = Exchange.PublicFunctions.ExchangeDocumentInfo.Remote.GetExDocumentInfoFromVersion(_obj, _obj.LastVersion.Id);
         if (info != null)
         {
             _obj.ExchangeState = info.ExchangeState;
         }
     }
 }