Пример #1
0
 public IActionResult OnGet(int attributeId)
 {
     Attribute             = attributeData.GetById(attributeId);
     Products              = productData.GetProductsByName("");
     ProductAttributesData = productAttributesData;
     return(Page());
 }
Пример #2
0
        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"));
        }
Пример #3
0
 public AttributeEditModel(IProductData productData, IProductAttributesData productAttributesData, IAttributeData attributeData)
 {
     this.productData           = productData;
     this.productAttributesData = productAttributesData;
     this.attributeData         = attributeData;
 }
Пример #4
0
 public ConnectProductModel(IProductData productData, IProductAttributesData productAttributesData, IAttributeData attributeData)
 {
     this.productData           = productData;
     this.productAttributesData = productAttributesData;
     this.attributeData         = attributeData;
 }
Пример #5
0
 public AttributeDeleteModel(IAttributeData attributeData, IProductAttributesData productAttributesData)
 {
     this.attributeData         = attributeData;
     this.productAttributesData = productAttributesData;
 }
Пример #6
0
 public DetailsModel(IProductData productData, IProductAttributesData productAttributesData)
 {
     this.productData           = productData;
     this.productAttributesData = productAttributesData;
 }
Пример #7
0
 public ProductDeleteModel(IProductData productData, IProductAttributesData productAttributesData)
 {
     this.productData           = productData;
     this.productAttributesData = productAttributesData;
 }