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

            db.Purchase_Credits.Remove(purchase_Credits);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Purchase_CreditID,Bill_Number,Product_purchase_record,Payment,Balance,Total_Amount,Date,Shop_name")] Purchase_Credits purchase_Credits)
 {
     if (ModelState.IsValid)
     {
         db.Entry(purchase_Credits).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Bill_Number             = new SelectList(db.Bill_Number, "Bill_ID", "Bill_Number1", purchase_Credits.Bill_Number);
     ViewBag.Date                    = new SelectList(db.Date_Time, "Date_Time_ID", "Date_Time_ID", purchase_Credits.Date);
     ViewBag.Product_purchase_record = new SelectList(db.Product_Purchase_Record, "PPR_ID", "Product_name", purchase_Credits.Product_purchase_record);
     ViewBag.Shop_name               = new SelectList(db.Shop_Details, "Shop_ID", "Shop_name", purchase_Credits.Shop_name);
     return(View(purchase_Credits));
 }
Beispiel #3
0
        // GET: Purchase_Credits/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Purchase_Credits purchase_Credits = db.Purchase_Credits.Find(id);

            if (purchase_Credits == null)
            {
                return(HttpNotFound());
            }
            return(View(purchase_Credits));
        }
Beispiel #4
0
        // GET: Purchase_Credits/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Purchase_Credits purchase_Credits = db.Purchase_Credits.Find(id);

            if (purchase_Credits == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Bill_Number             = new SelectList(db.Bill_Number, "Bill_ID", "Bill_Number1", purchase_Credits.Bill_Number);
            ViewBag.Date                    = new SelectList(db.Date_Time, "Date_Time_ID", "Date_Time_ID", purchase_Credits.Date);
            ViewBag.Product_purchase_record = new SelectList(db.Product_Purchase_Record, "PPR_ID", "Product_name", purchase_Credits.Product_purchase_record);
            ViewBag.Shop_name               = new SelectList(db.Shop_Details, "Shop_ID", "Shop_name", purchase_Credits.Shop_name);
            return(View(purchase_Credits));
        }