Exemplo n.º 1
0
        public ActionResult Insert(int id = 0)
        {
            productCLS productModel = new productCLS();

            using (andinoshopEntities db = new andinoshopEntities())
            {
                productModel.CategoryCollection = db.category.ToList <category>();
                productModel.BrandCollection    = db.brand.ToList <brand>();
            }

            return(View(productModel));
        }
Exemplo n.º 2
0
        public ActionResult Delete(int IdProduct)
        {
            productCLS tProductCLS = new productCLS();
            var        datos       = client.productDatos(IdProduct);

            tProductCLS.product_id    = datos.product_id;
            tProductCLS.name          = datos.name;
            tProductCLS.name_brand    = datos.name_brand;
            tProductCLS.description   = datos.description;
            tProductCLS.name_category = datos.name_category;

            return(View(tProductCLS));
        }
Exemplo n.º 3
0
 public ActionResult Delete(productCLS tProductCLS)
 {
     client.productGuardar(tProductCLS.product_id, tProductCLS.name, tProductCLS.brand, tProductCLS.description, tProductCLS.category, "D");
     return(RedirectToAction("Index"));
 }
Exemplo n.º 4
0
 public ActionResult Insert(productCLS oproductCLS, productCLS product)
 {
     client.productGuardar(0, oproductCLS.name, oproductCLS.brand, oproductCLS.description, oproductCLS.category, "A");
     return(RedirectToAction("Index"));
 }