Beispiel #1
0
 public PartnerBuilder(DeliveryChainVM deliveryChainVM, IAMPRepository ampRepository, IARIESService AriesService, string user)
 {
     _user            = user;
     _deliveryChainVm = deliveryChainVM;
     _ampRepository   = ampRepository;
     _AriesService    = AriesService;
 }
 public RiskService(IAMPRepository ampRepository, IPersonService personService, ILoggingEngine loggingEngine, IErrorEngine errorEngine, IDocumentService documentService)
 {
     _ampRepository   = ampRepository;
     _personService   = personService;
     _loggingengine   = loggingEngine;
     _errorengine     = errorEngine;
     _documentService = documentService;
 }
 public DeliveryChainBuilder(SupplierVM supplierVm, IAMPRepository ampRepository, IARIESService AriesService, string componentId, string user)
 {
     _user          = user;
     _componentId   = componentId;
     _supplierVm    = supplierVm;
     _ampRepository = ampRepository;
     _AriesService  = AriesService;
 }
Beispiel #4
0
 public SectorCodeService(IAMPRepository ampRepository, IValidationDictionary validationDictionary, IComponentValidator componentValidator)
 {
     _ampRepository         = ampRepository;
     _personService         = new DemoPersonService();
     _inputSectorCodeReader = new InputSectorCodeReader(_ampRepository);
     _inputSectorCodeWriter = new InputSectorCodeWriter(_ampRepository);
     _validationDictionary  = validationDictionary;
     _componentValidator    = componentValidator;
 }
Beispiel #5
0
        public async Task SetHoDAlertPeople(IAMPRepository ampRepository, IPersonService personService, string sender, string projectId)
        {
            if (string.IsNullOrWhiteSpace(sender))
            {
                throw new ArgumentException("string is null or blank", "sender");
            }

            if (string.IsNullOrWhiteSpace(projectId))
            {
                throw new ArgumentException("string is null or blank", "projectId");
            }

            //Get the list of HoD approvers for the project
            IEnumerable <vHoDBudCentLookup> HoDAlertPeople = ampRepository.GetHoDAlertRecipients(projectId);

            if (HoDAlertPeople == null)
            {
                throw new NullReferenceException("SetHodAlertPeople. Null returned for project " + projectId);
            }

            List <vHoDBudCentLookup> HodAlertPeopleOrderedList = HoDAlertPeople.OrderBy(x => x.GradeRank).ToList();

            if (HodAlertPeopleOrderedList.Any())
            {
                if (HodAlertPeopleOrderedList.Count() == 1)
                {
                    vHoDBudCentLookup HodAlertLookUp = HodAlertPeopleOrderedList.FirstOrDefault();
                    if (HodAlertLookUp != null)
                    {
                        await SetRecipientEmail(personService, HodAlertLookUp.EmpNo);
                    }
                }
                else
                {
                    //Highest grade gets to be recipient. Everyone else is on the cc list.
                    string recipientEmpNo = HodAlertPeopleOrderedList.First().EmpNo;

                    List <String> ccEmpNoList = HodAlertPeopleOrderedList.Skip(1).Select(x => x.EmpNo).Distinct().ToList();

                    await SetRecipientEmail(personService, recipientEmpNo);

                    await SetCCRecipients(personService, ccEmpNoList);
                }
            }
            else
            {
                throw new ArgumentOutOfRangeException("SetHodAlertPeople. No HoD alerts returned for project " + projectId);
            }
            IEnumerable <Team> projectTeam = ampRepository.GetTeam(projectId);

            await SetSRO(personService, projectTeam);


            await SetSenderEmail(personService, sender);
        }
Beispiel #6
0
        public async Task SetEmailPeople(IAMPRepository ampRepository, IPersonService personService, string sender, string recipient, string projectId)
        {
            if (string.IsNullOrWhiteSpace(sender))
            {
                throw  new ArgumentException("string is null or blank", "sender");
            }

            if (string.IsNullOrWhiteSpace(recipient))
            {
                throw new ArgumentException("string is null or blank", "recipient");
            }

            IEnumerable <Team> projectTeam = ampRepository.GetTeam(projectId);
            List <string>      empNoList   = projectTeam.Select(x => x.TeamID).Distinct().ToList();

            await SetSenderEmail(personService, sender);

            await SetRecipientEmail(personService, recipient);

            await SetSRO(personService, projectTeam);

            await SetCCRecipients(personService, empNoList);
        }
 public RiskItem(IAMPRepository ampRepository)
 {
     _ampRepository = ampRepository;
 }
 public ResponseBuilder(WorkflowMaster workflowMaster, IAMPRepository ampRepository, string userId)
 {
     _ampRepository = ampRepository;
     _userId        = userId;
     _workflow      = workflowMaster;
 }
 public WorkflowHoDAlertEmail(IPersonService personService, IAMPRepository ampRepository)
 {
     this._personService = personService;
     this._ampRepository = ampRepository;
 }
 public WorkflowApprovalEmail()
 {
     _personService = new DemoPersonService();
     _ampRepository = new AMPRepository();
 }
 //Real method
 public DocumentService(IAMPRepository ampRepository)
 {
     _ampRepository = ampRepository;
 }
Beispiel #12
0
 public ComponentPartnerVMBuilder(IAMPRepository ampRepository, IARIESService ariesService, string componentId)
 {
     _AriesService  = ariesService;
     _ampRepository = ampRepository;
     _ComponentID   = componentId;
 }
 public WorkflowDocument(IAMPRepository ampRepository, Int32 workflowId, IDocumentService documentService)
 {
     _ampRepository   = ampRepository;
     _workflowId      = workflowId;
     _documentService = documentService;
 }
Beispiel #14
0
 public OverallRiskRatingItem(IAMPRepository ampRepository)
 {
     _ampRepository = ampRepository;
 }
Beispiel #15
0
 public WorkflowService(IAMPRepository ampRepository)
 {
     _ampRepository     = ampRepository;
     _personService     = new DemoPersonService();
     _validationService = new ValidationSevice(ampRepository);
 }
 public OverallRiskRatingBuilder(IAMPRepository ampRepository, OverallRiskRatingVM overallRiskRatingVm, string user)
 {
     _ampRepository       = ampRepository;
     _overallRiskRatingVm = overallRiskRatingVm;
     _user = user;
 }
 public RiskService(IAMPRepository ampRepository, IDocumentService documentService)
 {
     _ampRepository   = ampRepository;
     _personService   = new DemoPersonService();
     _documentService = documentService;
 }
Beispiel #18
0
 public WorkflowObject(IAMPRepository ampRepository, int taskId, IDocumentService documentService)
 {
     _ampRepository   = ampRepository;
     TaskID           = taskId;
     _documentService = documentService;
 }
 public RiskDocumentBuilder(IAMPRepository ampRepository, RiskDocumentVM riskDocumentVm, string user)
 {
     _ampRepository  = ampRepository;
     _riskDocumentVm = riskDocumentVm;
     _user           = user;
 }
Beispiel #20
0
 //Real method
 public ValidationSevice(IAMPRepository ampRepository)
 {
     _ampRepository = ampRepository;
 }
 public CompletedWorkflow(IAMPRepository ampRepository, IDocumentService documentService)
 {
     _ampRepository   = ampRepository;
     _documentService = documentService;
 }
 public WorkflowApprovalEmail(IPersonService personService, IAMPRepository ampRepository)
 {
     this._personService = personService;
     this._ampRepository = ampRepository;
 }
 public WorkflowRejectionEmail(IPersonService personService, IAMPRepository ampRepository)
 {
     this._personService = personService;
     this._ampRepository = ampRepository;
 }
Beispiel #24
0
 public WorkflowRequestEmail()
 {
     _personService = new DemoPersonService();
     _ampRepository = new AMPRepository();
 }
Beispiel #25
0
 public InputSectorCodeReader(IAMPRepository ampRepository)
 {
     _ampRepository = ampRepository;
 }