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