public ActionResult DeleteConfirmed(int id) { tblCustomerTranactionType tblCustomerTranactionType = db.tblCustomerTranactionTypes.Find(id); db.tblCustomerTranactionTypes.Remove(tblCustomerTranactionType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Transaction_type_id,Transaction_type")] tblCustomerTranactionType tblCustomerTranactionType) { if (ModelState.IsValid) { db.Entry(tblCustomerTranactionType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblCustomerTranactionType)); }
public ActionResult Create([Bind(Include = "Transaction_type_id,Transaction_type")] tblCustomerTranactionType tblCustomerTranactionType) { if (ModelState.IsValid) { db.tblCustomerTranactionTypes.Add(tblCustomerTranactionType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblCustomerTranactionType)); }
// GET: CustomerTranactionTypes/Delete/6 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblCustomerTranactionType tblCustomerTranactionType = db.tblCustomerTranactionTypes.Find(id); if (tblCustomerTranactionType == null) { return(HttpNotFound()); } return(View(tblCustomerTranactionType)); }