public AppContext()
        {
            _appProfile = AppProfile.FromConfig();

            _dataSourceConfig = new DataSourceConfig(
                _appProfile.DataSource,
                _appProfile.Database,
                _appProfile.Username,
                _appProfile.Password
                );

            _addressRepository     = new AddressRepository(_dataSourceConfig);
            _billingInfoRepository = new BillingInfoRepository(_dataSourceConfig, _addressRepository);
            _contactInfoRepository = new ContactInfoRepository(_dataSourceConfig);
            _supplierRepository    = new SupplierRepository(_dataSourceConfig, _billingInfoRepository, _contactInfoRepository);
            _receiverRepository    = new ReceiverRepository(_dataSourceConfig, _billingInfoRepository, _contactInfoRepository);
            _itemRepository        = new InvoiceItemRepository(_dataSourceConfig);
            _paymentRepository     = new InvoicePaymentRepository(_dataSourceConfig);
            _invoiceRepository     = new InvoiceRepository(_dataSourceConfig, _supplierRepository, _receiverRepository, _itemRepository, _paymentRepository
                                                           );

            _addressService     = new AddressService(_addressRepository);
            _billingInfoService = new BillingInfoService(_billingInfoRepository);
            _contactInfoService = new ContactInfoService(_contactInfoRepository);
            _supplierService    = new SupplierService(_supplierRepository);
            _receiverService    = new ReceiverService(_receiverRepository);
            _itemService        = new InvoiceItemService(_itemRepository);
            _paymentService     = new InvoicePaymentService(_paymentRepository);
            _invoiceService     = new InvoiceService(_invoiceRepository);
        }
 public InvoicesController(IInvoiceService invoiceService, IPatronService patronService, IProductService productService, IMapper<Invoice, InvoiceDTO> mapper)
 {
     _invoiceService = invoiceService;
     _patronService = patronService;
     _productService = productService;
     _mapper = mapper;
 }
 /// <summary></summary>
 public InvoicesController(
     IUnitOfWorkAsync unitOfWorkAsync,
     IInvoiceService service)
 {
     _unitOfWorkAsync = unitOfWorkAsync;
     _service         = service;
 }
Exemple #4
0
 public ConsultaCesionModel(IHostingEnvironment environment, IInvoiceService invoiceService, IAuthService aS, IGlobalService gS)
 {
     _invoiceService = invoiceService;
     _environment    = environment;
     this._gS        = gS;
     this._aS        = aS;
 }
Exemple #5
0
 public ActionResult ajxPreview(int idInvoice, string pattern)
 {
     try
     {
         Company         currentCom = ((EInvoiceContext)FXContext.Current).CurrentCompany;
         IInvoiceService IInvSrv    = InvServiceFactory.GetService(pattern, currentCom.id);
         logtest.Info("call: " + idInvoice + " pattern: " + pattern + " company: " + currentCom.id);
         IInvoice oInvoice = IInvSrv.Getbykey <IInvoice>(idInvoice);
         //IViewer _iViewerSrv = IoC.Resolve<IViewer>();
         IViewer _iViewerSrv = InvServiceFactory.GetViewer(pattern, currentCom.id);
         if (oInvoice.Status != InvoiceStatus.NewInv)
         {
             IRepositoryINV _iRepoSrv = IoC.Resolve <IRepositoryINV>();
             byte[]         data      = _iRepoSrv.GetData(oInvoice);
             return(Json(new { invData = _iViewerSrv.GetHtml(data), status = oInvoice.Status }));
         }
         else
         {
             return(Json(new { invData = _iViewerSrv.GetHtml(System.Text.Encoding.UTF8.GetBytes(oInvoice.GetXMLData())), status = 0 }));
         }
     }
     catch (Exception ex)
     {
         logtest.Error(ex);
         return(Json(new { invData = "Có lỗi xảy ra, vui lòng thực hiện lại.", status = 0 }));
     }
 }
Exemple #6
0
 public InvoicesController(ApplicationUserManager userManager, ApplicationDbContext dbContext, IInvoiceService invoiceService, IOptions <SlothSettings> slothSettings)
 {
     _userManager    = userManager;
     _dbContext      = dbContext;
     _invoiceService = invoiceService;
     _slothSettings  = slothSettings.Value;
 }
Exemple #7
0
        public JsonpResult verify(int invNo, string pattern, string serial, int ck)
        {
            IInvSrv = InvServiceFactory.GetService(pattern, currentCom.id);
            iGen    = InvServiceFactory.GetGenerator(pattern, currentCom.id);
            IInvoice inv = IInvSrv.GetByNo(currentCom.id, pattern, serial, invNo);

            byte[] data = iRepo.GetData(inv);

            XmlDocument xd = new XmlDocument();

            xd.PreserveWhitespace = true;
            xd.LoadXml(System.Text.Encoding.UTF8.GetString(data));

            int  k = iGen.VerifyInvoice(Encoding.UTF8.GetBytes(xd.OuterXml));
            bool c = false;

            if (k == 0 || k == 1 || (k == 2 && ck == 0))
            {
                c = true;
            }
            return(new JsonpResult
            {
                Data = c,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Exemple #8
0
 public InvoicesController(IInvoiceService invoiceService, ICustomerService customerService, IProductService productService, ITaxService taxService)
 {
     this.invoiceService  = invoiceService;
     this.customerService = customerService;
     this.productService  = productService;
     this.taxService      = taxService;
 }
Exemple #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OrderApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="umbracoContext">
 /// The umbraco context.
 /// </param>
 internal OrderApiController(IMerchelloContext merchelloContext, UmbracoContext umbracoContext)
     : base(merchelloContext, umbracoContext)
 {
     _orderService   = merchelloContext.Services.OrderService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _merchello      = new MerchelloHelper(merchelloContext, false);
 }
        public TodaysCustomerTransactionsViewModel(ICustomerService customerService, IInvoiceService invoiceService)
        {
            CustomerService = customerService;
            InvoiceService = invoiceService;

            Items = new BindableCollection<CustomerTransactionModel>();
        }
 public InvoiceController(IInvoiceService invoiceService, IRepairService repairService, IRepairRepository repairRepository, IWebHostEnvironment webHostEnvironment)
 {
     _invoiceService     = invoiceService;
     _repairService      = repairService;
     _repairRepository   = repairRepository;
     _webHostEnvironment = webHostEnvironment;
 }
Exemple #12
0
 public InvoiceWorker(ISpecificationComposer specificationComposer, IInvoiceCompose invoiceCompose, ICreditNoteCompose creditNoteCompose, IInvoiceService invoiceService)
 {
     _specificationComposer = specificationComposer;
     _invoiceCompose        = invoiceCompose;
     _creditNoteCompose     = creditNoteCompose;
     _invoiceService        = invoiceService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="OrderApiController" /> class.
 /// </summary>
 /// <param name="merchelloContext">The merchello context.</param>        
 public OrderApiController(IMerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _orderService = merchelloContext.Services.OrderService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _merchello = new MerchelloHelper(merchelloContext.Services);
 }
 //auto-wired by asp startup
 public InvoicesController(IInvoiceService service, IMapper mapper, ILogger <InvoicesController> logger) :
     base(service, mapper, logger)
 {
     _service = service;
     _mapper  = mapper;
     _logger  = logger;
 }
Exemple #15
0
        public InvoicePopupViewModel(IInvoiceService invoiceService, IProductService productService)
        {
            InvoiceService = invoiceService;
            ProductService = productService;

            Items = new BindableCollection<SaleItemViewModel>();
        }
        internal GatewayProviderService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, 
            IShipMethodService shipMethodService, IShipRateTierService shipRateTierService, 
            IShipCountryService shipCountryService, IInvoiceService invoiceService, IOrderService orderService, ITaxMethodService taxMethodService, 
            IPaymentService paymentService, IPaymentMethodService paymentMethodService)
        {
            Mandate.ParameterNotNull(provider, "provider");
            Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
            Mandate.ParameterNotNull(shipMethodService, "shipMethodService");
            Mandate.ParameterNotNull(shipRateTierService, "shipRateTierService");
            Mandate.ParameterNotNull(shipCountryService, "shipCountryService");
            Mandate.ParameterNotNull(taxMethodService, "countryTaxRateService");
            Mandate.ParameterNotNull(paymentService, "paymentService");
            Mandate.ParameterNotNull(paymentMethodService, "paymentMethodService");
            Mandate.ParameterNotNull(invoiceService, "invoiceService");
            Mandate.ParameterNotNull(orderService, "orderService");

            _uowProvider = provider;
            _repositoryFactory = repositoryFactory;
            _shipMethodService = shipMethodService;
            _shipRateTierService = shipRateTierService;
            _shipCountryService = shipCountryService;
            _invoiceService = invoiceService;
            _orderService = orderService;
            _taxMethodService = taxMethodService;
            _paymentService = paymentService;
            _paymentMethodService = paymentMethodService;
        }
Exemple #17
0
        public InvoiceApiController(
            UserAccount currentUser,
            IInvoiceService invoiceService,
            IProjectService projectService,
            IUserService userService)
        {
            if (currentUser == null)
            {
                throw new ArgumentNullException("currentUser");
            }
            if (invoiceService == null)
            {
                throw new ArgumentNullException("invoiceService");
            }
            if (projectService == null)
            {
                throw new ArgumentNullException("projectService");
            }
            if (userService == null)
            {
                throw new ArgumentNullException("userService");
            }

            _currentUser    = currentUser;
            _invoiceService = invoiceService;
            _projectService = projectService;
            _userService    = userService;
        }
Exemple #18
0
 public OrderController(IOrderService orderService, IUserService userService, IProductService productService, IInvoiceService invoiceService)
 {
     _orderService   = orderService;
     _userService    = userService;
     _productService = productService;
     _invoiceService = invoiceService;
 }
Exemple #19
0
 public InvoiceController(IStudentService strepo, ICodeTypeService ctrepo, IAddressService adrepo, IFeeScheduleService ifrepo,
                          IFeeScheduleDtlService ifsdrepo, IInvoiceService iinvsrepo)
     : base(strepo, ctrepo, adrepo, ifrepo)
 {
     _ifsdrepo  = ifsdrepo;
     _iinvsrepo = iinvsrepo;
 }
        public ActionResult ConvertForStore(int id, string patt)
        {
            if (id <= 0)
            {
                throw new HttpRequestValidationException();
            }
            Company         currentCom  = ((EInvoiceContext)FXContext.Current).CurrentCompany;
            user            currentUser = ((EInvoiceContext)FXContext.Current).CurrentUser;
            string          err;
            IInvoiceService InvSrv = InvServiceFactory.GetService(patt, currentCom.id);
            IInvoice        inv    = InvSrv.GetByID(currentCom.id, patt, id);

            if (inv.Status == InvoiceStatus.CanceledInv || inv.Status == InvoiceStatus.ReplacedInv)
            {
                return(Json("nosuccess"));
            }

            IStaffService _staSrv = IoC.Resolve <IStaffService>();
            Staff         staff   = _staSrv.SearchByAccountName(currentUser.username, currentCom.id);
            string        name    = "";

            if (null != staff)
            {
                name = staff.FullName;
            }
            string HtmlRet = InvSrv.ConvertForStore(inv, name, out err);

            if (err == string.Empty)
            {
                log.Info("Convert Invoice (Luu tru) By : " + HttpContext.User.Identity.Name + " Info-- Pattern: " + inv.Pattern + "   Serial: " + inv.Serial + "   No: " + inv.No);
                return(Json(HtmlRet));
            }
            return(Json("nosuccess"));
        }
Exemple #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OrderApiController" /> class.
 /// </summary>
 /// <param name="merchelloContext">The merchello context.</param>
 public OrderApiController(IMerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _orderService   = merchelloContext.Services.OrderService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _merchello      = new MerchelloHelper(merchelloContext, false);
 }
Exemple #22
0
        public void FixtureInit()
        {
            const string testFileName  = @"DataFiles\Chevron June FG 462988.xlsx";
            var          directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);

            if (directoryName == null)
            {
                return;
            }

            var projectPath = directoryName.Replace("file:\\", "").Replace("\\bin\\Debug", "");

            _extractor = new OrderLineExtractor();
            //_extractor.SourcePath = Path.Combine(projectPath, testFileName);
            _shipService         = A.Fake <IShippingCostService>();
            _templatePathService = new HardCodedTemplatePathService();

            A.CallTo(() => _shipService.BoxFee).Returns(2.50m);
            A.CallTo(() => _shipService.PickPackFee).Returns(0.50m);

            _invoiceService            = new InvoiceService(_extractor, _shipService, _templatePathService);
            _invoiceService.SourcePath = Path.Combine(projectPath, testFileName);
            _freightPurchaseOrders     = _invoiceService.GetFreightPurchaseOrders("462988");
            _productPurchaseOrders     = _invoiceService.GetProductPurchaseOrders("462988");
        }
 public FindCustomerContentReportViewModel(IInvoiceService invoiceService, IInvoiceDesktopMapper invoiceDesktopMapper)
 {
     _invoiceService           = invoiceService;
     _invoiceDesktopMapper     = invoiceDesktopMapper;
     _calculationContentModels = new ObservableCollection <InvoiceCalculationContentModel>();
     RegisterFindCustomerContentReportMessage();
 }
Exemple #24
0
        /// <summary>
        /// Initializes a new instance of the <see cref="InvoiceApiController"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        public InvoiceApiController(IMerchelloContext merchelloContext)
            : base(merchelloContext)
        {
            _invoiceService = merchelloContext.Services.InvoiceService;

            _merchello = new MerchelloHelper(merchelloContext.Services);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ExportOrdersReportApiController"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        public ExportOrdersReportApiController(IMerchelloContext merchelloContext)
            : base(merchelloContext)
        {
            _invoiceService = merchelloContext.Services.InvoiceService;

            _merchello = new MerchelloHelper(merchelloContext.Services);
        }
 public InvoiceController(
     IInvoiceService invoiceService,
     IDeliveryService deliveryService)
 {
     _invoiceService  = invoiceService;
     _deliveryService = deliveryService;
 }
Exemple #27
0
 public BusinessStatsService(IClientService clientService, IInvoiceService invoiceService, IExpenseService expenseService, IPaymentsService paymentsService)
 {
     ClientService   = clientService;
     InvoiceService  = invoiceService;
     PaymentsService = paymentsService;
     ExpenseService  = expenseService;
 }
Exemple #28
0
 public TransferController(IProductService productService, ILocationService locationService, ITransferService transferService, IInvoiceService invoiceService)
 {
     this.productService  = productService;
     this.locationService = locationService;
     this.transferService = transferService;
     this.invoiceService  = invoiceService;
 }
 public FrmInvoice()
 {
     _common = new CommonService();
     _dispatchOrderService = new DispatchOrderService();
     _invoiceService       = new InvoiceService();
     InitializeComponent();
 }
 public FrmInvoice()
 {
     _common = new CommonService();
     _dispatchOrderService = new DispatchOrderService();
     _invoiceService = new InvoiceService();
     InitializeComponent();
 }
Exemple #31
0
 public OrderController(IOrderService orderService, IUserService userService, ICustomerService customerService, IInvoiceService invoiceService)
 {
     _orderService    = orderService;
     _userService     = userService;
     _customerService = customerService;
     _invoiceService  = invoiceService;
 }
 public IndexModel(IInvoiceService iS, SignInManager <User> signInManager, IPeopleService peopleService, IAuthService aS)
 {
     _peopleService = peopleService;
     _signInManager = signInManager;
     _iS            = iS;
     this._aS       = aS;
 }
Exemple #33
0
 public InvoiceController(
     IPlugNotasApiService plugNotasApiService,
     IInvoiceService invoiceService)
 {
     _plugNotasApiService = plugNotasApiService;
     _invoiceService      = invoiceService;
 }
 public RevisionModel(IInvoiceService iS, SignInManager <User> signInManager, IGlobalService gS, IAuthService aS)
 {
     this._iS            = iS;
     this._gS            = gS;
     this._aS            = aS;
     this._signInManager = signInManager;
 }
        public ActionResult Delete(string Pattern, int id)
        {
            if (id <= 0)
            {
                throw new HttpRequestValidationException();
            }
            log.Debug("Access - Delete");
            Company         currentCom = ((EInvoiceContext)FXContext.Current).CurrentCompany;
            IInvoiceService IInvSrv    = InvServiceFactory.GetService(Pattern, currentCom.id);
            IInvoice        model      = IInvSrv.Getbykey <IInvoice>(id);

            try
            {
                string ErrorMessage = "";
                if (IInvSrv.DeleteInvoice(model, out ErrorMessage) == true)
                {
                    log.Info("Delete EInvoice by: " + HttpContext.User.Identity.Name + " Info-- ID: " + model.id + "Pattern: " + model.Pattern + " Serial: " + model.Serial + " SoHoaDon: " + model.No.ToString() + " TenKhachHang: " + model.CusName + " MaKhachHang: " + model.CusCode + " SoTien: " + model.Amount);
                    Messages.AddFlashMessage("Xóa hóa đơn thành công.");
                    log.Info("Delete successfull id =" + id);
                }
                else
                {
                    Messages.AddErrorFlashMessage(ErrorMessage);
                }
            }
            catch (Exception ex)
            {
                log.Error(" Delete-" + ex.Message);
            }
            return(RedirectToAction("Index", new { Pattern = Pattern, Serial = model.Serial }));
        }
        public ActionResult Edit(string Pattern, int id)
        {
            ICompanyService        comSrv     = IoC.Resolve <ICompanyService>();
            Company                currentCom = comSrv.Getbykey(((EInvoiceContext)FXContext.Current).CurrentCompany.id);
            IPublishInvoiceService _PubIn     = IoC.Resolve <IPublishInvoiceService>();
            IRegisterTempService   _ReTemSvc  = IoC.Resolve <IRegisterTempService>();
            string ViewName = InvServiceFactory.GetView(Pattern, currentCom.id) + "Edit";
            //khoi tao service
            IInvoiceService IInvSrv = InvServiceFactory.GetService(Pattern, currentCom.id);
            //lay ve mot ban ghi hoa don
            IInvoice model = IInvSrv.Getbykey <IInvoice>(id);

            if (model.Status != InvoiceStatus.NewInv)
            {
                Messages.AddErrorFlashMessage("Không thể sửa hóa đơn này.");
                return(RedirectToAction("Index", new { Pattern = Pattern, Serial = model.Serial }));
            }
            //lay va doi danh sach cac san pham thanh doi tuong json
            //nếu Unit=null thì mặc định hiển thị ""
            foreach (var item in model.Products)
            {
                if (item.Unit == null)
                {
                    item.Unit = "";
                }
            }
            //lay ra danh sach cac serial
            List <string> ser = _PubIn.GetSerialByPatter(model.Pattern, currentCom.id);

            ViewData["ser"] = ser;
            //lay thong tin ve don vi ban hang
            ViewData["company"] = currentCom;
            model.Note          = "";
            return(View(ViewName, model));
        }
 public BackofficeService(
     IOptions <BackofficeSettings> options,
     IInvoiceService invoiceService)
 {
     _settings       = options.Value;
     _invoiceService = invoiceService;
 }
 public PurchaseController(IProductService productService, IPurchaseService purchaseService,
     IInvoiceService invoiceService, IStatusService statusService)
 {
     _productService = productService;
     _purchaseService = purchaseService;
     _invoiceService = invoiceService;
     _statusService = statusService;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ShipmentResultNotifyModelFactory"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The <see cref="IMerchelloContext"/>.
        /// </param>
        public ShipmentResultNotifyModelFactory(IMerchelloContext merchelloContext)
        {
            Mandate.ParameterNotNull(merchelloContext, "merchelloContext");

            _invoiceService = merchelloContext.Services.InvoiceService;
            _orderService = merchelloContext.Services.OrderService;
            _storeSettingService = merchelloContext.Services.StoreSettingService;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="InvoiceApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 public InvoiceApiController(IMerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _storeSettingService = MerchelloContext.Services.StoreSettingService as StoreSettingService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _noteService = merchelloContext.Services.NoteService;
     _merchello = new MerchelloHelper(merchelloContext, false);
 }
 /// <summary>
 /// This is a helper contructor for unit testing
 /// </summary>
 internal ShipmentApiController(IMerchelloContext merchelloContext, UmbracoContext umbracoContext)
     : base((MerchelloContext) merchelloContext, umbracoContext)
 {
     _shipmentService = merchelloContext.Services.ShipmentService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _orderService = merchelloContext.Services.OrderService;
     _shipMethodService = ((ServiceContext)merchelloContext.Services).ShipMethodService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ShipmentApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 public ShipmentApiController(IMerchelloContext merchelloContext)
     : base(merchelloContext)
 {
     _shipmentService = merchelloContext.Services.ShipmentService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _orderService = merchelloContext.Services.OrderService;
     _shipMethodService = ((ServiceContext)merchelloContext.Services).ShipMethodService;
     _merchello = new MerchelloHelper(merchelloContext.Services);
 }
 internal GatewayProviderService(RepositoryFactory repositoryFactory, IShipMethodService shipMethodService, 
      IShipRateTierService shipRateTierService, IShipCountryService shipCountryService, 
      IInvoiceService invoiceService, IOrderService orderService,
      ITaxMethodService taxMethodService, IPaymentService paymentService, IPaymentMethodService paymentMethodService)
     : this(new PetaPocoUnitOfWorkProvider(), repositoryFactory, shipMethodService, 
      shipRateTierService, shipCountryService, invoiceService, orderService, taxMethodService,
      paymentService, paymentMethodService)
 {
 }
 public InvoiceController(IInvoiceService invoiceService, IGroupService groupService, IUserService userService, IAccountService accountService , IContactService contactService, ISalesOrderService salesOrderService)
 {
     this.invoiceService = invoiceService;
     this.groupService = groupService;
     this.userService = userService;
     this.contactService = contactService;
     this.accountService = accountService;
     this.salesOrderService = salesOrderService;
 }
 public ClientController(ILogger logger,
     IObjectStore objectStore,
     IEmailService emailService,
     IMembershipService membershipService,
     IInvoiceService invoiceService)
     : base(logger, objectStore, emailService)
 {
     _MembershipService = membershipService;
     _InvoiceService = invoiceService;
 }
        public CustomerInvoiceViewModel(IEventAggregator eventAggregator, ICustomerService customerService, IProductService productService, IInvoiceService invoiceService)
        {
            EventAggregator = eventAggregator;
            CustomerService = customerService;
            ProductService = productService;
            InvoiceService = invoiceService;

            DisplayName = "New Invoice";
            Items = new BindableCollection<CustomerInvoiceItemViewModel>();
        }
Exemple #47
0
 public BuyController(IProductService productService, ICustomerService customerService,
     IProfileService profileService, IUserService userService, IInvoiceService invoiceService,
     ISecurityCodeService securityCodeService)
 {
     _customerService = customerService;
     _profileService = profileService;
     _invoiceService = invoiceService;
     _securityCodeService = securityCodeService;
     _service = new Service(productService);
     _common = new Common(userService);
 }
Exemple #48
0
        public SaleViewModel(ScreenCoordinator screenCoordinator, ICustomerService customerService, IProductService productService, IInvoiceService invoiceService, IDiscountService discountService)
        {
            ScreenCoordinator = screenCoordinator;
            CustomerService = customerService;
            ProductService = productService;
            InvoiceService = invoiceService;
            DiscountService = discountService;

            DisplayName = "PURCHASE";
            Products = new BindableCollection<SaleItemViewModel>();
        }
 public PotentialController(IPotentialService potentialService, IGroupService groupService, IUserService userService,
     ICampaignService campaignService, IAccountService accountService, IInvoiceService invoiceService, IQuoteService quoteService)
 {
     this.potentialService = potentialService;
     this.groupService = groupService;
     this.userService = userService;
     this.campaignService = campaignService;
     this.accountService = accountService;
     this.invoiceService = invoiceService;
     this.quoteService = quoteService;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AbandonedBasketReportApiController"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        public AbandonedBasketReportApiController(IMerchelloContext merchelloContext)
            : base(merchelloContext)
        {
            _itemCacheService = merchelloContext.Services.ItemCacheService;

            _invoiceService = merchelloContext.Services.InvoiceService;

            _maxDays = MerchelloConfiguration.Current.AnonymousCustomersMaxDays;
            _startDate = DateTime.Today.AddDays(-_maxDays);
            _endDate = DateTime.Today;
        }
 public InvoiceController(IProductService productService, IPurchaseService purchaseService,
     IInvoiceService invoiceService, IStoreService storeInvoice, IUserService userService,
     ICustomerService customerService, IStatusService statusService)
 {
     _productService = productService;
     _purchaseService = purchaseService;
     _invoiceService = invoiceService;
     _storeInvoice = storeInvoice;
     _userService = userService;
     _customerService = customerService;
     _statusService = statusService;
 }
Exemple #52
0
        public ReceiptViewModel(ScreenCoordinator screenCoordinator, ImageService imageService, ICustomerService customerService, IProductService productService, IInvoiceService invoiceService, IDiscountService discountService, IEventAggregator eventAggregator)
        {
            ScreenCoordinator = screenCoordinator;
            ImageService = imageService;
            CustomerService = customerService;
            ProductService = productService;
            InvoiceService = invoiceService;
            DiscountService = discountService;
            EventAggregator = eventAggregator;

            DisplayName = "RECEIPT";
            Products = new BindableCollection<SaleItemViewModel>();
        }
 public QuoteController(
     ILeadService LeadService, 
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     IQuoteService quoteService,
     IInvoiceService invoiceService)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _quoteService = quoteService;
     _invoiceService = invoiceService;
 }
 public InvoiceController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     IInvoiceService invoiceService,
     ISaleService saleService,
     ViewDataHelper initHelper)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _saleService = saleService;
     _invoiceService = invoiceService;
     _initHelper = initHelper;
 }
        public InvoicesController(IOrderService orderService,
            IOrderReportService orderReportService,
            IOrderProcessingService orderProcessingService,
            IPriceCalculationService priceCalculationService,
            IDateTimeHelper dateTimeHelper,
            IPriceFormatter priceFormatter,
            IDiscountService discountService,
            ILocalizationService localizationService,
            IWorkContext workContext,
            ICurrencyService currencyService,
            IEncryptionService encryptionService,
            IPaymentService paymentService,
            IMeasureService measureService,
            IPdfService pdfService,
            IAddressService addressService,
            ICountryService countryService,
            IStateProvinceService stateProvinceService,
            Nop.Services.Catalog.IProductService productService,
            IExportManager exportManager,
            IPermissionService permissionService,
            IWorkflowMessageService workflowMessageService,
            ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IProductAttributeService productAttributeService,
            IProductAttributeParser productAttributeParser,
            IProductAttributeFormatter productAttributeFormatter,
            IShoppingCartService shoppingCartService,
            IGiftCardService giftCardService,
            IDownloadService downloadService,
            IShipmentService shipmentService,
            IShippingService shippingService,
            IStoreService storeService,
            IVendorService vendorService,
            IAddressAttributeParser addressAttributeParser,
            IAddressAttributeService addressAttributeService,
            IAddressAttributeFormatter addressAttributeFormatter,
            IAffiliateService affiliateService,
            IPictureService pictureService,
            CurrencySettings currencySettings,
            TaxSettings taxSettings,
            MeasureSettings measureSettings,
            AddressSettings addressSettings,
            ShippingSettings shippingSettings,
            IInvoiceService invoiceService,
            IGenericAttributeService genericAttributeService,
            IProductTemplateService productTemplateService,
            IStoreContext storeContext,
            ISettingService settingService,
            IGroupDealService groupDealService)
        {
            this._orderService = orderService;
            this._orderReportService = orderReportService;
            this._orderProcessingService = orderProcessingService;
            this._priceCalculationService = priceCalculationService;
            this._dateTimeHelper = dateTimeHelper;
            this._priceFormatter = priceFormatter;
            this._discountService = discountService;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._currencyService = currencyService;
            this._encryptionService = encryptionService;
            this._paymentService = paymentService;
            this._measureService = measureService;
            this._pdfService = pdfService;
            this._addressService = addressService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._productService = productService;
            this._exportManager = exportManager;
            this._permissionService = permissionService;
            this._workflowMessageService = workflowMessageService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._productAttributeFormatter = productAttributeFormatter;
            this._shoppingCartService = shoppingCartService;
            this._giftCardService = giftCardService;
            this._downloadService = downloadService;
            this._shipmentService = shipmentService;
            this._shippingService = shippingService;
            this._storeService = storeService;
            this._vendorService = vendorService;
            this._addressAttributeParser = addressAttributeParser;
            this._addressAttributeService = addressAttributeService;
            this._addressAttributeFormatter = addressAttributeFormatter;
            this._affiliateService = affiliateService;
            this._pictureService = pictureService;

            this._currencySettings = currencySettings;
            this._taxSettings = taxSettings;
            this._measureSettings = measureSettings;
            this._addressSettings = addressSettings;
            this._shippingSettings = shippingSettings;
            this._invoiceService = invoiceService;
            this._genericAttributeService = genericAttributeService;
            this._productTemplateService = productTemplateService;
            this._storeContext = storeContext;
            this._settingService = settingService;
            this._groupDealService = groupDealService;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="OrderApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="umbracoContext">
 /// The umbraco context.
 /// </param>
 internal OrderApiController(IMerchelloContext merchelloContext, UmbracoContext umbracoContext)
     : base(merchelloContext, umbracoContext)
 {
     _orderService = merchelloContext.Services.OrderService;
     _invoiceService = merchelloContext.Services.InvoiceService;
     _merchello = new MerchelloHelper(merchelloContext.Services);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InvoiceApiController"/> class.
 /// </summary>
 /// <param name="merchelloContext">
 /// The merchello context.
 /// </param>
 /// <param name="umbracoContext">
 /// The umbraco context.
 /// </param>
 internal InvoiceApiController(IMerchelloContext merchelloContext, UmbracoContext umbracoContext)
     : base(merchelloContext, umbracoContext)
 {
     _invoiceService = merchelloContext.Services.InvoiceService;
 }
 private void InvoiceServiceSaved(IInvoiceService sender, SaveEventArgs<IInvoice> e)
 {
     var provider = (InvoiceIndexer)ExamineManager.Instance.IndexProviderCollection["MerchelloInvoiceIndexer"];
     foreach (var invoice in e.SavedEntities)
     {
         provider.AddInvoiceToIndex(invoice);
     }
 }
Exemple #59
0
 /// <summary>
 /// Removes deleted invoices from the index 
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The e.
 /// </param>
 public static void InvoiceServiceDeleted(IInvoiceService sender, DeleteEventArgs<IInvoice> e)
 {
     e.DeletedEntities.ForEach(DeleteInvoiceFromIndex);
 }
Exemple #60
0
 /// <summary>
 /// Adds saved invoices to the index
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The e.
 /// </param>
 public static void InvoiceServiceSaved(IInvoiceService sender, SaveEventArgs<IInvoice> e)
 {
     e.SavedEntities.ForEach(IndexInvoice);
 }