public override void ShowingSignDialog(Sungero.Domain.Client.ShowingSignDialogEventArgs e)
        {
            var errors = Functions.OfficialDocument.Remote.GetApprovalValidationErrors(_obj, true);

            foreach (var error in errors)
            {
                e.Hint.Add(error);
            }
            e.CanApprove = !errors.Any();
        }
Esempio n. 2
0
        public override void ShowingSignDialog(Sungero.Domain.Client.ShowingSignDialogEventArgs e)
        {
            base.ShowingSignDialog(e);

            if (e.CanApprove)
            {
                try
                {
                    Functions.AccountingDocumentBase.GenerateDefaultSellerTitle(_obj);
                    Functions.AccountingDocumentBase.GenerateDefaultBuyerTitle(_obj);
                }
                catch (AppliedCodeException ex)
                {
                    e.CanApprove = false;
                    e.Hint.Add(ex.Message);
                }
            }
        }