Exemple #1
0
 public ActionResult ContinueSelect(CountModel count)
 {
     if (count.Products.Where(m => m.Selected).Count() > 1)  // Showing Average Details Of Multiple Product
     {
         var xEle = new XElement("Item",
             from item in count.Products.Where(m => m.Selected)
             select new XElement("Item", new XAttribute("Product", item.ProductKey),
                            new XAttribute("Store", item.StoreId),
                            new XAttribute("Price", item.Price)
                        )).ToString();
         var model = new ItemPEDDetailsModel(PEDService.GetMultipleItemPEDDetails(xEle));
         return View("Multiple-price-opt ", model);
     }
     else //Showing Single Product Price Optimization
     {
         string product = count.Products.Where(m => m.Selected).Select(o => new { o.ProductKey }).FirstOrDefault().ProductKey;
         string store = count.Products.Where(m => m.Selected).Select(o => new { o.StoreId }).FirstOrDefault().StoreId;
         return RedirectToAction("PriceOpt", new { id = product, store = store });
     }
 }
Exemple #2
0
 public ActionResult SaveSingleProductOptimizedPrice(ItemPEDDetailsModel model)
 {
     string optimizedPrice = Request.Form["hdnOptimizedPrice"];
     var result = PEDService.SaveSingleProductOptimizedPrice( model.ProductKey, model.Store, model.Price, optimizedPrice);
     model.TriggerOnLoad = true;
     switch (result)
     {
         case (int)SaveResult.Successful:
             model.TriggerOnLoadMessage = "1";
             break;
         case (int)SaveResult.Error:
             model.TriggerOnLoadMessage = "0";
             break;
     }
     return View("price-opt", model);
 }
Exemple #3
0
 /// <summary>
 /// Get PED Details Of Product
 /// </summary>
 /// <param name="id">Product Id</param>
 /// <param name="store">Store Id</param>
 /// <returns></returns>
 public ActionResult PriceOpt(string id,string store)
 {
     var model = new ItemPEDDetailsModel(PEDService.GetItemPEDDetails(id, store));
     return View("price-opt", model);
 }