コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Supply_Management supply_Management = db.Supply_Managements.Find(id);

            db.Supply_Managements.Remove(supply_Management);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "supply_manage_id,supply_manage_supp_id,subscribe_status_id,rate,item_name,quantity,amount,total_amount")] Supply_Management supply_Management)
 {
     if (ModelState.IsValid)
     {
         db.Entry(supply_Management).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.supply_manage_supp_id = new SelectList(db.Manage_Suppliers, "manage_supp_id", "supplier_name", supply_Management.supply_manage_supp_id);
     ViewBag.subscribe_status_id   = new SelectList(db.Subscribe_Status, "sub_status_id", "sub_status_id", supply_Management.subscribe_status_id);
     ViewBag.supply_manage_id      = new SelectList(db.Reports, "report_id", "report_id", supply_Management.supply_manage_id);
     return(View(supply_Management));
 }
コード例 #3
0
        // GET: Supply_Management/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Supply_Management supply_Management = db.Supply_Managements.Find(id);

            if (supply_Management == null)
            {
                return(HttpNotFound());
            }
            return(View(supply_Management));
        }
コード例 #4
0
        // GET: Supply_Management/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Supply_Management supply_Management = db.Supply_Managements.Find(id);

            if (supply_Management == null)
            {
                return(HttpNotFound());
            }
            ViewBag.supply_manage_supp_id = new SelectList(db.Manage_Suppliers, "manage_supp_id", "supplier_name", supply_Management.supply_manage_supp_id);
            ViewBag.subscribe_status_id   = new SelectList(db.Subscribe_Status, "sub_status_id", "sub_status_id", supply_Management.subscribe_status_id);
            ViewBag.supply_manage_id      = new SelectList(db.Reports, "report_id", "report_id", supply_Management.supply_manage_id);
            return(View(supply_Management));
        }