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