public ActionResult DeleteConfirmed(int id) { StockIssueType stockIssueType = db.StockIssueTypes.Find(id); db.StockIssueTypes.Remove(stockIssueType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "StockIssueTypeId,Name,Type")] StockIssueType stockIssueType) { if (ModelState.IsValid) { db.Entry(stockIssueType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stockIssueType)); }
public ActionResult Create([Bind(Include = "StockIssueTypeId,Name,Type")] StockIssueType stockIssueType) { if (ModelState.IsValid) { db.StockIssueTypes.Add(stockIssueType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stockIssueType)); }
// GET: StockIssueTypes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } StockIssueType stockIssueType = db.StockIssueTypes.Find(id); if (stockIssueType == null) { return(HttpNotFound()); } return(View(stockIssueType)); }