public IActionResult OnGet(int attributeId) { Attribute = attributeData.GetById(attributeId); Products = productData.GetProductsByName(""); ProductAttributesData = productAttributesData; return(Page()); }
public IActionResult OnPost(int attributeId) { var i = 0; ProductAttributesData = productAttributesData; foreach (var boolean in IsChecked) { if (boolean) { var pa = new ProductAttributes(); pa.AttributeId = attributeId; pa.ProductId = productData.GetProductsByName("").ToList()[i].Id; ProductAttributesData.Add(pa); productAttributesData.Commit(); } i++; } return(RedirectToPage("./List")); }
public AttributeEditModel(IProductData productData, IProductAttributesData productAttributesData, IAttributeData attributeData) { this.productData = productData; this.productAttributesData = productAttributesData; this.attributeData = attributeData; }
public ConnectProductModel(IProductData productData, IProductAttributesData productAttributesData, IAttributeData attributeData) { this.productData = productData; this.productAttributesData = productAttributesData; this.attributeData = attributeData; }
public AttributeDeleteModel(IAttributeData attributeData, IProductAttributesData productAttributesData) { this.attributeData = attributeData; this.productAttributesData = productAttributesData; }
public DetailsModel(IProductData productData, IProductAttributesData productAttributesData) { this.productData = productData; this.productAttributesData = productAttributesData; }
public ProductDeleteModel(IProductData productData, IProductAttributesData productAttributesData) { this.productData = productData; this.productAttributesData = productAttributesData; }