public ActionResult DeleteConfirmed(int id) { tr_depreciation_detail tr_depreciation_detail = db.tr_depreciation_detail.Find(id); db.tr_depreciation_detail.Remove(tr_depreciation_detail); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "depreciation_detail_id,depreciation_id,depreciation_type_id,period,period_year,period_month,fl_active,created_date,created_by,updated_date,updated_by,deleted_date,deleted_by,org_id")] tr_depreciation_detail tr_depreciation_detail) { if (ModelState.IsValid) { db.Entry(tr_depreciation_detail).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tr_depreciation_detail)); }
// GET: depreciation_detail/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tr_depreciation_detail tr_depreciation_detail = db.tr_depreciation_detail.Find(id); if (tr_depreciation_detail == null) { return(HttpNotFound()); } return(View(tr_depreciation_detail)); }