// GET: Admin/SubCategory/Edit/5 public ActionResult Edit(Guid id) { ViewBag.Categories = categoryService.GetActive(); var updated = subCategoryService.GetById(id); return(View(updated)); }
public ActionResult Update(Guid id)//Bilgisayar { SubCategoryVM model = new SubCategoryVM(); model.SubCategory = sub.GetById(id); model.Categories = category.GetActive(); return(View(model)); }
public ActionResult Update(Guid id) { SubCategory sub = _subCategoryService.GetById(id); SubCategoryVM model = new SubCategoryVM(); model.SubCategory.ID = sub.ID; model.SubCategory.Name = sub.Name; model.SubCategory.Description = sub.Description; List <Category> categorymodel = _categoryService.GetActive(); model.Categories = categorymodel; return(View(model)); }
public ActionResult Update(Product product, SubCategory subc) { Product pr = productService.GetById(product.ID); SubCategory sc = subCategoryService.GetById(subc.ID); pr.ID = product.ID; pr.Name = product.Name; pr.Price = product.Price; pr.UnitsInStock = product.UnitsInStock; sc.ID = subc.ID; subCategoryService.Update(sc); productService.Update(pr); return(RedirectToAction("Index")); }
public PartialViewResult Detail(Guid id) { SubCategory temp = SubCategoryService.GetById(id); return(PartialView(temp)); }