Ejemplo n.º 1
0
 public ActionResult Create(ProductsCategoriesmolels collection)
 {
     try
     {
         using (ContextBll ctx = new ContextBll())
         {
             int catid = ctx.CreateCategories(collection.CategoryID, collection.Categorie);
             ctx.CreateProduct(collection.ProductsID, catid, collection.SellerID, collection.Name, collection.Descrption, collection.ReservePrice, collection.WinningofferID, collection.Comments, collection.Photos, collection.Categorie, "sellerName", "sellerName");
         }
         // TODO: Add insert logic
         return(RedirectToAction("Index", "Products"));
     }
     catch (Exception EX)
     {
         return(View());
     }
 }
Ejemplo n.º 2
0
        public ActionResult Create(BusinessLogicLayer.CategorieBLL collection)
        {
            try
            {
                // TODO: Add insert logic here
                using (ContextBll ctx = new ContextBll())
                {
                    ctx.CreateCategories(collection);
                }

                return(RedirectToAction("Index"));
            }
            catch (Exception Ex)
            {
                ViewBag.Exception = Ex;
                return(View("Error"));
            }
        }