private void AddSpecificationImportErrorMessages(ProductImportStatus status) { AddProductSkuError(status); AddSpecificationItemError(status); uxImportSpecificationMessagePanel.CssClass = "mgl30"; }
private void UpdateMessage(ProductImportStatus status) { switch (status.Status) { case ProductImportStatus.ErrorStatus.Success: Label successlabel = new Label(); successlabel.ForeColor = Color.Blue; successlabel.Text = "<b>Import finished successfully!</b><br />" + status.ImportedCount + " row(s) imported<br />" + status.ErrorCount + " error(s)<br />"; uxMessageLabel.Text += successlabel.Text; break; case ProductImportStatus.ErrorStatus.DoneWithErrors: AddImportErrorMessages(status); break; case ProductImportStatus.ErrorStatus.Fatal: Label fatalLabel = new Label(); fatalLabel.ForeColor = Color.Red; fatalLabel.Text = "<b>Import Failed!<br/> Error Message:</b><br/>" + WebUtilities.ReplaceNewLine(status.ErrorMessage) + "<br/>" + status.ImportedCount + " row(s) imported<br/>"; uxMessageLabel.Text += fatalLabel.Text; AddImportErrorMessages(status); break; } }
private void AddRecurringProcessError(ProductImportStatus status) { Label recurringGiftDownloadErrorLabel = new Label(); recurringGiftDownloadErrorLabel.ForeColor = Color.Red; recurringGiftDownloadErrorLabel.Text = status.RecurringGiftDownloadError + NewLineString; if (recurringGiftDownloadErrorLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += recurringGiftDownloadErrorLabel.Text; } Label recurringIntervalCyclesErrorLabel = new Label(); recurringIntervalCyclesErrorLabel.ForeColor = Color.Red; recurringIntervalCyclesErrorLabel.Text = status.RecurringIntervalCyclesError + NewLineString; if (recurringIntervalCyclesErrorLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += recurringIntervalCyclesErrorLabel.Text; } Label recurringIntervalUnitErrorLabel = new Label(); recurringIntervalUnitErrorLabel.ForeColor = Color.Red; recurringIntervalUnitErrorLabel.Text = status.RecurringIntervalUnitError + NewLineString; if (recurringIntervalUnitErrorLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += recurringIntervalUnitErrorLabel.Text; } }
private void AddProductKitItemImportErrorMessages(ProductImportStatus status) { AddProductKitSkuError(status); AddProductKitGroupItemError(status); AddProductKitQuantityError(status); AddProductKitOtherError(status); uxImportProductKitItemMessagePanel.CssClass = "mgl30"; }
private void AddErrorMessageHeader(ProductImportStatus status) { Label label = new Label(); label.ForeColor = Color.Red; label.Text = "<b>Import finished with errors.</b><br />" + status.ImportedCount + " row(s) imported<br />" + status.ErrorCount + " error(s)" + NewLineString; uxMessageLabel.Text += label.Text; }
private void AddDepartmentError(ProductImportStatus status) { Label departmentLabel = new Label(); departmentLabel.ForeColor = Color.FromArgb(153, 0, 255); departmentLabel.Text = status.DepartmentError + NewLineString; if (departmentLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += departmentLabel.Text; } }
private void AddCategoryError(ProductImportStatus status) { Label categoryLabel = new Label(); categoryLabel.ForeColor = Color.FromArgb(153, 0, 255); categoryLabel.Text = status.CategoryError + NewLineString; if (categoryLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += categoryLabel.Text; } }
private void AddRelatedProductError(ProductImportStatus status) { Label relatedLabel = new Label(); relatedLabel.ForeColor = Color.FromArgb(153, 0, 255); relatedLabel.Text = status.RelatedProductError + NewLineString; if (relatedLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += relatedLabel.Text; } }
private void AddProductSkuError(ProductImportStatus status) { Label productSkuErrorLabel = new Label(); productSkuErrorLabel.ForeColor = Color.Red; productSkuErrorLabel.Text = status.ProductSKUError + NewLineString; if (productSkuErrorLabel.Text.Trim() != NewLineString) { uxImportSpecificationMessagePanel.Controls.Add(productSkuErrorLabel); } }
private void AddProductNameError(ProductImportStatus status) { Label nameLabel = new Label(); nameLabel.ForeColor = Color.FromArgb(153, 0, 255); nameLabel.Text = status.ProductNameError + NewLineString; if (nameLabel.Text.Trim() != NewLineString) { uxMessagePanel.Controls.Add(nameLabel); } }
private void AddImageProcessError(ProductImportStatus status) { Label useImageProcessErrorLabel = new Label(); useImageProcessErrorLabel.ForeColor = Color.Red; useImageProcessErrorLabel.Text = status.ImageProcessError + NewLineString; if (useImageProcessErrorLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += useImageProcessErrorLabel.Text; } }
private void AddInventoryAndStockError(ProductImportStatus status) { Label stockLabel = new Label(); stockLabel.ForeColor = Color.FromArgb(153, 0, 255); stockLabel.Text = status.InventoryAndStockError + NewLineString; if (stockLabel.Text.Trim() != NewLineString) { uxMessagePanel.Controls.Add(stockLabel); } }
private void AddProductKitOtherError(ProductImportStatus status) { Label otherErrorLabel = new Label(); otherErrorLabel.ForeColor = Color.Red; otherErrorLabel.Text = status.OtherError + NewLineString; if (otherErrorLabel.Text.Trim() != NewLineString) { uxImportProductKitItemMessagePanel.Controls.Add(otherErrorLabel); } }
private void AddProductKitQuantityError(ProductImportStatus status) { Label productQTYErrorLabel = new Label(); productQTYErrorLabel.ForeColor = Color.Red; productQTYErrorLabel.Text = status.ProductKitQuantityError + NewLineString; if (productQTYErrorLabel.Text.Trim() != NewLineString) { uxImportProductKitItemMessagePanel.Controls.Add(productQTYErrorLabel); } }
private void AddSpecificationItemError(ProductImportStatus status) { Label specificationErrorLabel = new Label(); specificationErrorLabel.ForeColor = Color.Red; specificationErrorLabel.Text = status.SpecificationItemError + NewLineString; if (specificationErrorLabel.Text.Trim() != NewLineString) { uxImportSpecificationMessagePanel.Controls.Add(specificationErrorLabel); } }
private void AddImageError(ProductImportStatus status) { Label imageUploadLabel = new Label(); imageUploadLabel.ForeColor = Color.Red; imageUploadLabel.Text = status.ImageUploadError + NewLineString; if (imageUploadLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += imageUploadLabel.Text; } }
private void AddOtherError(ProductImportStatus status) { Label otherErrorLabel = new Label(); otherErrorLabel.ForeColor = Color.Red; otherErrorLabel.Text = status.OtherError + NewLineString; if (otherErrorLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += otherErrorLabel.Text; } }
private void AddSKUImportedError(ProductImportStatus status) { Label skuLabel = new Label(); skuLabel.ForeColor = Color.FromArgb(153, 0, 255); skuLabel.Text = status.SKUImportedError + NewLineString; if (skuLabel.Text.Trim() != NewLineString) { uxMessagePanel.Controls.Add(skuLabel); } }
private void AddUseOptionError(ProductImportStatus status) { Label useOptionErrorLabel = new Label(); useOptionErrorLabel.ForeColor = Color.Red; useOptionErrorLabel.Text = status.UseOptionError + NewLineString; if (useOptionErrorLabel.Text.Trim() != NewLineString) { uxMessagePanel.Controls.Add(useOptionErrorLabel); } }
private void AddTaxClassError(ProductImportStatus status) { Label taxClassLabel = new Label(); taxClassLabel.ForeColor = Color.FromArgb(153, 0, 255); taxClassLabel.Text = status.TaxClassError + NewLineString; if (taxClassLabel.Text.Trim() != NewLineString) { uxMessageLabel.Text += taxClassLabel.Text; } }
private void AddImportErrorMessages(ProductImportStatus status) { AddErrorMessageHeader(status); AddRelatedProductError(status); AddCategoryError(status); AddImageError(status); AddUseOptionError(status); AddOtherError(status); AddImageProcessError(status); AddRecurringProcessError(status); AddTaxClassError(status); AddDepartmentError(status); // uxMessagePanel.CssClass = "mgl30"; }
private void AddImportErrorMessages(ProductImportStatus status) { AddErrorMessageHeader(status); AddSKUImportedError(status); AddProductNameError(status); AddRelatedProductError(status); AddCategoryError(status); AddDepartmentError(status); AddImageError(status); AddUseOptionError(status); AddOtherError(status); AddImageProcessError(status); AddRecurringProcessError(status); AddTaxClassError(status); AddProductKitGroupError(status); AddInventoryAndStockError(status); uxMessagePanel.CssClass = "mgl30"; }