public ActionResult DeleteConfirmed(string id) { Gen_Mst_Product gen_Mst_Product = db.Gen_Mst_Product.Find(id); db.Gen_Mst_Product.Remove(gen_Mst_Product); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ProductCode,ProductName,Comments")] Gen_Mst_Product gen_Mst_Product) { if (ModelState.IsValid) { db.Entry(gen_Mst_Product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gen_Mst_Product)); }
public ActionResult Create([Bind(Include = "ProductCode,ProductName,Comments")] Gen_Mst_Product gen_Mst_Product) { if (ModelState.IsValid) { db.Gen_Mst_Product.Add(gen_Mst_Product); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gen_Mst_Product)); }
// GET: Gen_Mst_Product/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Gen_Mst_Product gen_Mst_Product = db.Gen_Mst_Product.Find(id); if (gen_Mst_Product == null) { return(HttpNotFound()); } return(View(gen_Mst_Product)); }