public ActionResult DeleteConfirmed(int id) { DeductionsMaster deductionsMaster = db.DeductionsMasters.Find(id); db.DeductionsMasters.Remove(deductionsMaster); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CustomerId,DeductionId,DeductionType,ValueMethod,DeductionHead,DeductionAmount,IsActive,IsCreated,CreatedDate")] DeductionsMaster deductionsMaster) { if (ModelState.IsValid) { db.Entry(deductionsMaster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(deductionsMaster)); }
public ActionResult Create([Bind(Include = "DeductionId,DeductionType,ValueMethod,DeductionHead,DeductionAmount,IsActive,IsCreated,CreatedDate")] DeductionsMaster deductionsMaster) { if (ModelState.IsValid) { db.DeductionsMasters.Add(deductionsMaster); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(deductionsMaster)); }
// GET: DeductionsMasters/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DeductionsMaster deductionsMaster = db.DeductionsMasters.Find(id); if (deductionsMaster == null) { return(HttpNotFound()); } return(View(deductionsMaster)); }