public override void CounterpartyChanged(Sungero.Docflow.Shared.ContractualDocumentBaseCounterpartyChangedEventArgs e) { base.CounterpartyChanged(e); // Очистить договор при изменении контрагента. if (_obj.LeadingDocument == null || Equals(e.NewValue, _obj.LeadingDocument.Counterparty)) { return; } if (!Equals(e.NewValue, e.OldValue)) { _obj.LeadingDocument = null; } }
public override void CounterpartyChanged(Sungero.Docflow.Shared.ContractualDocumentBaseCounterpartyChangedEventArgs e) { base.CounterpartyChanged(e); // При изменении организации почистить подписывающего и контакта. if (e.NewValue != null && !Equals(e.NewValue, e.OldValue)) { if (_obj.CounterpartySignatory != null && !Equals(_obj.CounterpartySignatory.Company, e.NewValue)) { _obj.CounterpartySignatory = null; } if (_obj.Contact != null && !Equals(_obj.Contact.Company, e.NewValue)) { _obj.Contact = null; } } var isCompany = Sungero.Parties.CompanyBases.Is(e.NewValue) || e.NewValue == null; _obj.State.Properties.Contact.IsEnabled = isCompany; _obj.State.Properties.CounterpartySignatory.IsEnabled = isCompany; }
public override void CounterpartyChanged(Sungero.Docflow.Shared.ContractualDocumentBaseCounterpartyChangedEventArgs e) { base.CounterpartyChanged(e); FillName(); }