コード例 #1
0
ファイル: OrdersController.cs プロジェクト: Dnigor/mycnew
 public OrdersController(
     IQuartetClientFactory                       clientFactory,
     IMappingService<Order,    OrderViewModel>   orderMapping,
     IMappingService<Customer, HCardViewModel>   hcardMapping,
     IMappingService<Address,  AddressViewModel> addressMapping,
     IMailingService                             mailingService,
     IInvoicingService                           invoicingService,
     IFeaturesConfigService                      featuresConfigService,
     IAppSettings                                appSettings,
     IConsultantContext                          consultantContext,
     IConsultantDataServiceClientFactory         consultantDataServiceClientFactory,
     IPromotionService                           promotionService,
     IProductCatalogClientFactory                productCatalogClientFactory,
     IInventoryService                           inventoryService,
     ISubsidiaryAccessor                         subsidiaryAccessor
 )
 {
     _clientFactory                      = clientFactory;
     _orderMapping                       = orderMapping;
     _hcardMapping                       = hcardMapping;
     _addressMapping                     = addressMapping;
     _mailingService                     = mailingService;
     _invoicingService                   = invoicingService;
     _featuresConfigService              = featuresConfigService;
     _appSettings                        = appSettings;
     _consultantContext                  = consultantContext;
     _consultantDataServiceClientFactory = consultantDataServiceClientFactory;
     _promotionService                   = promotionService;
     _productCatalogClientFactory        = productCatalogClientFactory;
     _inventoryService                   = inventoryService;
     _subsidiaryAccessor                 = subsidiaryAccessor;
 }
コード例 #2
0
 public InvoiceController(IMapper mapper,
                          ILogger <InvoiceController> logger,
                          IInvoicingService invoicingService)
 {
     _mapper           = mapper;
     _logger           = logger;
     _invoicingService = invoicingService;
 }
コード例 #3
0
ファイル: OrdersController.cs プロジェクト: losol/eventuras
 public OrdersController(
     IOrderService orderService,
     IInvoicingService invoicingService,
     IOrderRetrievalService orderRetrievalService)
 {
     _orderService          = orderService;
     _invoicingService      = invoicingService;
     _orderRetrievalService = orderRetrievalService;
 }
コード例 #4
0
ファイル: ScrubbingService.cs プロジェクト: robgray/Tucana
 public ScrubbingService(IInvoicingService invoicingService, IContractRepository contractRepository,                                
     Import.ICallDataImportManager importManager, IAccountRepository accountRepository,
     IInvoiceRepository invoiceRepository)
 {
     _invoicingService = invoicingService;
     _contractRepository = contractRepository;
     _importManager = importManager;
     _accountRepository = accountRepository;
     _invoiceRepository = invoiceRepository;
 }
コード例 #5
0
ファイル: AccountService.cs プロジェクト: robgray/Tucana
 public AccountService(IAccountRepository accountRepository, IContactRepository contactRepository, ICompanyRepository companyRepository, 
     INumberGeneratorService generatorService, IInvoiceRepository invoiceRepository, IInvoicingService invoicingService)
 {
     _accountRepository = accountRepository;
     _contactRepository = contactRepository;
     _companyRepository = companyRepository;
     _generator = generatorService;
     _invoiceRepository = invoiceRepository;
     _invoicingService = invoicingService;
 }
コード例 #6
0
 public HomeController(IInvoicingService ylService)
 {
     _ylService = ylService;
 }
コード例 #7
0
ファイル: ScrubbingService.cs プロジェクト: robgray/Tucana
        public ResponseBase ScrubContract(Contract contract)
        {
            if (_invoicingService == null) _invoicingService = ServiceFactory.GetService<IInvoicingService>(); // yuk hack

            var response = new ResponseBase();
            if (_invoicingService.HasContractBeenInvoiced(contract)) {
                response.IsSuccessful = false;
                response.Message = "This Contract has been invoiced.  Cannot scrub data.";

                return response;
            }

            try
            {
                LoggingUtility.LogDebug("ScrubContract", "ScrubbingService", string.Format("Scrubbing Contract Number {0}.  Phone 1: {1}", contract.ContractNumber, contract.PhoneNumber1));

                response.IsSuccessful = _contractRepository.Delete(contract);
                _importManager.RescanForContracts();

                LoggingUtility.LogDebug("ScrubContract", "ScrubbingService", string.Format("Scrubbing completed for Contract Number {0}.  Phone 1: {1}", contract.ContractNumber, contract.PhoneNumber1));

            } catch (Exception ex) {

                LoggingUtility.LogException(ex);
                LoggingUtility.LogDebug("ScrubContract", "ScrubbingService", string.Format("Scrubbing Failed for Contract Number {0}.  Phone 1: {1}", contract.ContractNumber, contract.PhoneNumber1));
            }

            return response;
        }
コード例 #8
0
ファイル: ScrubbingService.cs プロジェクト: robgray/Tucana
        /// <summary>
        /// Delete's all evidence of a Customer having been in the sytem.
        /// </summary>
        /// <param name="account">Single account to delete</param>        
        public ResponseBase ScrubCustomer(Account account)
        {
            if (_invoicingService == null) _invoicingService = ServiceFactory.GetService<IInvoicingService>(); // yuk hack

            var response = new ResponseBase();

            // Does account have more than one contract?
            var contracts = _contractRepository.GetContractsByAccountId(account.Id.Value);

            if (contracts.Count == 0)
            {
                response.IsSuccessful = false;
                return response;
            }

            response = CanScrubCustomer(account);
            if (!response.IsSuccessful) return response;

            // Delete Invoices
            if (!DeleteInvoices(account)) {
                response.IsSuccessful = false;
                response.Message = "Could not delete Invoices";
                return response;
            }

            // Call normal Scrub Contract
            return ScrubContract(contracts[0]);
        }
コード例 #9
0
ファイル: HomeController.cs プロジェクト: xiongyingjie/qm.net
 public HomeController(IInvoicingService invoicingService)
 {
     _invoicingService = invoicingService;
 }
コード例 #10
0
 public InvoicingController()
 {
     _sessionHelper    = new SessionHelper();
     _invoicingService = new ServicesFactory(_sessionHelper).GetInvoicingServince();
 }