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; } }
public virtual void MilestonesDeleted(Sungero.Domain.Shared.CollectionPropertyDeletedEventArgs e) { if (_deleted.IsCompleted.Value) { throw AppliedCodeException.Create(ContractualDocuments.Resources.CannotDeleteCompleteContractMilestone); } }
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); } }
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; } } }