public ActionResult DeleteConfirmed(int id) { Gold_PurchaseRecord gold_PurchaseRecord = db.Gold_PurchaseRecord.Find(id); db.Gold_PurchaseRecord.Remove(gold_PurchaseRecord); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "GP_ID,Vendor_name,Weight,Rate,Amount,Paid,Remaining,Shop_name")] Gold_PurchaseRecord gold_PurchaseRecord) { if (ModelState.IsValid) { db.Entry(gold_PurchaseRecord).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Shop_name = new SelectList(db.Shop_Details, "Shop_ID", "Shop_name", gold_PurchaseRecord.Shop_name); return(View(gold_PurchaseRecord)); }
// GET: Gold_PurchaseRecord/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Gold_PurchaseRecord gold_PurchaseRecord = db.Gold_PurchaseRecord.Find(id); if (gold_PurchaseRecord == null) { return(HttpNotFound()); } return(View(gold_PurchaseRecord)); }
// GET: Gold_PurchaseRecord/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Gold_PurchaseRecord gold_PurchaseRecord = db.Gold_PurchaseRecord.Find(id); if (gold_PurchaseRecord == null) { return(HttpNotFound()); } ViewBag.Shop_name = new SelectList(db.Shop_Details, "Shop_ID", "Shop_name", gold_PurchaseRecord.Shop_name); return(View(gold_PurchaseRecord)); }