// // GET: /StockPickTypes/Edit/5 public ActionResult Edit(int id = 0) { StockPickType stockpicktype = db.StockPickTypes.Find(id); if (stockpicktype == null) { return(HttpNotFound()); } return(View(stockpicktype)); }
public ActionResult Edit(StockPickType stockpicktype) { if (ModelState.IsValid) { db.Entry(stockpicktype).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stockpicktype)); }
public ActionResult Create(StockPickType stockpicktype) { if (ModelState.IsValid) { db.StockPickTypes.Add(stockpicktype); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stockpicktype)); }