public async Task <OrderDetailsCart> GetOrderDetailsCart(Claim claim, IMenuItemRepository menuItem, string code, ICouponRepository couponRepository) { OrderDetailsCart order = new OrderDetailsCart { OrderHeader = new OrderHeader(), ShoppingCarts = await GetShoppingCartFoUser(claim.Value) }; order.OrderHeader.OrderTotal = 0; foreach (var VARIABLE in order.ShoppingCarts) { VARIABLE.MenuItem = await menuItem.GetItemAsync(VARIABLE.MenuItemId); order.OrderHeader.OrderTotal = order.OrderHeader.OrderTotal + (VARIABLE.MenuItem.Price * VARIABLE.Count); VARIABLE.MenuItem.Description = SD.ConvertToRawHtml(VARIABLE.MenuItem.Description); if (VARIABLE.MenuItem.Description.Length > 100) { VARIABLE.MenuItem.Description = VARIABLE.MenuItem.Description.Substring(0, 99) + "..."; } } order.OrderHeader.OrderTotalOriginal = order.OrderHeader.OrderTotal; if (code != null) { order.OrderHeader.CouponCode = code; var couponFromDb = await couponRepository.AllItems.Where(z => z.Name.ToLower() == order.OrderHeader.CouponCode.ToLower()).FirstOrDefaultAsync(); order.OrderHeader.OrderTotal = SD.DiscountedPrice(couponFromDb, order.OrderHeader.OrderTotalOriginal); } return(order); }
public FileController(IConfiguration config, ICouponRepository couponRepository, ICabinRepository cabinRepository) { _config = config; _couponRepository = couponRepository; _cabinRepository = cabinRepository; }
public RedeemController(IUserRepository _userRepository, IPromoRepository _promoRepository, IOrganisationRepository _organisationRepository, ICouponRepository _couponRespository) { this._userRepository = _userRepository; this._promoRepository = _promoRepository; this._organisationRepository = _organisationRepository; this._couponRespository = _couponRespository; }
public CouponAppService( ICouponTemplateRepository couponTemplateRepository, ICouponRepository repository) : base(repository) { _couponTemplateRepository = couponTemplateRepository; _repository = repository; }
public BookingService(IRoomsRepository roomsRepository, ICouponRepository couponRepo) { //_bookingsRepository = bookingsRepository; _roomsRepository = roomsRepository; _couponRepo = couponRepo; }
public UnitOfWork( DatabaseContext dbContext, IProductRepository productRepository, IProductReviewRepository productReviewRepository, IUserRepository userReviewRepository, ICouponRepository couponRepository, IOrderRepository orderRepository, IShipmentRepository shipmentRepository, IPaymentRepository paymentRepository, IHashMapRepository hashMapRepository, IUserOrderRepository userOrderRepository, IFeedbackRepository feedbackRepository) { _dbContext = dbContext; _productRepository = productRepository; _productReviewRepository = productReviewRepository; _userReviewRepository = userReviewRepository; _couponRepository = couponRepository; _orderRepository = orderRepository; _shipmentRepository = shipmentRepository; _paymentRepository = paymentRepository; _hashMapRepository = hashMapRepository; _userOrderRepository = userOrderRepository; _feedbackRepository = feedbackRepository; }
public CouponTest() { var builder = new DbConnection(); _context = new OnlineStoreDbContext((builder.InitConfiguration()).Options); _couponRepository = new CouponRepositoryImpl(_context); }
public PartnerController( IUSERRepository userRepository, IDealRepository dealRepository, ICouponRepository couponRepository) { _userRepository = userRepository; _dealRepository = dealRepository; _coupoRepository = couponRepository; }
public RepositoryCouponLookupService( IObjectMapper objectMapper, ICouponRepository couponRepository) { _objectMapper = objectMapper; _couponRepository = couponRepository; }
public ApplyCouponCommandHandler(ICouponRepository couponRepository, IRegularUserRepository userRepository, ITutorRepository tutorRepository) { _couponRepository = couponRepository; _userRepository = userRepository; _tutorRepository = tutorRepository; }
public CouponOrderCreatedEventHandler( IClock clock, ICouponRepository couponRepository) { _clock = clock; _couponRepository = couponRepository; }
public CouponManagementHelper(ICouponRepository iCouponRepository) { _iCoupounRepositoty = iCouponRepository; var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()); XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config")); }
public OrderService(ICouponRepository CouponRepository, IOrderRepository orderRepository, IOrderDetailRepository orderDetailRepository, ICustomerService customerService, IUnitOfWork unitOfWork) { this._CouponRepository = CouponRepository; this._customerService = customerService; this._orderRepository = orderRepository; this._orderDetailRepository = orderDetailRepository; this._unitOfWork = unitOfWork; }
public IEnumerable <Coupon> GetAllCoupon() { _couponRepository = new CouponRepository(); Collection <Coupon> coupons = _couponRepository.GetAllCoupon(); return(coupons); }
public ShoppingCartService(IShoppingCartRepository shoppingCartRepository, ICampaignRepository campaignRepository, ICouponRepository couponRepository) { _shoppingCartRepository = shoppingCartRepository; _campaignRepository = campaignRepository; _couponRepository = couponRepository; }
public EventsController(IItemTypeRepository itemTypeRepository, IItemRepository itemRepository, ICouponRepository couponRepository) { _itemTypeRepository = itemTypeRepository; _itemRepository = itemRepository; _couponRepository = couponRepository; }
public PromotionService(ICouponService couponService, IPromotionRepository promotionRepository, IPromotionProductRelationRepository pprRepository , ICouponRepository couponRepo) { _pprRepository = pprRepository; _promotionRepository = promotionRepository; _couponService = couponService; _couponRepo = couponRepo; }
public PromotionService(ICouponService couponService, IPromotionRepository promotionRepository, IPromotionProductRelationRepository pprRepository ,ICouponRepository couponRepo) { _pprRepository = pprRepository; _promotionRepository = promotionRepository; _couponService = couponService; _couponRepo = couponRepo; }
public static void RegisterCouponRepository(ICouponRepository couponRepository) { if (couponRepository == null) { throw new ArgumentNullException("couponRepository"); } _couponRepository = couponRepository; }
static Program() { AppDbContextFactory factory = new AppDbContextFactory(); _appContext = factory.CreateDbContext(null); _cardRepository = new CardRepository(_appContext); _couponRepository = new CouponRepository(_appContext); }
public OrderHandler(ICountryRepository countryRepository, IStateRepository stateRepository, IBookRepository bookRepository, IOrderRepository orderRepository, ICouponRepository couponRepository) { _countryRepository = countryRepository; _stateRepository = stateRepository; _bookRepository = bookRepository; _orderRepository = orderRepository; _couponRepository = couponRepository; }
public CartService(IProductRepository productRepository, IStockRepository stockRepository , ICampaignRepository campaignRepository, ICouponRepository couponRepository) { _productRepository = productRepository; _stockRepository = stockRepository; _campaignRepository = campaignRepository; _couponRepository = couponRepository; }
public CouponUserController(ICouponRepository couponRepository, IUserRepository userRepository, IMapper mapper) { this.couponRepository = couponRepository; this.userRepository = userRepository; this.mapper = mapper; }
public FinishOrderHandler( ICouponRepository couponRepository, IMessageBrokerService messageBrokerService ) { this.couponRepository = couponRepository; this.messageBrokerService = messageBrokerService; }
public ProfileController(IUserRepository _userRepository, IPromoRepository _promoRepository, IOrganisationRepository _organisationRepository, IPaymentTransactionRepository _paymentTransactionRepository, ICouponRepository _couponRespository) { this._userRepository = _userRepository; this._promoRepository = _promoRepository; this._organisationRepository = _organisationRepository; this._paymentTransactionRepository = _paymentTransactionRepository; this._couponRespository = _couponRespository; }
public WareHouseService(IValidationDictionary validationDictionary, IWareHouseRepository warehouserepository, ICouponRepository couponrepository, IDetailCouponRepository detailCouponrepository, IProductRepository productRepository) { _validationDictionary = validationDictionary; _warehouserepository = warehouserepository; _couponrepository = couponrepository; _detailCouponrepository = detailCouponrepository; _productrepository = productRepository; }
public CouponDataService(IProductRepository productRepository, ITimeSeedRepository timeSeedRepository, ISeedRepository seedRepository, IUserService userService, ICouponRepository couponRepository, IPromotionRepository promotionRepository) { _productRepository = productRepository; _couponRepository = couponRepository; _promotionRepository = promotionRepository; _userService = userService; _seedRepository = seedRepository; _timeSeedRepository = timeSeedRepository; }
public HomeController(ICustomerRepository customerRepo, IContactRepository contactRepo, ITransactionRepository transactionRepo, ICouponRepository couponRepo, IPrizeRepository prizeRepo, ICouponClaimPrizeRepository couponClaimPrizeRepo) { customerRepository = customerRepo; contactRepository = contactRepo; transactionRepository = transactionRepo; couponRepository = couponRepo; prizeRepository = prizeRepo; couponClaimPrizeRepository = couponClaimPrizeRepo; }
public CartController(IShoppingCartRepository iShoppingCartRepository, IOrderHeaderRepository iOrderHeaderRepository, IOrderDetailsRepository iOrderDetailsRepository, IMenuItemRepository menuItemRepository, ICouponRepository couponRepository) { _iShoppingCartRepository = iShoppingCartRepository; _iOrderHeaderRepository = iOrderHeaderRepository; _iOrderDetailsRepository = iOrderDetailsRepository; _menuItemRepository = menuItemRepository; _couponRepository = couponRepository; }
public CartAPIController(ICartRepository cartRepository, IMessageBus messageBus, ICouponRepository couponRepository, IRabbitMQCartMessageSender rabbitMQCartMessageSender) { _cartRepository = cartRepository; _couponRepository = couponRepository; _rabbitMQCartMessageSender = rabbitMQCartMessageSender; _messageBus = messageBus; this._response = new ResponseDto(); }
public CouponService( ICouponRepository couponRepository, IMediator mediator, IHttpContextAccessor httpContextAccessor, IUserRepository userRepository, UserManager <ApplicationUser> userManager ) : base(mediator, httpContextAccessor, userRepository, userManager) { _couponRepository = couponRepository; }
public UserController(IUSERRepository userRepository, IROLERepository roleRepository, ICategoryRepository cateogoryRepository, IOrderRepository orderRepository, IDealRepository dealRepository, ICouponRepository couponRepository) { _userRepository = userRepository; _roleRepository = roleRepository; _categoryRepository = cateogoryRepository; _orderRepository = orderRepository; _dealRepository = dealRepository; _couponRepository = couponRepository; }
public DealController(IUSERRepository userRepository, IDealRepository dealRepository, IGroupRepository groupRepository, ICategoryRepository categoryRepository, ICouponRepository couponRepository, IOrderRepository orderRepository, IPaymentMessageRepository paymentMessageRepository) { _userRepository = userRepository; _dealRepository = dealRepository; _groupRepository = groupRepository; _categoryRepository = categoryRepository; _couponRepository = couponRepository; _orderRepository = orderRepository; _paymentMessageRepository = paymentMessageRepository; }
public CouponController(ICouponDataService couponDataService, ICouponRepository couponRepo, IPromotionRepository promotionRepo, IProductRepository productRepo, IStoreRepository storeRepo) { this._couponDataService = couponDataService; _couponRepo = couponRepo; _productRepo = productRepo; _promotionRepo = promotionRepo; _storeRepo = storeRepo; }
public CouponController(ICouponRepository CouponRepository, ICouponUserRepository CouponUserRepository, IResponseImageTextRepository ResponseImageTextRepository, IUserProfileRepository UserProfileRepository, ICouponItemRepository CouponItemRepository) { this.ResponseImageTextRepository = ResponseImageTextRepository; this.UserProfileRepository = UserProfileRepository; this.CouponUserRepository = CouponUserRepository; this.CouponItemRepository = CouponItemRepository; this.CouponRepository = CouponRepository; }
public CouponService(ICouponRepository couponRepository) { _couponRepository = couponRepository; }
public MappingManagerV2() { //注意 只能 查询不能有修改操作 _userAccountRepository = ServiceLocator.Current.Resolve<IUserAccountRepository>(); _vUserRoleRepository = ServiceLocator.Current.Resolve<IVUserRoleRepository>(); _promotionBrandRelationRepository = ServiceLocator.Current.Resolve<IPromotionBrandRelationRepository>(); _likeRepository = ServiceLocator.Current.Resolve<ILikeRepository>(); _couponRepository = ServiceLocator.Current.Resolve<ICouponRepository>(); _favoriteRepository = ServiceLocator.Current.Resolve<IFavoriteRepository>(); _pointRepository = ServiceLocator.Current.Resolve<IPointRepository>(); }
public CouponController(IUSERRepository userRepository, ICouponRepository couponRepository) { _userRepository = userRepository; _couponRepository = couponRepository; }