public ActionResult Edit([Bind(Include = "CariUyruk_ID,CariUyruk_Adi,CariUyruk_Status,CariUyruk_CreateDate")] CariUyruk cariUyruk) { if (ModelState.IsValid) { db.Entry(cariUyruk).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cariUyruk)); }
public ActionResult Create([Bind(Include = "CariUyruk_ID,CariUyruk_Adi,CariUyruk_Status,CariUyruk_CreateDate")] CariUyruk cariUyruk) { if (ModelState.IsValid) { cariUyruk.CariUyruk_Status = (int)DBStatus.Active; cariUyruk.CariUyruk_CreateDate = DateTime.Now; db.CariUyruk.Add(cariUyruk); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cariUyruk)); }
// GET: CariUyruk/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CariUyruk cariUyruk = db.CariUyruk.Find(id); if (cariUyruk == null) { return(HttpNotFound()); } return(View(cariUyruk)); }
// GET: CariUyruk/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CariUyruk cariUyruk = db.CariUyruk.Find(id); if (cariUyruk == null) { return(HttpNotFound()); } cariUyruk.CariUyruk_Status = (int)DBStatus.Deleted; db.SaveChanges(); return(RedirectToAction("Index")); }