Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CashPPCModels cashPPCModels = db.CashPPCModels.Find(id);

            db.CashPPCModels.Remove(cashPPCModels);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 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));
 }
Beispiel #3
0
        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));
        }
Beispiel #4
0
        // 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));
        }