Esempio n. 1
0
 public DispatchAllocationController(IDispatchAllocationService dispatchAllocationService,
                                     IUserProfileService userProfileService,
                                     IOtherDispatchAllocationService otherDispatchAllocationService,
                                     IShippingInstructionService shippingInstructionService,
                                     IProjectCodeService projectCodeService,
                                     ITransporterService transporterService,
                                     ICommonService commonService,
                                     IAdminUnitService adminUnitService,
                                     IFDPService fdpService,
                                     IHubService hubService,
                                     ICommodityTypeService commodityTypeService)
     : base(userProfileService)
 {
     this._dispatchAllocationService      = dispatchAllocationService;
     this._userProfileService             = userProfileService;
     this._otherDispatchAllocationService = otherDispatchAllocationService;
     this._projectCodeService             = projectCodeService;
     this._shippingInstructionService     = shippingInstructionService;
     this._transporterService             = transporterService;
     this._adminUnitService     = adminUnitService;
     this._fdpService           = fdpService;
     this._commonService        = commonService;
     this._hubService           = hubService;
     this._commodityTypeService = commodityTypeService;
 }
Esempio n. 2
0
 public PriceQuotationController(ITransportBidPlanService transportBidPlanServiceParam
                                     , IAdminUnitService adminUnitServiceParam
                                     , IProgramService programServiceParam
                                     , ITransportBidPlanDetailService transportBidPlanDetailServiceParam
                                     , IHubService hubServiceParam
                                     , ITransportBidQuotationService bidQuotationServiceParam
                                     , ITransporterService transporterServiceParam
                                     , IBidService bidServiceParam
                                     , ITransportBidQuotationService transportBidQuotationService
                                     , IBidWinnerService bidWinnerService
                                     , IBusinessProcessService businessProcessService
                                     , IApplicationSettingService applicationSettingService
                                     , ITransportBidQuotationHeaderService transportBidQuotationHeaderService
                                     , ITransportOrderService transportOrderService  )
 {
     this._transportBidPlanService = transportBidPlanServiceParam;
     this._adminUnitService = adminUnitServiceParam;
     this._programService = programServiceParam;
     this._transportBidPlanDetailService = transportBidPlanDetailServiceParam;
     this._hubService = hubServiceParam;
     this._bidQuotationService = bidQuotationServiceParam;
     this._bidService = bidServiceParam;
     this._transporterService = transporterServiceParam;
     this._transportBidQuotationService = transportBidQuotationService;
     this._bidWinnerService = bidWinnerService;
     this._BusinessProcessService = businessProcessService;
     this._transportBidQuotationHeaderService = transportBidQuotationHeaderService;
     this._ApplicationSettingService = applicationSettingService;
     _transportOrderService = transportOrderService;
 }
Esempio n. 3
0
        public ReportsController(IDispatchService dispatchService,
                                 IReceiveService receiveService,
                                 IUserProfileService userProfileService,
                                 IHubService hubService,
                                 ITransactionService transactionService,
                                 ICommodityService commodityService,
                                 ICommodityTypeService commodityTypeService,
                                 IProgramService programService,
                                 IAdminUnitService adminUnitService,
                                 IDispatchAllocationService dispatchAllocationService,
                                 ICommoditySourceService commoditySourceService

                                 )
        {
            this._dispatchService      = dispatchService;
            this._receiveService       = receiveService;
            this._userProfileService   = userProfileService;
            this._hubService           = hubService;
            this._transactionService   = transactionService;
            _commodityService          = commodityService;
            _commodityTypeService      = commodityTypeService;
            _programService            = programService;
            _adminUnitService          = adminUnitService;
            _dispatchAllocationService = dispatchAllocationService;
            _commoditySourceService    = commoditySourceService;
        }
 public ProjectAllocationController(IRegionalRequestService reliefRequistionService
    , IFDPService fdpService
     , IAdminUnitService adminUnitService,
     IProgramService programService,
     ICommodityService commodityService,
     IRegionalRequestDetailService reliefRequisitionDetailService,
     IProjectCodeAllocationService projectCodeAllocationService, 
     IProjectCodeService projectCodeService,
     IShippingInstructionService shippingInstructionService, 
     IHubService hubService, 
     IHubAllocationService hubAllocationService,
     ILog log,
     IReliefRequisitionService requisitionService, ITransactionService transactionservice, ILedgerService ledgerService)
 {
     this._regionalRequestService = reliefRequistionService;
     this._adminUnitService = adminUnitService;
     this._commodityService = commodityService;
     this._fdpService = fdpService;
     this._programService = programService;
     this._reliefRequisitionDetailService = reliefRequisitionDetailService;
     this._projectCodeAllocationService = projectCodeAllocationService;
     this._projectCodeService = projectCodeService;
     this._shippingInstructionService = shippingInstructionService;
     this._hubService = hubService;
     this._hubAllocationService = hubAllocationService;
     this._requisitionService = requisitionService;
     this._transactionService = transactionservice;
        this._ledgerService = ledgerService;
     this._log = log;
 }
 public ProjectAllocationController(IRegionalRequestService reliefRequistionService
                                    , IFDPService fdpService
                                    , IAdminUnitService adminUnitService,
                                    IProgramService programService,
                                    ICommodityService commodityService,
                                    IRegionalRequestDetailService reliefRequisitionDetailService,
                                    IProjectCodeAllocationService projectCodeAllocationService,
                                    IProjectCodeService projectCodeService,
                                    IShippingInstructionService shippingInstructionService,
                                    IHubService hubService,
                                    IHubAllocationService hubAllocationService,
                                    ILog log,
                                    IReliefRequisitionService requisitionService, ITransactionService transactionservice, ILedgerService ledgerService)
 {
     this._regionalRequestService         = reliefRequistionService;
     this._adminUnitService               = adminUnitService;
     this._commodityService               = commodityService;
     this._fdpService                     = fdpService;
     this._programService                 = programService;
     this._reliefRequisitionDetailService = reliefRequisitionDetailService;
     this._projectCodeAllocationService   = projectCodeAllocationService;
     this._projectCodeService             = projectCodeService;
     this._shippingInstructionService     = shippingInstructionService;
     this._hubService                     = hubService;
     this._hubAllocationService           = hubAllocationService;
     this._requisitionService             = requisitionService;
     this._transactionService             = transactionservice;
     this._ledgerService                  = ledgerService;
     this._log = log;
 }
Esempio n. 6
0
 public BeneficiaryAllocationController(IBeneficiaryAllocationService beneficiaryAllocationService,
                                        IAdminUnitService adminUnitService, IReliefRequisitionService reliefRequisitionService)
 {
     this._beneficiaryAllocationService = beneficiaryAllocationService;
     this._reliefRequisitionService     = reliefRequisitionService;
     this._adminUnitService             = adminUnitService;
 }
Esempio n. 7
0
 // private readonly IUserAccountService _userAccountService;
 public UsersController(IUserAccountService service, IHubService hubService, IAdminUnitService adminUnitService)
 {
     _userService = service;
     _hubService = hubService;
     _adminUnitService = adminUnitService;
     //_userAccountService = userAccountService;
 }
Esempio n. 8
0
 public DispatchController(IDispatchAllocationService dispatchAllocationService, IDispatchService dispatchService,
                           IUserProfileService userProfileService, IOtherDispatchAllocationService otherDispatchAllocationService,
                           IDispatchDetailService dispatchDetailService, IUnitService unitService, ICommodityTypeService commodityTypeService,
                           IProgramService programService, ITransporterService transporterService, IPeriodService periodService,
                           ICommodityService commodityService, ITransactionService transactionService, IStoreService storeService,
                           IAdminUnitService adminUnitService, IHubService hubService, IFDPService fdpService,
                           IProjectCodeService projectCodeService, IShippingInstructionService shippingInstructionService)
 {
     _dispatchAllocationService      = dispatchAllocationService;
     _dispatchService                = dispatchService;
     _userProfileService             = userProfileService;
     _otherDispatchAllocationService = otherDispatchAllocationService;
     _dispatchDetailService          = dispatchDetailService;
     _unitService                = unitService;
     _commodityTypeService       = commodityTypeService;
     _programService             = programService;
     _transporterService         = transporterService;
     _periodService              = periodService;
     _commodityService           = commodityService;
     _transactionService         = transactionService;
     _storeService               = storeService;
     _adminUnitService           = adminUnitService;
     _hubService                 = hubService;
     _fdpService                 = fdpService;
     _projectCodeService         = projectCodeService;
     _shippingInstructionService = shippingInstructionService;
 }
Esempio n. 9
0
 public ReportsController(IDispatchService dispatchService,
      IReceiveService receiveService,
      IUserProfileService userProfileService,
      IHubService hubService,
      ITransactionService transactionService,
      ICommodityService commodityService,
      ICommodityTypeService commodityTypeService,
      IProgramService programService,
      IAdminUnitService adminUnitService,
      IDispatchAllocationService dispatchAllocationService,
      ICommoditySourceService commoditySourceService
      
      )
 {
     this._dispatchService = dispatchService;
      this._receiveService = receiveService;
      this._userProfileService = userProfileService;
      this._hubService = hubService;
      this._transactionService = transactionService;
      _commodityService = commodityService;
      _commodityTypeService = commodityTypeService;
      _programService = programService;
      _adminUnitService = adminUnitService;
      _dispatchAllocationService = dispatchAllocationService;
      _commoditySourceService = commoditySourceService;
 }
 public AdminUnitController(IAdminUnitService adminUnitService, IUserProfileService userProfileService,
     IDispatchAllocationService dispatchAllocationService)
 {
     _adminUnitService = adminUnitService;
     _userProfileService = userProfileService;
     _dispatchAllocationService = dispatchAllocationService;
 }
Esempio n. 11
0
 public TransportOrderPerformanceController(ITransportOrderService transportOrderService, ITransporterService transporterService, ITransportOrderDetailService transportOrderDetailService, IHubService hubService, IAdminUnitService adminUnitService)
 {
     _transportOrderService       = transportOrderService;
     _transportOrderDetailService = transportOrderDetailService;
     _hubService       = hubService;
     _adminUnitService = adminUnitService;
 }
Esempio n. 12
0
 public AdminUnitController(IAdminUnitService adminUnitService, IUserProfileService userProfileService,
                            IDispatchAllocationService dispatchAllocationService)
 {
     _adminUnitService          = adminUnitService;
     _userProfileService        = userProfileService;
     _dispatchAllocationService = dispatchAllocationService;
 }
 public DispatchAllocationController(IDispatchAllocationService dispatchAllocationService,
                                     IUserProfileService userProfileService,
                                     IOtherDispatchAllocationService otherDispatchAllocationService,
                                     IShippingInstructionService shippingInstructionService,
                                     IProjectCodeService projectCodeService,
                                     ITransporterService transporterService,
                                     ICommonService commonService,
                                     IAdminUnitService adminUnitService,
                                     IFDPService fdpService,
                                     IHubService hubService,
                                      ICommodityTypeService commodityTypeService)
     : base(userProfileService)
 {
     this._dispatchAllocationService = dispatchAllocationService;
     this._userProfileService = userProfileService;
     this._otherDispatchAllocationService = otherDispatchAllocationService;
     this._projectCodeService = projectCodeService;
     this._shippingInstructionService = shippingInstructionService;
     this._transporterService = transporterService;
     this._adminUnitService = adminUnitService;
     this._fdpService = fdpService;
     this._commonService = commonService;
     this._hubService = hubService;
     this._commodityTypeService = commodityTypeService;
 }
Esempio n. 14
0
 public DispatchController(IDispatchAllocationService dispatchAllocationService, IDispatchService dispatchService,
     IUserProfileService userProfileService, IOtherDispatchAllocationService otherDispatchAllocationService,
     IDispatchDetailService dispatchDetailService, IUnitService unitService, ICommodityTypeService commodityTypeService,
     IProgramService programService, ITransporterService transporterService, IPeriodService periodService, 
     ICommodityService commodityService, ITransactionService transactionService, IStoreService storeService,
     IAdminUnitService adminUnitService, IHubService hubService, IFDPService fdpService,
     IProjectCodeService projectCodeService, IShippingInstructionService shippingInstructionService, 
     ISMSGatewayService smsGatewayService, IContactService contactService, ISMSService smsService)
     : base(userProfileService)
 {
     _dispatchAllocationService = dispatchAllocationService;
     _dispatchService = dispatchService;
     _userProfileService = userProfileService;
     _otherDispatchAllocationService = otherDispatchAllocationService;
     _dispatchDetailService = dispatchDetailService;
     _unitService = unitService;
     _commodityTypeService = commodityTypeService;
     _programService = programService;
     _transporterService = transporterService;
     _periodService = periodService;
     _commodityService = commodityService;
     _transactionService = transactionService;
     _storeService = storeService;
     _adminUnitService = adminUnitService;
     _hubService = hubService;
     _fdpService = fdpService;
     _projectCodeService = projectCodeService;
     _shippingInstructionService = shippingInstructionService;
     _smsGatewayService = smsGatewayService;
     _contactService = contactService;
     _smsService = smsService;
 }
 public BeneficiaryAllocationController(IBeneficiaryAllocationService beneficiaryAllocationService,
     IAdminUnitService adminUnitService, IReliefRequisitionService reliefRequisitionService)
 {
     this._beneficiaryAllocationService = beneficiaryAllocationService;
     this._reliefRequisitionService = reliefRequisitionService;
     this._adminUnitService = adminUnitService;
 }
Esempio n. 16
0
 public PriceQuotationController(ITransportBidPlanService transportBidPlanServiceParam
                                 , IAdminUnitService adminUnitServiceParam
                                 , IProgramService programServiceParam
                                 , ITransportBidPlanDetailService transportBidPlanDetailServiceParam
                                 , IHubService hubServiceParam
                                 , ITransportBidQuotationService bidQuotationServiceParam
                                 , ITransporterService transporterServiceParam
                                 , IBidService bidServiceParam
                                 , ITransportBidQuotationService transportBidQuotationService
                                 , IBidWinnerService bidWinnerService
                                 , IBusinessProcessService businessProcessService
                                 , IApplicationSettingService applicationSettingService
                                 , ITransportBidQuotationHeaderService transportBidQuotationHeaderService
                                 , ITransportOrderService transportOrderService)
 {
     this._transportBidPlanService       = transportBidPlanServiceParam;
     this._adminUnitService              = adminUnitServiceParam;
     this._programService                = programServiceParam;
     this._transportBidPlanDetailService = transportBidPlanDetailServiceParam;
     this._hubService                         = hubServiceParam;
     this._bidQuotationService                = bidQuotationServiceParam;
     this._bidService                         = bidServiceParam;
     this._transporterService                 = transporterServiceParam;
     this._transportBidQuotationService       = transportBidQuotationService;
     this._bidWinnerService                   = bidWinnerService;
     this._BusinessProcessService             = businessProcessService;
     this._transportBidQuotationHeaderService = transportBidQuotationHeaderService;
     this._ApplicationSettingService          = applicationSettingService;
     _transportOrderService                   = transportOrderService;
 }
 public TransportOrderPerformanceController(ITransportOrderService transportOrderService, ITransporterService transporterService, ITransportOrderDetailService transportOrderDetailService, IHubService hubService, IAdminUnitService adminUnitService)
 {
     _transportOrderService = transportOrderService;
     _transportOrderDetailService = transportOrderDetailService;
     _hubService = hubService;
     _adminUnitService = adminUnitService;
 }
Esempio n. 18
0
 public FDPController(IFDPService FDPServiceParam, 
     IAdminUnitService adminUnitService, 
     IUserProfileService userProfileService)
     : base(userProfileService)
 {
     this._FDPService = FDPServiceParam;
     _adminUnitService = adminUnitService;
 }
Esempio n. 19
0
 public FDPController(IFDPService FDPServiceParam,
                      IAdminUnitService adminUnitService,
                      IUserProfileService userProfileService)
     : base(userProfileService)
 {
     this._FDPService  = FDPServiceParam;
     _adminUnitService = adminUnitService;
 }
Esempio n. 20
0
        // private readonly IUserAccountService _userAccountService;

        public UsersController(IUserAccountService service, IHubService hubService, IAdminUnitService adminUnitService, IProgramService programService, Cats.Services.Hub.IUserHubService userHubService)
        {
            _userService      = service;
            _hubService       = hubService;
            _adminUnitService = adminUnitService;
            _programService   = programService;
            _userHubServcie   = userHubService;
            //_userAccountService = userAccountService;
        }
Esempio n. 21
0
 // private readonly IUserAccountService _userAccountService;
 public UsersController(IUserAccountService service, IHubService hubService, IAdminUnitService adminUnitService, IProgramService programService, Cats.Services.Hub.IUserHubService userHubService)
 {
     _userService = service;
     _hubService = hubService;
     _adminUnitService = adminUnitService;
     _programService = programService;
     _userHubServcie = userHubService;
     //_userAccountService = userAccountService;
 }
 public UnContractedTransportersController(IBidWinnerService bidWinnerService, 
                                             IUserAccountService userAccountService, 
                                             IBidService bidService,
                                             IAdminUnitService adminUnitService)
 {
     _bidWinnerService = bidWinnerService;
     _userAccountService = userAccountService;
     _bidService = bidService;
     _adminUnitService = adminUnitService;
 }
 public UnContractedTransportersController(IBidWinnerService bidWinnerService,
                                           IUserAccountService userAccountService,
                                           IBidService bidService,
                                           IAdminUnitService adminUnitService)
 {
     _bidWinnerService   = bidWinnerService;
     _userAccountService = userAccountService;
     _bidService         = bidService;
     _adminUnitService   = adminUnitService;
 }
 public TransportBidPlanController(ITransportBidPlanService transportBidPlanServiceParam
                                   , IAdminUnitService adminUnitServiceParam
                                   , IProgramService programServiceParam
                                   , ITransportBidPlanDetailService transportBidPlanDetailServiceParam
                                   , IHubService hubServiceParam)
 {
     this._transportBidPlanService = transportBidPlanServiceParam;
     this._adminUnitService = adminUnitServiceParam;
     this._programService = programServiceParam;
     this._transportBidPlanDetailService = transportBidPlanDetailServiceParam;
     this._hubService = hubServiceParam;
 }
Esempio n. 25
0
 public TransportBidPlanController(ITransportBidPlanService transportBidPlanServiceParam
                                   , IAdminUnitService adminUnitServiceParam
                                   , IProgramService programServiceParam
                                   , ITransportBidPlanDetailService transportBidPlanDetailServiceParam
                                   , IHubService hubServiceParam)
 {
     this._transportBidPlanService       = transportBidPlanServiceParam;
     this._adminUnitService              = adminUnitServiceParam;
     this._programService                = programServiceParam;
     this._transportBidPlanDetailService = transportBidPlanDetailServiceParam;
     this._hubService = hubServiceParam;
 }
Esempio n. 26
0
 public RegionalPSNPPledgeController(IDonorService donorService, IFDPService fdpService,
                                     IRegionalPSNPPlanDetailService regionalPSNPPlanDetailService, IRegionalPSNPPlanService regionalPSNPPlanService,
                                     IRegionalPSNPPledgeService regionalPSNPPledgeService, IAdminUnitService adminUnitService,
                                     ICommodityService commodityService, IRationDetailService rationDetailService, IUnitService unitService)
 {
     _donorService = donorService;
     _fdpService   = fdpService;
     _regionalPSNPPlanDetailService = regionalPSNPPlanDetailService;
     _regionalPSNPPlanService       = regionalPSNPPlanService;
     _regionalPSNPPledgeService     = regionalPSNPPledgeService;
     _adminUnitService    = adminUnitService;
     _commodityService    = commodityService;
     _rationDetailService = rationDetailService;
     _unitService         = unitService;
 }
Esempio n. 27
0
 public RegionalPSNPPledgeController(IDonorService donorService, IFDPService fdpService,
     IRegionalPSNPPlanDetailService regionalPSNPPlanDetailService,IRegionalPSNPPlanService regionalPSNPPlanService,
     IRegionalPSNPPledgeService regionalPSNPPledgeService, IAdminUnitService adminUnitService,
     ICommodityService commodityService, IRationDetailService rationDetailService, IUnitService unitService)
 {
     _donorService = donorService;
     _fdpService = fdpService;
     _regionalPSNPPlanDetailService = regionalPSNPPlanDetailService;
     _regionalPSNPPlanService = regionalPSNPPlanService;
     _regionalPSNPPledgeService = regionalPSNPPledgeService;
     _adminUnitService = adminUnitService;
     _commodityService = commodityService;
     _rationDetailService = rationDetailService;
     _unitService = unitService;
 }
Esempio n. 28
0
 public FetchDataController(IRegionalDashboard regionalDashboard,
     IRegionalRequestService regionalRequestService,
     IReliefRequisitionService reliefRequisitionService,
     IAdminUnitService adminUnitService,
     IFDPService fdpService,
     IHRDService hrdService
     )
 {
     _regionalDashboard = regionalDashboard;
     _regionalRequestService = regionalRequestService;
     _reliefRequisitionService = reliefRequisitionService;
     _adminUnitService = adminUnitService;
     _fdpService = fdpService;
     _hrdService = hrdService;
 }
Esempio n. 29
0
        public RequestControllerTest()
        {
            List<RegionalRequest> regionalRequestTest = new List<RegionalRequest>();
            {
                new RegionalRequest { RegionalRequestID = 1, ProgramId = 1, Round = 2, RegionID = 9, ReferenceNumber = "AA1234", Year = 2012, Remark = "remarks" };
                new RegionalRequest { RegionalRequestID = 2, ProgramId = 2, Round = 4, RegionID = 7, ReferenceNumber = "1234", Year = 2012, Remark = "" };
            }
            ;
            List<AdminUnit> adminUnitTest=new List<AdminUnit>();
            {
                new AdminUnit() {AdminUnitID = 1, Name = "Afar", NameAM = null, AdminUnitTypeID = 2, ParentID = 1};
            }
            ;
            List<Commodity> commodityTest = new List<Commodity>
                {
                    new Commodity { CommodityID = 5, Name = "Grain",LongName = "",CommodityTypeID = 1, ParentID = 1 },
                    new Commodity { CommodityID = 6, Name = "Oil",LongName = "",CommodityTypeID = 1, ParentID = 1 },
                    new Commodity { CommodityID = 8, Name = "CSB",LongName = "",CommodityTypeID = 1, ParentID = 3 },
               };

            //Mock the Regional Request Service Using Moq
            Mock<IRegionalRequestService> mockRegionalRequestService = new Mock<IRegionalRequestService>();
            Mock<IFDPService> mockFDPService = new Mock<IFDPService>();
            Mock<IAdminUnitService> mockAdminUnitService = new Mock<IAdminUnitService>();
            Mock<IProgramService> mockProgramService = new Mock<IProgramService>();
            Mock<ICommodityService> mockCommodityService = new Mock<ICommodityService>();
            Mock<IRegionalRequestDetailService> mockRegionalRequestDetailService=new Mock<IRegionalRequestDetailService>();

            // return all regional requests
            mockRegionalRequestService.Setup(m => m.GetAllReliefRequistion()).Returns(regionalRequestTest);
            mockRegionalRequestService.Setup(m => m.Get(t=>t.RegionalRequestID==2,null,null));

            mockFDPService.Setup(m => m.GetAllFDP()).Returns(new List<FDP>());
            mockAdminUnitService.Setup(m => m.FindBy(au => au.AdminUnitTypeID==2)).Returns(adminUnitTest);
            mockProgramService.Setup(m => m.GetAllProgram()).Returns(new List<Program>());
            mockCommodityService.Setup(m => m.GetAllCommodity()).Returns(commodityTest);

            //return regional requests by id
            mockRegionalRequestService.Setup(mr => mr.FindById(
               It.IsAny<int>())).Returns((int i) => regionalRequestTest.Single(x => x.RegionalRequestID == i));

            this.MockRegionalRequestService = mockRegionalRequestService.Object;
            this.MockAdminUnitService = mockAdminUnitService.Object;
            this.MockFdpService = mockFDPService.Object;
            this.MockProgramService = mockProgramService.Object;
            this.MockCommodityService = mockCommodityService.Object;
            this.MockRegionalRequestDetailService = mockRegionalRequestDetailService.Object;
        }
Esempio n. 30
0
 public WoredaHubController(IWoredaHubService woredaHubService, IWoredaHubLinkService woredaHubLinkService, 
     IHRDService hrdService, IRegionalPSNPPlanService regionalPSNPPlanService, IAdminUnitService adminUnitService,
     IHubService hubService, IHRDDetailService hrdDetailService, IRegionalPSNPPlanDetailService regionalPSNPPlanDetailService,
     IApplicationSettingService applicationSettingService, IUserAccountService userAccountService, IPlanService planService)
 {
     _woredaHubService = woredaHubService;
     _woredaHubLinkService = woredaHubLinkService;
     _hrdService = hrdService;
     _regionalPSNPPlanService = regionalPSNPPlanService;
     _adminUnitService = adminUnitService;
     _hubService = hubService;
     _hrdDetailService = hrdDetailService;
     _regionalPSNPPlanDetailService = regionalPSNPPlanDetailService;
     _applicationSettingService = applicationSettingService;
     _planService = planService;
 }
Esempio n. 31
0
 public WoredaHubController(IWoredaHubService woredaHubService, IWoredaHubLinkService woredaHubLinkService,
                            IHRDService hrdService, IRegionalPSNPPlanService regionalPSNPPlanService, IAdminUnitService adminUnitService,
                            IHubService hubService, IHRDDetailService hrdDetailService, IRegionalPSNPPlanDetailService regionalPSNPPlanDetailService,
                            IApplicationSettingService applicationSettingService, IUserAccountService userAccountService, IPlanService planService)
 {
     _woredaHubService              = woredaHubService;
     _woredaHubLinkService          = woredaHubLinkService;
     _hrdService                    = hrdService;
     _regionalPSNPPlanService       = regionalPSNPPlanService;
     _adminUnitService              = adminUnitService;
     _hubService                    = hubService;
     _hrdDetailService              = hrdDetailService;
     _regionalPSNPPlanDetailService = regionalPSNPPlanDetailService;
     _applicationSettingService     = applicationSettingService;
     _planService                   = planService;
 }
 public LogisticsStockStatusController(
     IUnitOfWork unitOfWork,
     IUserDashboardPreferenceService userDashboardPreferenceService,
     IDashboardWidgetService dashboardWidgetservice,
     IUserAccountService userService,
     IHubService hubService,
     IStockStatusService stockStatusService, IAdminUnitService adminUnitService)
 {
     _unitOfWork = unitOfWork;
     _userDashboardPreferenceService = userDashboardPreferenceService;
     _dashboardWidgetService = dashboardWidgetservice;
     _userService = userService;
     _hubService = hubService;
     _stockStatusService = stockStatusService;
     _adminUnitService = adminUnitService;
 }
Esempio n. 33
0
 public DuplicatedController(ITransportOrderService transportOrderService,
                             ITransportRequisitionService transportRequisitionService,
                             IWorkflowStatusService workflowStatusService, ILog log,
                             ITransReqWithoutTransporterService transReqWithoutTransporterService, ITransportOrderDetailService transportOrderDetailService,
                             IAdminUnitService adminUnitService, ITransporterService transporterService, ITransportBidQuotationService bidQuotationService)
 {
     this._transportOrderService       = transportOrderService;
     this._transportRequisitionService = transportRequisitionService;
     this._workflowStatusService       = workflowStatusService;
     _log = log;
     _adminUnitService   = adminUnitService;
     _transporterService = transporterService;
     _transReqWithoutTransporterService = transReqWithoutTransporterService;
     _transportOrderDetailService       = transportOrderDetailService;
     _bidQuotationService = bidQuotationService;
 }
Esempio n. 34
0
 public TransportOrderController(ITransportOrderService transportOrderService,
     ITransportRequisitionService transportRequisitionService,
     IWorkflowStatusService workflowStatusService, ILog log,
     ITransReqWithoutTransporterService transReqWithoutTransporterService, ITransportOrderDetailService transportOrderDetailService,
     IAdminUnitService adminUnitService, ITransporterService transporterService, ITransportBidQuotationService bidQuotationService)
 {
     this._transportOrderService = transportOrderService;
     this._transportRequisitionService = transportRequisitionService;
     this._workflowStatusService = workflowStatusService;
     _log = log;
     _adminUnitService = adminUnitService;
     _transporterService = transporterService;
     _transReqWithoutTransporterService = transReqWithoutTransporterService;
     _transportOrderDetailService = transportOrderDetailService;
     _bidQuotationService = bidQuotationService;
 }
Esempio n. 35
0
        public FetchDataController(IRegionalDashboard regionalDashboard,
                                   IRegionalRequestService regionalRequestService,
                                   IReliefRequisitionService reliefRequisitionService,
                                   IAdminUnitService adminUnitService,
                                   IFDPService fdpService,
                                   IHRDService hrdService,
                                   IUtilizationHeaderSerivce utilization

                                   )
        {
            _regionalDashboard        = regionalDashboard;
            _regionalRequestService   = regionalRequestService;
            _reliefRequisitionService = reliefRequisitionService;
            _adminUnitService         = adminUnitService;
            _fdpService  = fdpService;
            _hrdService  = hrdService;
            _utilization = utilization;
        }
Esempio n. 36
0
        public FetchDataController(IRegionalDashboard regionalDashboard,
            IRegionalRequestService regionalRequestService,
            IReliefRequisitionService reliefRequisitionService,
            IAdminUnitService adminUnitService,
            IFDPService fdpService,
            IHRDService hrdService,
            IUtilizationHeaderSerivce utilization

            )
        {
            _regionalDashboard = regionalDashboard;
            _regionalRequestService = regionalRequestService;
            _reliefRequisitionService = reliefRequisitionService;
            _adminUnitService = adminUnitService;
            _fdpService = fdpService;
            _hrdService = hrdService;
            _utilization = utilization;
        }
Esempio n. 37
0
 public RFQController(ITransportBidPlanService transportBidPlanServiceParam
                                     , IAdminUnitService adminUnitServiceParam
                                     , IProgramService programServiceParam
                                     , ITransportBidPlanDetailService transportBidPlanDetailServiceParam
                                     ,IHubService hubServiceParam
                                     , ITransportBidQuotationService bidQuotationServiceParam
                                     , ITransporterService transporterServiceParam
                                     , IBidService bidServiceParam)
 {
     this._transportBidPlanService = transportBidPlanServiceParam;
         this._adminUnitService = adminUnitServiceParam;
         this._programService = programServiceParam;
         this._transportBidPlanDetailService = transportBidPlanDetailServiceParam;
         this._hubService = hubServiceParam;
         this._bidQuotationService = bidQuotationServiceParam;
         this._bidService = bidServiceParam;
         this._transporterService = transporterServiceParam;
 }
 public NeedAssessmentController(INeedAssessmentService needAssessmentService,
                                 IAdminUnitService adminUnitService,
                                 INeedAssessmentHeaderService needAssessmentHeaderService,
                                 INeedAssessmentDetailService needAssessmentDetailService,
                                 ISeasonService seasonService, ITypeOfNeedAssessmentService typeOfNeedAssessmentService,
                                 ILog log, 
                                 IPlanService planService,
                                 ICommonService commonService)
 {
     _needAssessmentService = needAssessmentService;
     _adminUnitService = adminUnitService;
     _needAssessmentHeaderService = needAssessmentHeaderService;
     _needAssessmentDetailService = needAssessmentDetailService;
     _seasonService = seasonService;
     _typeOfNeedAssessmentService = typeOfNeedAssessmentService;
     _log = log;
     _planService = planService;
     _commonService = commonService;
 }
Esempio n. 39
0
 public RegionalPSNPPlanController(IRegionalPSNPPlanService regionalPSNPPlanServiceParam
                                   , IRationService rationServiceParam
                                   , IAdminUnitService adminUnitServiceParam
                                   , IBusinessProcessService BusinessProcessServiceParam
                                   , IBusinessProcessStateService BusinessProcessStateServiceParam
                                   , IApplicationSettingService ApplicationSettingParam
                                   , ILog log
                                   , IPlanService planService
                                  )
 {
     this._regionalPSNPPlanService = regionalPSNPPlanServiceParam;
     this._rationService = rationServiceParam;
     this._adminUnitService = adminUnitServiceParam;
     this._BusinessProcessService = BusinessProcessServiceParam;
     this._BusinessProcessStateService = BusinessProcessStateServiceParam;
     this._ApplicationSettingService = ApplicationSettingParam;
     this._log = log;
     this._planService = planService;
 }
Esempio n. 40
0
 public NeedAssessmentController(INeedAssessmentService needAssessmentService,
                                 IAdminUnitService adminUnitService,
                                 INeedAssessmentHeaderService needAssessmentHeaderService,
                                 INeedAssessmentDetailService needAssessmentDetailService,
                                 ISeasonService seasonService, ITypeOfNeedAssessmentService typeOfNeedAssessmentService,
                                 ILog log,
                                 IPlanService planService,
                                 ICommonService commonService)
 {
     _needAssessmentService       = needAssessmentService;
     _adminUnitService            = adminUnitService;
     _needAssessmentHeaderService = needAssessmentHeaderService;
     _needAssessmentDetailService = needAssessmentDetailService;
     _seasonService = seasonService;
     _typeOfNeedAssessmentService = typeOfNeedAssessmentService;
     _log           = log;
     _planService   = planService;
     _commonService = commonService;
 }
 public LogisticsStockStatusController
 (
     IUnitOfWork unitOfWork,
     IUserDashboardPreferenceService userDashboardPreferenceService,
     IDashboardWidgetService dashboardWidgetservice,
     IUserAccountService userService,
     IHubService hubService,
     IStockStatusService stockStatusService, IAdminUnitService adminUnitService, IProgramService programService, IDonorService donorService)
 {
     _unitOfWork = unitOfWork;
     _userDashboardPreferenceService = userDashboardPreferenceService;
     _dashboardWidgetService         = dashboardWidgetservice;
     _userService        = userService;
     _hubService         = hubService;
     _stockStatusService = stockStatusService;
     _adminUnitService   = adminUnitService;
     _programService     = programService;
     _donorService       = donorService;
 }
Esempio n. 42
0
        //
        // GET: /StockManagement/
        public StockManagementController(IUserProfileService userProfileService, IProgramService programService,
                                         ICommodityTypeService commodityTypeService, ICommoditySourceService commoditySourceService,
                                         IProjectCodeService projectCodeService, IShippingInstructionService shippingInstructionService,
                                         IReceiveService receiveService, IStoreService storeService, IHubService hubService,
                                         IAdminUnitService adminUnitService, IDispatchAllocationService dispatchAllocationService, IDonorService donorService)
        {
            _userProfileService         = userProfileService;
            _programService             = programService;
            _commodityTypeService       = commodityTypeService;
            _commoditySourceService     = commoditySourceService;
            _projectCodeService         = projectCodeService;
            _shippingInstructionService = shippingInstructionService;
            _receiveService             = receiveService;

            _storeService              = storeService;
            _hubService                = hubService;
            _adminUnitService          = adminUnitService;
            _dispatchAllocationService = dispatchAllocationService;
            _donorService              = donorService;
        }
        //
        // GET: /StockManagement/
        public StockManagementController(IUserProfileService userProfileService, IProgramService programService,
            ICommodityTypeService commodityTypeService, ICommoditySourceService commoditySourceService, 
            IProjectCodeService projectCodeService, IShippingInstructionService shippingInstructionService, 
            IReceiveService receiveService, IStoreService storeService, IHubService hubService,
            IAdminUnitService adminUnitService, IDispatchAllocationService dispatchAllocationService, IDonorService donorService)
        {
            _userProfileService = userProfileService;
            _programService = programService;
            _commodityTypeService = commodityTypeService;
            _commoditySourceService = commoditySourceService;
            _projectCodeService = projectCodeService;
            _shippingInstructionService = shippingInstructionService;
            _receiveService = receiveService;

            _storeService = storeService;
            _hubService = hubService;
            _adminUnitService = adminUnitService;
            _dispatchAllocationService = dispatchAllocationService;
            _donorService = donorService;
        }
Esempio n. 44
0
        public RFQController(ITransportBidPlanService transportBidPlanServiceParam
                             , IAdminUnitService adminUnitServiceParam
                             , IProgramService programServiceParam
                             , ITransportBidPlanDetailService transportBidPlanDetailServiceParam
                             , IHubService hubServiceParam
                             , ITransportBidQuotationService bidQuotationServiceParam
                             , ITransporterService transporterServiceParam
                             , IBidService bidServiceParam
                             , IUserAccountService userAccountService)

        {
            this._transportBidPlanService       = transportBidPlanServiceParam;
            this._adminUnitService              = adminUnitServiceParam;
            this._programService                = programServiceParam;
            this._transportBidPlanDetailService = transportBidPlanDetailServiceParam;
            this._hubService          = hubServiceParam;
            this._bidQuotationService = bidQuotationServiceParam;
            this._bidService          = bidServiceParam;
            this._transporterService  = transporterServiceParam;
            this._userAccountService  = userAccountService;
        }
Esempio n. 45
0
 public HomeController(IReliefRequisitionService reliefRequisitionService,
     hub.IDispatchAllocationService dispatchAllocationService,
     IUserAccountService userAccountService,
     ITransportOrderService transportOrderService,
     ITransportOrderDetailService transportOrderDetailService,
     hub.DispatchService dispatchService,
     hub.DispatchDetailService dispatchDetailService, ISIPCAllocationService sipcAllocationService, IAdminUnitService adminUnitService, IHRDService hrdService, IBidWinnerService bidWinnerService, IBidService bidService)
 {
     this._reliefRequisitionService = reliefRequisitionService;
     _dispatchAllocationService = dispatchAllocationService;
     _userAccountService = userAccountService;
     _transportOrderService = transportOrderService;
     _transportOrderDetailService = transportOrderDetailService;
     _dispatchService = dispatchService;
     _dispatchDetailService = dispatchDetailService;
     _sipcAllocationService = sipcAllocationService;
     _adminUnitService = adminUnitService;
     _hrdService = hrdService;
     _bidWinnerService = bidWinnerService;
     _bidService = bidService;
 }
Esempio n. 46
0
 public HRDController(IAdminUnitService adminUnitService, IHRDService hrdService,
                      IRationService rationservice, IRationDetailService rationDetailService,
                      IHRDDetailService hrdDetailService, ICommodityService commodityService,
                      INeedAssessmentDetailService needAssessmentDetailService, INeedAssessmentHeaderService needAssessmentService,
                      IWorkflowStatusService workflowStatusService, ISeasonService seasonService, 
                      IUserAccountService userAccountService, ILog log,IPlanService planService)
 {
     _adminUnitService = adminUnitService;
     _hrdService = hrdService;
     _hrdDetailService = hrdDetailService;
     _commodityService = commodityService;
     _rationService = rationservice;
     _rationDetailService = rationDetailService;
     _needAssessmentDetailService = needAssessmentDetailService;
     _needAssessmentService = needAssessmentService;
     _workflowStatusService = workflowStatusService;
     _seasonService = seasonService;
     _userAccountService = userAccountService;
     _log = log;
     _planService = planService;
 }
Esempio n. 47
0
 public HRDController(IAdminUnitService adminUnitService, IHRDService hrdService,
                      IRationService rationservice, IRationDetailService rationDetailService,
                      IHRDDetailService hrdDetailService, ICommodityService commodityService,
                      INeedAssessmentDetailService needAssessmentDetailService, INeedAssessmentHeaderService needAssessmentService,
                      IWorkflowStatusService workflowStatusService, ISeasonService seasonService,
                      IUserAccountService userAccountService, ILog log, IPlanService planService, ITransactionService transactionService)
 {
     _adminUnitService            = adminUnitService;
     _hrdService                  = hrdService;
     _hrdDetailService            = hrdDetailService;
     _commodityService            = commodityService;
     _rationService               = rationservice;
     _rationDetailService         = rationDetailService;
     _needAssessmentDetailService = needAssessmentDetailService;
     _needAssessmentService       = needAssessmentService;
     _workflowStatusService       = workflowStatusService;
     _seasonService               = seasonService;
     _userAccountService          = userAccountService;
     _log                = log;
     _planService        = planService;
     _transactionService = transactionService;
 }
Esempio n. 48
0
 public HomeController(IReliefRequisitionService reliefRequisitionService,
                       hub.IDispatchAllocationService dispatchAllocationService,
                       IUserAccountService userAccountService,
                       ITransportOrderService transportOrderService,
                       ITransportOrderDetailService transportOrderDetailService,
                       hub.DispatchService dispatchService,
                       hub.DispatchDetailService dispatchDetailService,
                       ISIPCAllocationService sipcAllocationService,
                       IAdminUnitService adminUnitService,
                       IHRDService hrdService,
                       IBidWinnerService bidWinnerService,
                       IBidService bidService,
                       IHRDDetailService hrdDetailService,
                       IRationDetailService rationDetailService,
                       IProgramService programService,
                       IStockStatusService stockStatusService, IReceiptPlanDetailService receiptPlanDetailService, IDeliveryService deliveryService, IGiftCertificateDetailService giftCertificateDetailService, hub.IReceiptAllocationService receiptAllocationService)
 {
     this._reliefRequisitionService = reliefRequisitionService;
     _dispatchAllocationService     = dispatchAllocationService;
     _userAccountService            = userAccountService;
     _transportOrderService         = transportOrderService;
     _transportOrderDetailService   = transportOrderDetailService;
     _dispatchService              = dispatchService;
     _dispatchDetailService        = dispatchDetailService;
     _sipcAllocationService        = sipcAllocationService;
     _adminUnitService             = adminUnitService;
     _hrdService                   = hrdService;
     _bidWinnerService             = bidWinnerService;
     _bidService                   = bidService;
     _hrdDetailService             = hrdDetailService;
     _rationDetailService          = rationDetailService;
     _programService               = programService;
     _stockStatusService           = stockStatusService;
     _receiptPlanDetailService     = receiptPlanDetailService;
     _deliveryService              = deliveryService;
     _giftCertificateDetailService = giftCertificateDetailService;
     _receiptAllocationService     = receiptAllocationService;
 }
Esempio n. 49
0
 public HomeController(IReliefRequisitionService reliefRequisitionService,
     hub.IDispatchAllocationService dispatchAllocationService,
     IUserAccountService userAccountService,
     ITransportOrderService transportOrderService,
     ITransportOrderDetailService transportOrderDetailService,
     hub.DispatchService dispatchService,
     hub.DispatchDetailService dispatchDetailService,
     ISIPCAllocationService sipcAllocationService,
     IAdminUnitService adminUnitService,
     IHRDService hrdService,
     IBidWinnerService bidWinnerService,
     IBidService bidService,
     IHRDDetailService hrdDetailService,
     IRationDetailService rationDetailService,
     IProgramService programService,
     IStockStatusService stockStatusService, IReceiptPlanDetailService receiptPlanDetailService, IDeliveryService deliveryService, IGiftCertificateDetailService giftCertificateDetailService, hub.IReceiptAllocationService receiptAllocationService)
 {
     this._reliefRequisitionService = reliefRequisitionService;
     _dispatchAllocationService = dispatchAllocationService;
     _userAccountService = userAccountService;
     _transportOrderService = transportOrderService;
     _transportOrderDetailService = transportOrderDetailService;
     _dispatchService = dispatchService;
     _dispatchDetailService = dispatchDetailService;
     _sipcAllocationService = sipcAllocationService;
     _adminUnitService = adminUnitService;
     _hrdService = hrdService;
     _bidWinnerService = bidWinnerService;
     _bidService = bidService;
     _hrdDetailService = hrdDetailService;
     _rationDetailService = rationDetailService;
     _programService = programService;
     _stockStatusService = stockStatusService;
     _receiptPlanDetailService = receiptPlanDetailService;
     _deliveryService = deliveryService;
     _giftCertificateDetailService = giftCertificateDetailService;
     _receiptAllocationService = receiptAllocationService;
 }
Esempio n. 50
0
 public BidController(IBidService bidService, IBidDetailService bidDetailService,
                      IAdminUnitService adminUnitService,
                      IStatusService statusService,
                      ITransportBidPlanService transportBidPlanService,
                      ITransportBidPlanDetailService transportBidPlanDetailService,
                      IApplicationSettingService applicationSettingService, IUserAccountService userAccountService,
                      ITransportBidQuotationService transportBidQuotationService, IBidWinnerService bidWinnerService,
                      ITransporterService transporterService, IHubService hubService, IWorkflowStatusService workflowStatusService)
 {
     _bidService                    = bidService;
     _bidDetailService              = bidDetailService;
     _adminUnitService              = adminUnitService;
     _statusService                 = statusService;
     _transportBidPlanService       = transportBidPlanService;
     _transportBidPlanDetailService = transportBidPlanDetailService;
     _applicationSettingService     = applicationSettingService;
     _userAccountService            = userAccountService;
     _transportBidQuotationService  = transportBidQuotationService;
     _bidWinnerService              = bidWinnerService;
     _transporterService            = transporterService;
     _hubService                    = hubService;
     _workflowStatusService         = workflowStatusService;
 }
Esempio n. 51
0
 public BidController(IBidService bidService, IBidDetailService bidDetailService,
                      IAdminUnitService adminUnitService,
                      IStatusService statusService,
                      ITransportBidPlanService transportBidPlanService,
                      ITransportBidPlanDetailService transportBidPlanDetailService,
                      IApplicationSettingService applicationSettingService,IUserAccountService userAccountService,
                      ITransportBidQuotationService transportBidQuotationService, IBidWinnerService bidWinnerService,
                     ITransporterService transporterService, IHubService hubService,IWorkflowStatusService workflowStatusService)
 {
     _bidService = bidService;
     _bidDetailService = bidDetailService;
     _adminUnitService = adminUnitService;
     _statusService = statusService;
     _transportBidPlanService = transportBidPlanService;
     _transportBidPlanDetailService = transportBidPlanDetailService;
     _applicationSettingService = applicationSettingService;
     _userAccountService = userAccountService;
     _transportBidQuotationService = transportBidQuotationService;
     _bidWinnerService = bidWinnerService;
     _transporterService = transporterService;
     _hubService = hubService;
     _workflowStatusService = workflowStatusService;
 }
Esempio n. 52
0
 public HomeController(IUserProfileService userProfileService, IAdminUnitService adminUnitService, IHubService hubService)
     : base(userProfileService)
 {
     _adminUnitService = adminUnitService;
     _hubService       = hubService;
 }
Esempio n. 53
0
 public TransporterController(ITransporterService transportServiceParam, IAdminUnitService adminUnitService)
 {
     this.transportService  = transportServiceParam;
     this._adminUnitService = adminUnitService;
 }
Esempio n. 54
0
 public FDPController(IFDPService FDPServiceParam, IAdminUnitService adminUnitService)
 {
     this._FDPService  = FDPServiceParam;
     _adminUnitService = adminUnitService;
 }
Esempio n. 55
0
        public RequestControllerTest()
        {
            List <RegionalRequest> regionalRequestTest = new List <RegionalRequest>();

            {
                new RegionalRequest {
                    RegionalRequestID = 1, ProgramId = 1, Round = 2, RegionID = 9, ReferenceNumber = "AA1234", Year = 2012, Remark = "remarks"
                };
                new RegionalRequest {
                    RegionalRequestID = 2, ProgramId = 2, Round = 4, RegionID = 7, ReferenceNumber = "1234", Year = 2012, Remark = ""
                };
            }
            ;
            List <AdminUnit> adminUnitTest = new List <AdminUnit>();

            {
                new AdminUnit()
                {
                    AdminUnitID = 1, Name = "Afar", NameAM = null, AdminUnitTypeID = 2, ParentID = 1
                };
            }
            ;
            List <Commodity> commodityTest = new List <Commodity>
            {
                new Commodity {
                    CommodityID = 5, Name = "Grain", LongName = "", CommodityTypeID = 1, ParentID = 1
                },
                new Commodity {
                    CommodityID = 6, Name = "Oil", LongName = "", CommodityTypeID = 1, ParentID = 1
                },
                new Commodity {
                    CommodityID = 8, Name = "CSB", LongName = "", CommodityTypeID = 1, ParentID = 3
                },
            };

            //Mock the Regional Request Service Using Moq
            Mock <IRegionalRequestService>       mockRegionalRequestService       = new Mock <IRegionalRequestService>();
            Mock <IFDPService>                   mockFDPService                   = new Mock <IFDPService>();
            Mock <IAdminUnitService>             mockAdminUnitService             = new Mock <IAdminUnitService>();
            Mock <IProgramService>               mockProgramService               = new Mock <IProgramService>();
            Mock <ICommodityService>             mockCommodityService             = new Mock <ICommodityService>();
            Mock <IRegionalRequestDetailService> mockRegionalRequestDetailService = new Mock <IRegionalRequestDetailService>();



            // return all regional requests
            mockRegionalRequestService.Setup(m => m.GetAllReliefRequistion()).Returns(regionalRequestTest);
            mockRegionalRequestService.Setup(m => m.Get(t => t.RegionalRequestID == 2, null, null));

            mockFDPService.Setup(m => m.GetAllFDP()).Returns(new List <FDP>());
            mockAdminUnitService.Setup(m => m.FindBy(au => au.AdminUnitTypeID == 2)).Returns(adminUnitTest);
            mockProgramService.Setup(m => m.GetAllProgram()).Returns(new List <Program>());
            mockCommodityService.Setup(m => m.GetAllCommodity()).Returns(commodityTest);


            //return regional requests by id
            mockRegionalRequestService.Setup(mr => mr.FindById(
                                                 It.IsAny <int>())).Returns((int i) => regionalRequestTest.Single(x => x.RegionalRequestID == i));

            this.MockRegionalRequestService       = mockRegionalRequestService.Object;
            this.MockAdminUnitService             = mockAdminUnitService.Object;
            this.MockFdpService                   = mockFDPService.Object;
            this.MockProgramService               = mockProgramService.Object;
            this.MockCommodityService             = mockCommodityService.Object;
            this.MockRegionalRequestDetailService = mockRegionalRequestDetailService.Object;
        }
Esempio n. 56
0
        // private readonly IFDPService _fdpService;

        public AdminUnitController(IAdminUnitService adminUnitService)
        {
            _adminUnitService = adminUnitService;
        }
Esempio n. 57
0
        public void SetUp()
        {
            List <Bid> bidTest = new List <Bid>();
            {
                new Bid()
                {
                    BidID = 1, BidNumber = "PP452", StartDate = new DateTime(2012 / 10 / 10), EndDate = new DateTime(2013 / 12 / 11), OpeningDate = new DateTime(2013 / 12 / 12), StatusID = 1
                };
                new Bid()
                {
                    BidID = 2, BidNumber = "AAA123", StartDate = new DateTime(2012 / 10 / 10), EndDate = new DateTime(2013 / 12 / 11), OpeningDate = new DateTime(2012 / 11 / 13), StatusID = 2
                };
                new Bid()
                {
                    BidID = 3, BidNumber = "QW123", StartDate = new DateTime(2012 / 10 / 10), EndDate = new DateTime(2013 / 12 / 11), OpeningDate = new DateTime(2012 / 05 / 06), StatusID = 1
                };
            }

            List <AdminUnit> adminUnitTest = new List <AdminUnit>();
            {
                new AdminUnit()
                {
                    AdminUnitID = 1, Name = "Afar", NameAM = null, AdminUnitTypeID = 2, ParentID = 1
                };
            }


            List <BidDetail> bidDetailTest = new List <BidDetail>();
            {
                new BidDetail()
                {
                    BidDetailID            = 1,
                    BidID                  = 1,
                    AmountForPSNPProgram   = 200,
                    AmountForReliefProgram = 300,
                    BidDocumentPrice       = 10,
                    CPO = 1000
                };
                new BidDetail()
                {
                    BidDetailID            = 2,
                    BidID                  = 1,
                    AmountForPSNPProgram   = 200,
                    AmountForReliefProgram = 300,
                    BidDocumentPrice       = 10,
                    CPO = 1000
                };
            }


            //Mock the Regional Request Service Using Moq
            Mock <IBidService>       mockBidService       = new Mock <IBidService>();
            Mock <IBidDetailService> mockBidDetailService = new Mock <IBidDetailService>();
            Mock <IAdminUnitService> mockAdminUnitService = new Mock <IAdminUnitService>();

            //Mock<IStatusService> mockStatusService=new Mock<IStatusService>();
            //Mock<ITransportBidPlanService> mockTransportBidPlanService=new Mock<ITransportBidPlanService>();
            //Mock<ITransportBidPlanDetailService> mockTransportBidPlanDetailService = new Mock<ITransportBidPlanDetailService>();

            mockBidService.Setup(m => m.GetAllBid()).Returns(bidTest);
            mockAdminUnitService.Setup(m => m.FindBy(au => au.AdminUnitTypeID == 2)).Returns(adminUnitTest);
            mockBidDetailService.Setup(m => m.GetAllBidDetail()).Returns(bidDetailTest);


            this.MockAdminUnitService = mockAdminUnitService.Object;
            this.MockBidService       = mockBidService.Object;
            this.MockBidDetail        = mockBidDetailService.Object;

            var userAccountService = new Mock <IUserAccountService>();

            userAccountService.Setup(t => t.GetUserInfo(It.IsAny <string>())).Returns(new UserInfo()
            {
                UserName       = "******",
                DatePreference = "en"
            });
            var fakeContext = new Mock <HttpContextBase>();
            var identity    = new GenericIdentity("User");
            var principal   = new GenericPrincipal(identity, null);

            fakeContext.Setup(t => t.User).Returns(principal);
            var controllerContext = new Mock <ControllerContext>();

            controllerContext.Setup(t => t.HttpContext).Returns(fakeContext.Object);

            var transportBidQuotationService = new Mock <ITransportBidQuotationService>();

            transportBidQuotationService.Setup(m => m.GetAllTransportBidQuotation()).Returns(new List <TransportBidQuotation>
            {
                new TransportBidQuotation()
                {
                    BidID = 1, DestinationID = 1, TransportBidQuotationID = 1
                }
            });

            var bidWinner = new List <BidWinner>
            {
                new BidWinner
                {
                    BidWinnerID   = 1,
                    BidID         = 1,
                    DestinationID = 23,
                    SourceID      = 4,
                    Tariff        = 12,
                    Position      = 1,
                    Bid           = new Bid
                    {
                        BidID              = 1,
                        StartDate          = new DateTime(12 / 12 / 2004),
                        EndDate            = new DateTime(12 / 12 / 2005),
                        TransportBidPlanID = 1
                    }
                }
            };
            var bidWinnerService = new Mock <IBidWinnerService>();

            bidWinnerService.Setup(m => m.GetAllBidWinner()).Returns(bidWinner);

            var transporter = new List <Transporter>()
            {
                new Transporter()
                {
                    TransporterID = 1,
                    Name          = "Bert",
                    Region        = 4,
                    SubCity       = "Arada",
                    Zone          = 1,
                    MobileNo      = "09123786554",
                    Capital       = 20000
                }
            };

            var transporterService = new Mock <ITransporterService>();

            transporterService.Setup(m => m.GetAllTransporter()).Returns(transporter);
            var hub = new List <Hub>
            {
                new Hub()
                {
                    HubID = 1, Name = "Adama", HubOwnerID = 1
                },
                new Hub()
                {
                    HubID = 2, Name = "Dire Dawa", HubOwnerID = 1
                }
            };

            var workFlowStatus = new List <WorkflowStatus>
            {
                new WorkflowStatus {
                    Description = "Draft",
                    StatusID    = 1,
                    WorkflowID  = 8
                },
                new WorkflowStatus
                {
                    Description = "Approved",
                    StatusID    = 2,
                    WorkflowID  = 8
                },
                new WorkflowStatus
                {
                    Description = "Signed",
                    StatusID    = 3,
                    WorkflowID  = 8
                },
                new WorkflowStatus
                {
                    Description = "Disqualified",
                    StatusID    = 4,
                    WorkflowID  = 8
                }
            };
            var workFlowStatusService = new Mock <IWorkflowStatusService>();

            var hubService = new Mock <IHubService>();

            hubService.Setup(m => m.GetAllHub()).Returns(hub);
            _bidController = new BidController(MockBidService, MockBidDetail, MockAdminUnitService, MockStatusService,
                                               MockTransportBidPlanService, MockTransportBidPlanDetailService, MockApplicationSetting,
                                               userAccountService.Object, transportBidQuotationService.Object, bidWinnerService.Object,
                                               transporterService.Object, hubService.Object, workFlowStatusService.Object);
            _bidController.ControllerContext = controllerContext.Object;
        }
Esempio n. 58
0
        public void SetUp()
        {
            List<Bid> bidTest = new List<Bid>();
              {
                  new Bid() { BidID=1,BidNumber ="PP452",StartDate=new DateTime(2012/10/10),EndDate=new DateTime(2013/12/11),OpeningDate = new DateTime(2013/12/12),StatusID =1};
                  new Bid() { BidID = 2,BidNumber ="AAA123",StartDate = new DateTime(2012 / 10 / 10), EndDate = new DateTime(2013 / 12 / 11),OpeningDate = new DateTime(2012/11/13),StatusID =2};
                  new Bid() { BidID = 3,BidNumber="QW123",StartDate = new DateTime(2012 / 10 / 10), EndDate = new DateTime(2013 / 12 / 11),OpeningDate = new DateTime(2012/05/06),StatusID =1};
              }

             List<AdminUnit> adminUnitTest=new List<AdminUnit>();
              {
                  new AdminUnit() {AdminUnitID = 1, Name = "Afar", NameAM = null, AdminUnitTypeID = 2, ParentID = 1};
              }

            List<BidDetail> bidDetailTest=new List<BidDetail>();
              {
                  new BidDetail()
                      {
                          BidDetailID = 1,
                          BidID = 1,
                          AmountForPSNPProgram = 200,
                          AmountForReliefProgram = 300,
                          BidDocumentPrice = 10,
                          CPO = 1000
                      };
                  new BidDetail()
                  {
                      BidDetailID = 2,
                      BidID = 1,
                      AmountForPSNPProgram = 200,
                      AmountForReliefProgram = 300,
                      BidDocumentPrice = 10,
                      CPO = 1000
                  };
              }

             //Mock the Regional Request Service Using Moq
            Mock<IBidService> mockBidService = new Mock<IBidService>();
            Mock<IBidDetailService> mockBidDetailService=new Mock<IBidDetailService>();
            Mock<IAdminUnitService> mockAdminUnitService=new Mock<IAdminUnitService>();
            //Mock<IStatusService> mockStatusService=new Mock<IStatusService>();
            //Mock<ITransportBidPlanService> mockTransportBidPlanService=new Mock<ITransportBidPlanService>();
            //Mock<ITransportBidPlanDetailService> mockTransportBidPlanDetailService = new Mock<ITransportBidPlanDetailService>();

            mockBidService.Setup(m => m.GetAllBid()).Returns(bidTest);
            mockAdminUnitService.Setup(m => m.FindBy(au => au.AdminUnitTypeID==2)).Returns(adminUnitTest);
            mockBidDetailService.Setup(m => m.GetAllBidDetail()).Returns(bidDetailTest);

            this.MockAdminUnitService = mockAdminUnitService.Object;
            this.MockBidService = mockBidService.Object;
            this.MockBidDetail = mockBidDetailService.Object;

            var userAccountService = new Mock<IUserAccountService>();
            userAccountService.Setup(t => t.GetUserInfo(It.IsAny<string>())).Returns(new UserInfo()
            {
                UserName = "******",
                DatePreference = "en"
            });
            var fakeContext = new Mock<HttpContextBase>();
            var identity = new GenericIdentity("User");
            var principal = new GenericPrincipal(identity, null);
            fakeContext.Setup(t => t.User).Returns(principal);
            var controllerContext = new Mock<ControllerContext>();
            controllerContext.Setup(t => t.HttpContext).Returns(fakeContext.Object);

            var transportBidQuotationService = new Mock<ITransportBidQuotationService>();
            transportBidQuotationService.Setup(m => m.GetAllTransportBidQuotation()).Returns(new List <TransportBidQuotation>
                {
                    new TransportBidQuotation() {BidID = 1,DestinationID = 1,TransportBidQuotationID = 1}
                });

             var bidWinner = new List<BidWinner>
            {
                new BidWinner
                    {
                        BidWinnerID = 1,
                        BidID = 1,
                        DestinationID = 23,
                        SourceID = 4,
                        Tariff = 12,
                        Position = 1,
                        Bid = new Bid
                            {
                                BidID = 1,
                                StartDate = new DateTime(12/12/2004),
                                EndDate = new DateTime(12/12/2005),
                                TransportBidPlanID = 1
                            }

                    }
            };
            var bidWinnerService = new Mock<IBidWinnerService>();
            bidWinnerService.Setup(m => m.GetAllBidWinner()).Returns(bidWinner);

             var transporter = new List<Transporter>()
                                  {
                                      new Transporter()
                                          {
                                                          TransporterID = 1,
                                                          Name = "Bert",
                                                          Region = 4,
                                                          SubCity = "Arada",
                                                          Zone = 1,
                                                          MobileNo = "09123786554",
                                                          Capital = 20000
                                          }
                                  };

            var transporterService = new Mock<ITransporterService>();
            transporterService.Setup(m => m.GetAllTransporter()).Returns(transporter);
            var hub = new List<Hub>
                {
                    new Hub() {HubID = 1, Name = "Adama", HubOwnerID = 1},
                    new Hub() {HubID = 2, Name = "Dire Dawa", HubOwnerID = 1}
                };

             var workFlowStatus = new List<WorkflowStatus>
                {
                     new WorkflowStatus {
                                          Description = "Draft",
                                          StatusID = 1,
                                          WorkflowID = 8
                                        },
                                  new WorkflowStatus
                                      {
                                          Description = "Approved",
                                          StatusID = 2,
                                          WorkflowID = 8
                                      },
                                  new WorkflowStatus
                                      {
                                          Description = "Signed",
                                          StatusID = 3,
                                          WorkflowID = 8
                                      },
                                          new WorkflowStatus
                                      {
                                          Description = "Disqualified",
                                          StatusID = 4,
                                          WorkflowID = 8
                                      }
                };
             var workFlowStatusService = new Mock<IWorkflowStatusService>();

            var hubService = new Mock<IHubService>();
            hubService.Setup(m => m.GetAllHub()).Returns(hub);
            _bidController = new BidController(MockBidService, MockBidDetail, MockAdminUnitService, MockStatusService,
                                            MockTransportBidPlanService,MockTransportBidPlanDetailService,MockApplicationSetting,
                                            userAccountService.Object,transportBidQuotationService.Object,bidWinnerService.Object,
                                            transporterService.Object, hubService.Object, workFlowStatusService.Object);
            _bidController.ControllerContext = controllerContext.Object;
        }
Esempio n. 59
0
 public FDPController(IFDPService FDPServiceParam, IAdminUnitService adminUnitService)
 {
     this._FDPService = FDPServiceParam;
     _adminUnitService = adminUnitService;
 }
Esempio n. 60
0
 public FDPController(IAdminUnitService adminUnitService, IFDPService fdpService)
 {
     _adminUnitService = adminUnitService;
     _fdpService       = fdpService;
 }