コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            HeilShip heilShip = db.HeilShips.Find(id);

            db.HeilShips.Remove(heilShip);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "HeilShipId,OrderDateTime,CustomerId,CustomerDivisionId,MlsDivisionId,CustomerOrderNo,CustomerOrderLine,SoNumber,WoNumber,CustomerPn,UhPn,PartDescription,OrderQty,ShipQty,RequestedDateTime,PromiseDateTime,ShipDateTime,ShipPlanStatusId,CQStatusId,Carrier,TrackingInfo,ShipToAddress,Notes")] HeilShip heilShip)
 {
     if (ModelState.IsValid)
     {
         db.Entry(heilShip).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(heilShip));
 }
コード例 #3
0
        // GET: HeilShips/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HeilShip heilShip = db.HeilShips.Find(id);

            if (heilShip == null)
            {
                return(HttpNotFound());
            }
            return(View(heilShip));
        }