コード例 #1
0
        public ActionResult DeleteConfirmed(string venderID, string materialID)
        {
            SUPPLIES sUPPLIES = db.SUPPLIES.Find(venderID, materialID);

            db.SUPPLIES.Remove(sUPPLIES);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        // 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));
        }
コード例 #4
0
        // 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));
        }
コード例 #5
0
 public AddNewGoodWindow(SUPPLIES supplies)
 {
     InitializeComponent();
     this.DataContext = (addNewGoodViewModel = new AddNewGoodViewModel(supplies));
 }