public void InputProductIformation(String sku, String priceType, String quantity)
 {
     SkuField.SendKeys(sku);
     Thread.Sleep(500);
     PriceTypeField.Clear();
     PriceTypeField.SendKeys(priceType);
     QuantityField.Clear();
     QuantityField.SendKeys(quantity);
     UpdateButton.Click();
     NextButton.Click();
 }
Beispiel #2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            PageMessageBox = ucMessageBox;

            // TODO: troubleshoot taxonomy to see why it's not saving and loading
            divTaxonomyBlock.Visible = false;

            if (!Page.IsPostBack)
            {
                PopulateTemplates();
                PopulateManufacturers();
                PopulateVendors();
                PopulateProductTypes();
                PopulateColumns();
                PopulateTaxes();
                SkuField.Focus();

                if (!string.IsNullOrEmpty(ReturnUrl) && ReturnUrl == "Y")
                {
                    lnkBacktoAbandonedCartsReport.Visible     = true;
                    lnkBacktoAbandonedCartsReport.NavigateUrl =
                        "~/DesktopModules/Hotcakes/Core/Admin/reports/AbandonedCarts/view.aspx";
                }
                else
                {
                    lnkBacktoAbandonedCartsReport.Visible = false;
                }

                if (!string.IsNullOrEmpty(ProductId))
                {
                    LoadProduct();
                    if (Request.QueryString["u"] == "1")
                    {
                        ucMessageBox.ShowOk("Product Updated");
                    }
                }
                var props = HccApp.CatalogServices.ProductPropertiesFindForType(lstProductType.SelectedValue);
                foreach (var prop in props)
                {
                    var propertyValue = HccApp.CatalogServices.ProductPropertyValues.GetPropertyValue(ProductId, prop,
                                                                                                      true);
                    _productTypeProperties.Add(prop.Id, propertyValue);
                }
                GenerateProductTypePropertyFields();
                UrlsAssociated1.ObjectId = ProductId;
                UrlsAssociated1.LoadUrls();
            }
            else
            {
                //this is a postback
                var props = HccApp.CatalogServices.ProductPropertiesFindForType(lstProductType.SelectedValue);
                foreach (var prop in props)
                {
                    var propertyValue = Request["ProductTypeProperty" + prop.Id];
                    _productTypeProperties.Add(prop.Id, propertyValue);
                }

                CheckIfProductTypePropertyChanged();
                GenerateProductTypePropertyFields();
            }
        }