public override void CorrespondentChanged(Sungero.Docflow.Shared.IncomingDocumentBaseCorrespondentChangedEventArgs e) { base.CorrespondentChanged(e); FillName(); if (Sungero.Parties.People.Is(e.NewValue)) { _obj.State.Properties.SignedBy.IsEnabled = false; _obj.SignedBy = null; _obj.State.Properties.Contact.IsEnabled = false; _obj.Contact = null; } else { _obj.State.Properties.SignedBy.IsEnabled = true; _obj.State.Properties.Contact.IsEnabled = true; if (_obj.SignedBy != null && !Equals(e.NewValue, _obj.SignedBy.Company)) { _obj.SignedBy = null; } if (_obj.Contact != null && !Equals(e.NewValue, _obj.Contact.Company)) { _obj.Contact = null; } } }
public virtual void CorrespondentChanged(Sungero.Docflow.Shared.IncomingDocumentBaseCorrespondentChangedEventArgs e) { if (e.NewValue != null && !Equals(e.NewValue, e.OldValue) && _obj.InResponseTo != null && !_obj.InResponseTo.Addressees.Any(a => Equals(a.Correspondent, _obj.Correspondent))) { _obj.InResponseTo = null; } }