public void RaiseCheckStatus(Guid instanceId)
        {
            WorkflowSupportService.UpgradeWorkflow(Runtime, instanceId);
            var serviceIdentity = AuthenticationService.GetCurrentIdentity();

            BillDemandWorkflowService.RaiseCheckStatus(new WorkflowEventArgsWithInitiator(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId));
        }
        public void RaiseSetPaidStatus(Guid instanceId, DateTime?paymentDate, string documentNumber)
        {
            WorkflowSupportService.UpgradeWorkflow(Runtime, instanceId);
            var serviceIdentity = AuthenticationService.GetCurrentIdentity();

            BillDemandWorkflowService.RaiseSetPaidStatus(new PaidCommandEventArgs(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId)
            {
                DocumentNumber = documentNumber, PaymentDate = paymentDate
            });
        }
        public void RaiseExport(Guid instanceId)
        {
            if (!BillDemandBuinessService.IsBillDemandSupportExport(instanceId))
            {
                throw new ImpossibleToExecuteCommandException("Отправка документа в систему \"ФУС БОСС\" невозможна, т.к. в договоре контрагент заказчик указан не наш банк!");
            }
            WorkflowSupportService.UpgradeWorkflow(Runtime, instanceId);
            var serviceIdentity = AuthenticationService.GetCurrentIdentity();

            BillDemandWorkflowService.RaiseExport(new WorkflowEventArgsWithInitiator(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId));
        }
        public void RaiseSetDenialStatus(Guid instanceId, string comment)
        {
            WorkflowSupportService.UpgradeWorkflow(Runtime, instanceId);
            var serviceIdentity = AuthenticationService.GetCurrentIdentity();
            var args            = new DenialCommandEventArgs(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId)
            {
                Comment = comment
            };

            BillDemandWorkflowService.RaiseSetDenialStatus(args);
        }
 public void RaiseExport(Guid instanceId, ServiceIdentity serviceIdentity)
 {
     BillDemandWorkflowService.RaiseExport(new WorkflowEventArgsWithInitiator(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId));
 }