public ActionResult DeleteConfirmed(int id) { CashPPCModels cashPPCModels = db.CashPPCModels.Find(id); db.CashPPCModels.Remove(cashPPCModels); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,TenderNo,DescriptionOfItem,TotalPages,TotalAmount,IDCardNo,Name,NameOfTheFirm,Address")] CashPPCModels cashPPCModels) { if (ModelState.IsValid) { cashPPCModels.PPCDate = DateTime.Now; db.Entry(cashPPCModels).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cashPPCModels)); }
public ActionResult Create([Bind(Include = "ID,TenderNo,DescriptionOfItem,TotalPages,TotalAmount,IDCardNo,Name,NameOfTheFirm,Address")] CashPPCModels cashPPCModels) { if (ModelState.IsValid) { cashPPCModels.PPCDate = DateTime.Now; db.CashPPCModels.Add(cashPPCModels); db.SaveChanges(); return(RedirectToAction("Index"));//"PPCCopySalesReport"); } return(View(cashPPCModels)); }
// GET: CashPPCModels/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CashPPCModels cashPPCModels = db.CashPPCModels.Find(id); if (cashPPCModels == null) { return(HttpNotFound()); } return(View(cashPPCModels)); }