public ActionResult DeleteConfirmed(string venderID, string materialID) { SUPPLIES sUPPLIES = db.SUPPLIES.Find(venderID, materialID); db.SUPPLIES.Remove(sUPPLIES); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Vender_ID,Material_ID,Supply_Unit_Price")] SUPPLIES sUPPLIES) { if (ModelState.IsValid) { db.Entry(sUPPLIES).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Material_ID = new SelectList(db.RAW_MATERIAL, "Material_ID", "Material_Name", sUPPLIES.Material_ID); ViewBag.Vender_ID = new SelectList(db.VENDER, "Vender_ID", "Vender_Name", sUPPLIES.Vender_ID); return(View(sUPPLIES)); }
// GET: SUPPLIES/Details/5 public ActionResult Details(string venderID, string materialID) { if (venderID == null || materialID == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SUPPLIES sUPPLIES = db.SUPPLIES.Find(venderID, materialID); if (sUPPLIES == null) { return(HttpNotFound()); } return(View(sUPPLIES)); }
// GET: SUPPLIES/Edit/5 public ActionResult Edit(string venderID, string materialID) { if (venderID == null || materialID == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SUPPLIES sUPPLIES = db.SUPPLIES.Find(venderID, materialID); if (sUPPLIES == null) { return(HttpNotFound()); } ViewBag.Material_ID = new SelectList(db.RAW_MATERIAL, "Material_ID", "Material_Name", sUPPLIES.Material_ID); ViewBag.Vender_ID = new SelectList(db.VENDER, "Vender_ID", "Vender_Name", sUPPLIES.Vender_ID); return(View(sUPPLIES)); }
public AddNewGoodWindow(SUPPLIES supplies) { InitializeComponent(); this.DataContext = (addNewGoodViewModel = new AddNewGoodViewModel(supplies)); }