public override void ChartConfigCondition(Sungero.Domain.Client.ExecuteChildCollectionActionArgs e)
        {
            IContractCondition condition;

            if (_obj.Condition == null)
            {
                condition = Functions.ContractCondition.Remote.CreateContractCondition();
            }
            else
            {
                condition = _obj.Condition;
            }

            Docflow.PublicFunctions.ApprovalRuleBase.AddDocumentKindToCondition(_obj.ApprovalRuleBase, condition);

            condition.ShowModal();

            // TODO Belyak: баг платформы 32055. Убрать переполучение условия после исправления.
            if (!condition.State.IsInserted)
            {
                condition = ContractConditions.As(Docflow.PublicFunctions.ConditionBase.Remote.GetCondition(condition.Id));
            }

            if (!condition.State.IsInserted && !Equals(_obj.Condition, condition))
            {
                _obj.Condition = condition;
            }
        }
Ejemplo n.º 2
0
        public override void Created(Sungero.Domain.CreatedEventArgs e)
        {
            base.Created(e);
            _obj.DocumentFlow = Docflow.ApprovalRuleBase.DocumentFlow.Contracts;

            if (_obj.State.IsCopied)
            {
                foreach (var conditionsList in _obj.Conditions)
                {
                    var newCondition = ContractConditions.Copy(ContractConditions.As(conditionsList.Condition));
                    newCondition.Save();
                    conditionsList.Condition = newCondition;
                }
            }
        }