Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SpecialInstruction specialInstruction = db.SpecialInstructions.Find(id);

            db.SpecialInstructions.Remove(specialInstruction);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "id,indawoId,instruction")] SpecialInstruction specialInstruction)
 {
     if (ModelState.IsValid)
     {
         db.Entry(specialInstruction).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(specialInstruction));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "id,indawoId,instruction")] SpecialInstruction specialInstruction)
        {
            ViewBag.indawoId = new SelectList(db.Indawoes, "id", "name", specialInstruction.indawoId);
            if (ModelState.IsValid)
            {
                db.SpecialInstructions.Add(specialInstruction);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(specialInstruction));
        }
Пример #4
0
        // GET: SpecialInstructions/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SpecialInstruction specialInstruction = db.SpecialInstructions.Find(id);

            if (specialInstruction == null)
            {
                return(HttpNotFound());
            }
            return(View(specialInstruction));
        }
Пример #5
0
 public void Init(float distance, Vector3 value, GameThing gameThing, Reflex reflex, bool canBlend, SpecialInstruction specialInstruction)
 {
     this.Distance           = distance;
     this.GameThing          = gameThing;
     this.Reflex             = reflex;
     this.Value              = value;
     this.Used               = false;
     this.ActedOn            = false;
     this.CanBlend           = canBlend;
     this.specialInstruction = specialInstruction;
 }