public ActionResult DeleteConfirmed(int id) { datang datang = db.datang.Find(id); db.datang.Remove(datang); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,uid,name,password,grp,time,other")] datang datang) { if (ModelState.IsValid) { db.Entry(datang).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(datang)); }
public ActionResult Create([Bind(Include = "id,uid,name,password,grp,time,other")] datang datang) { if (ModelState.IsValid) { db.datang.Add(datang); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(datang)); }
// GET: datangs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } datang datang = db.datang.Find(id); if (datang == null) { return(HttpNotFound()); } return(View(datang)); }