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

            BillDemandWorkflowService.RaiseCheckStatus(new WorkflowEventArgsWithInitiator(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId));
        }
 public void RaiseRollback(Guid instanceId, ServiceIdentity serviceIdentity, string comment)
 {
     WorkflowSupportService.UpgradeWorkflow(Runtime, instanceId);
     Rollback(null, new DenialCommandEventArgs(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId)
     {
         Comment = comment
     });
 }
        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 RaiseDenial(Guid instanceId, ServiceIdentity serviceIdentity, string comment)
        {
            WorkflowSupportService.UpgradeWorkflow(Runtime, instanceId);
            var args = new DenialCommandEventArgs(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId)
            {
                Comment = comment
            };

            Denial(null, args);
        }
        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 RaiseDenialByTechnicalCauses(Guid instanceId, string comment)
        {
            WorkflowSupportService.UpgradeWorkflow(Runtime, instanceId);
            var serviceIdentity = AuthenticationService.GetCurrentIdentity();
            var args            = new DenialCommandEventArgs(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId)
            {
                Comment = comment
            };

            DenialByTechnicalCauses(null, args);
        }
 public void RaiseSighting(Guid instanceId, ServiceIdentity serviceIdentity)
 {
     WorkflowSupportService.UpgradeWorkflow(Runtime, instanceId);
     Sighting(null, new WorkflowEventArgsWithInitiator(instanceId, serviceIdentity.Id, serviceIdentity.ImpersonatedId));
 }