public ActionResult DeleteConfirmed(string id) { Category_Sales_for_1997 category_Sales_for_1997 = db.Category_Sales_for_1997.Find(id); db.Category_Sales_for_1997.Remove(category_Sales_for_1997); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CategoryName,CategorySales")] Category_Sales_for_1997 category_Sales_for_1997) { if (ModelState.IsValid) { db.Entry(category_Sales_for_1997).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category_Sales_for_1997)); }
public ActionResult Create([Bind(Include = "CategoryName,CategorySales")] Category_Sales_for_1997 category_Sales_for_1997) { if (ModelState.IsValid) { db.Category_Sales_for_1997.Add(category_Sales_for_1997); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category_Sales_for_1997)); }
// GET: Category_Sales_for_1997/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Category_Sales_for_1997 category_Sales_for_1997 = db.Category_Sales_for_1997.Find(id); if (category_Sales_for_1997 == null) { return(HttpNotFound()); } return(View(category_Sales_for_1997)); }
public static Category_Sales_for_1997 CreateCategory_Sales_for_1997(string categoryName) { Category_Sales_for_1997 category_Sales_for_1997 = new Category_Sales_for_1997(); category_Sales_for_1997.CategoryName = categoryName; return category_Sales_for_1997; }
public void AddToCategory_Sales_for_1997(Category_Sales_for_1997 category_Sales_for_1997) { base.AddObject("Category_Sales_for_1997", category_Sales_for_1997); }