Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SimCardBatches m = db.SimCardBatches.Find(id);

            db.SimCardBatches.Remove(m);
            db.SaveChanges();
            return(RedirectToAction("Index", "SimCardBatches "));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "SimBatchID,SIM_ManufacturerID,SIM_CardTypeID,ReceivedOn,BatchReference,UnitsReceived,CardLocation")] SimCardBatches m)
 {
     if (ModelState.IsValid)
     {
         db.Entry(m).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index", "SimCardBatches"));
     }
     ViewBag.SIM_ManufacturerID = new SelectList(db.SimCardManufacturers, "SIM_CardManufacturerID", "Name", m.SIM_ManufacturerID);
     ViewBag.SIM_CardTypeID     = new SelectList(db.SimCardTypes, "SIM_CardTypeID", "Name", m.SIM_CardTypeID);
     return(View(m));
 }
Example #3
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SimCardBatches m = db.SimCardBatches.Find(id);

            if (m == null)
            {
                return(HttpNotFound());
            }
            return(View(m));
        }
Example #4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SimCardBatches m = db.SimCardBatches.Find(id);

            if (m == null)
            {
                return(HttpNotFound());
            }
            ViewBag.SIM_ManufacturerID = new SelectList(db.SimCardManufacturers, "SIM_CardManufacturerID", "Name", m.SIM_ManufacturerID);
            ViewBag.SIM_CardTypeID     = new SelectList(db.SimCardTypes, "SIM_CardTypeID", "Name", m.SIM_CardTypeID);
            return(View(m));
        }