Esempio n. 1
0
 public void ApplyBestPrice(IList<ERPStore.Models.Product> productList, ERPStore.Models.User user)
 {
     foreach (var item in productList)
     {
         ApplyBestPrice(item, user);
     }
 }
 public void Save(ERPStore.Models.Address address)
 {
     if (!m_AddressList.Contains(address))
     {
         m_AddressList.Add(address);
     }
 }
Esempio n. 3
0
        public SettingsService(ERPStore.Services.ICacheService cacheService
			, Logging.ILogger logger
			, Microsoft.Practices.Unity.IUnityContainer container)
        {
            this.CacheService = cacheService;
            this.Logger = logger;
            this.Container = container;
        }
Esempio n. 4
0
        public PluginInit(System.Web.HttpContextBase context
			, Microsoft.Practices.Unity.IUnityContainer container
			, ERPStore.Models.WebSiteSettings webSiteSettings)
        {
            this.HttpContext = context;
            this.Container = container;
            this.WebSiteSettings = webSiteSettings;
        }
 public void ChangeCurrent(string cartId, ERPStore.Models.CartType cartType, ERPStore.Models.UserPrincipal user)
 {
     var cart = GetCartById(cartId);
     if (cart != null)
     {
         m_List.Remove(cart);
         m_List.Insert(0, cart);
     }
 }
Esempio n. 6
0
        public EmailerService(Logging.ILogger logger
			, ERPStore.Services.IConnectorService connectorService
			, ERPStore.Services.IAccountService accountService
			, ERPStore.Services.CryptoService cryptoService
			, ERPStore.Services.IScheduledTaskService taskService
			)
            : base(logger, connectorService, accountService, cryptoService, taskService)
        {
        }
Esempio n. 7
0
 public override ERPStore.Models.ISaleDocument CreateOrderFromCart(ERPStore.Models.User user, ERPStore.Models.OrderCart cart)
 {
     var order = new Models.Order();
     order.Id = 1;
     order.Code = Guid.NewGuid().ToString();
     order.User = user;
     order.PaymentModeName = cart.PaymentModeName;
     m_OrderList.Add(order);
     return order;
 }
Esempio n. 8
0
        public override List<ERPStore.Models.BrokenRule> ValidateOrderCart(ERPStore.Models.OrderCart cart, System.Web.HttpContextBase context)
        {
            var result = new List<ERPStore.Models.BrokenRule>();

            if (ERPStore.ERPStoreApplication.WebSiteSettings.Payment.MinimalOrderAmount != null
                && cart.GrandTotal < ERPStore.ERPStoreApplication.WebSiteSettings.Payment.MinimalOrderAmount)
            {
                ERPStore.IEnumerableExtension.AddBrokenRule(result, "GrandTotal", string.Format("Vous n'avez pas atteint le montant minimal de commande qui est de {0:F2} Euros", ERPStore.ERPStoreApplication.WebSiteSettings.Payment.MinimalOrderAmount));
            }

            return result;
        }
 public string GetCurrentCartId(ERPStore.Models.CartType cartType, ERPStore.Models.UserPrincipal user)
 {
     switch (cartType)
     {
         case ERPStore.Models.CartType.Order:
             if (m_List.IsNotNullOrEmpty())
             {
                 return GetOrderList(user).First().Code;
             }
             break;
         case ERPStore.Models.CartType.Quote:
             if (m_List.IsNotNullOrEmpty())
             {
                 return GetQuoteList(user).First().Code;
             }
             break;
         default:
             break;
     }
     return Guid.NewGuid().ToString();
 }
Esempio n. 10
0
 public string GetProductKeywords(ERPStore.Models.Product product)
 {
     return m_ContreteCatalogService.GetProductKeywords(product);
 }
Esempio n. 11
0
 //public IList<ERPStore.Models.Product> GetDestockedProductList()
 //{
 //    return m_ContreteCatalogService.GetDestockedProductList();
 //}
 //public IList<ERPStore.Models.Product> GetTopSellProductList()
 //{
 //    return m_ContreteCatalogService.GetTopSellProductList();
 //}
 //public IList<ERPStore.Models.Product> GetFirstPriceProductList()
 //{
 //    return m_ContreteCatalogService.GetFirstPriceProductList();
 //}
 public IList<ERPStore.Models.Product> GetProductListBySearch(ERPStore.Models.ProductListFilter filter, int index, int pageSize, out int count)
 {
     return m_ContreteCatalogService.GetProductListBySearch(filter, index, pageSize, out count);
 }
Esempio n. 12
0
 public IList<ERPStore.Models.ProductCategory> GetProductCategoryListBySearch(ERPStore.Models.ProductListFilter search)
 {
     return m_ContreteCatalogService.GetProductCategoryListBySearch(search);
 }
Esempio n. 13
0
 public IList<ERPStore.Models.PropertyGroup> GetProductExtendedPropertyListBySearch(ERPStore.Models.ProductListFilter searchFilter)
 {
     return m_ContreteCatalogService.GetProductExtendedPropertyListBySearch(searchFilter);
 }
Esempio n. 14
0
 public ViewResult QuoteCanceled(ERPStore.Models.Quote quote, Models.CancelQuoteReason reason,  string message)
 {
     ViewData.Model = quote;
     ViewData["message"] = message;
     ViewBag.Message = message;
     ViewData["reason"] = reason;
     ViewBag.Reason = reason;
     ViewBag.WebSiteSettings = ERPStore.ERPStoreApplication.WebSiteSettings;
     return View();
 }
Esempio n. 15
0
 public override ERPStore.Models.Price GetProductSalePrice(ERPStore.Models.Product product, ERPStore.Models.User user, int Quantity, out bool isCustomerPriceApplied)
 {
     isCustomerPriceApplied = false;
     return product.SalePrice;
 }
Esempio n. 16
0
 public override void AddPaymentToOrder(ERPStore.Models.Order order, string paymentModeName, string transactionId, object message)
 {
 }
Esempio n. 17
0
 public IList<ERPStore.Models.Brand> GetBrandListBySearch(ERPStore.Models.ProductListFilter search)
 {
     return m_ContreteCatalogService.GetBrandListBySearch(search);
 }
Esempio n. 18
0
 public ActionResult ShowOrderDocuments(ERPStore.Models.Order order, string viewName)
 {
     var list = DocumentService.GetMediaList(order);
     ViewData.Model = list;
     return PartialView(viewName);
 }
Esempio n. 19
0
 public override void CalculateShippingFee(ERPStore.Models.OrderCart cart, ERPStore.Models.User principal)
 {
     // Do nothing
 }
Esempio n. 20
0
        public override List<ERPStore.Models.BrokenRule> ValidateQuoteCart(ERPStore.Models.QuoteCart cart, System.Web.HttpContextBase context)
        {
            var result = new List<ERPStore.Models.BrokenRule>();

            var form = context.Request.Form;
            var lastNameForm = form["lastname"];
            var emailForm = form["email"];

            if (lastNameForm.IsNullOrTrimmedEmpty())
            {
                ERPStore.IEnumerableExtension.AddBrokenRule(result, "lastname", "Le nom doit etre indiqué");
            }

            if (!ERPStore.Services.EmailValidator.IsValidEmail(emailForm))
            {
                ERPStore.IEnumerableExtension.AddBrokenRule(result, "email", "L'email est invalide");
            }

            return result;
        }
Esempio n. 21
0
 public override void CreateQuoteFromQuoteCart(ERPStore.Models.QuoteCart cart)
 {
     Console.WriteLine("CreateQuotFormQuoteCart");
 }
Esempio n. 22
0
 public override void ProcessExport(ERPStore.Models.OrderCart cart, ERPStore.Models.User principal)
 {
     // Do nothing
 }
Esempio n. 23
0
 public ERPStore.Models.ProductStockInfo GetProductStockInfo(ERPStore.Models.Product product)
 {
     return m_ContreteCatalogService.GetProductStockInfo(product);
 }
Esempio n. 24
0
        public PluginInit(Microsoft.Practices.Unity.IUnityContainer container
	, System.Web.HttpContextBase context
	, ERPStore.Models.WebSiteSettings webSiteSettings)
            : base(context, container, webSiteSettings)
        {
        }
Esempio n. 25
0
 public void ApplyBestPrice(ERPStore.Models.Product product, ERPStore.Models.User user)
 {
     m_ContreteCatalogService.ApplyBestPrice(product, user);
 }
 public virtual bool IsAllowedFor(ERPStore.Models.OrderCart cart, ERPStore.Models.UserPrincipal principal)
 {
     return true;
 }
Esempio n. 27
0
 public ViewResult OrderModification(ERPStore.Models.Order order, string message)
 {
     ViewData.Model = order;
     ViewData["message"] = message;
     ViewBag.Message = message;
     ViewBag.WebSiteSettings = ERPStore.ERPStoreApplication.WebSiteSettings;
     ViewBag.FullName = order.User.FullName;
     ViewBag.EncryptedUrl = "#";
     return View();
 }
Esempio n. 28
0
 public IList<ERPStore.Models.Product> GetCrossSellingList(ERPStore.Models.OrderCart cart)
 {
     return m_ContreteCatalogService.GetCrossSellingList(cart);
 }
Esempio n. 29
0
 public ActionResult QuoteConfirmation(ERPStore.Models.QuoteCart cart)
 {
     if (cart == null)
     {
         return this.Redirect("/");
     }
     ViewData.Model = cart;
     return View("quoterequest");
 }
Esempio n. 30
0
 public override ERPStore.Models.Order GetLastOrder(ERPStore.Models.User user)
 {
     return null;
 }