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