protected void SetPrice_Click(object sender, EventArgs e)
        {
            try
            {
                if (SkuList.Items.Count <= 0)
                {
                    throw new Exception("Search for a valid style/variant");
                }

                DateTime from  = DateTime.Parse(StartDate.Value + " " + startTime.Value);
                DateTime until = DateTime.Parse(EndDate.Value + " " + endTime.Value);

                string currency = SelectedCurrency.Text;

                if (string.IsNullOrEmpty(currency))
                {
                    throw new Exception("Select Market to define currency.");
                }

                decimal value = 0;

                if (!Decimal.TryParse(Value.Text, out value))
                {
                    throw new Exception("Not a valid price value");
                }

                var market = _marketRepository.GetMarket(Market.SelectedValue);

                foreach (var item in this.SkuList.Items)
                {
                    this.UpdatePriceOnSku(item.ToString(), from, until, market, currency, value);
                }

                CatalogCache.Clear();

                // IndexEntry();

                this.BindPrices();
            }
            catch (Exception ex)
            {
                ErrorMessage.Text  = ex.Message;
                ErrorPanel.Visible = true;
            }
        }
Beispiel #2
0
 public string ClearCache()
 {
     CatalogCache.Clear();
     EPiServer.CacheManager.Clear();
     return("Cache cleared");
 }