public ActionResult Edit(int id, Tug tug) { try { Tug tug1 = new Tug(); tug1 = tugService.GetById(id); tug1.idCar = tug.idCar; tug1.idTug = tug.idTug; tug1.price = tug.price; tug1.reference = tug.reference; tug1.startDate = tug.startDate; tug1.endDate = tug.endDate; tug1.status = tug.status; tug1.type = tug.type; tugService.Update(tug1); tugService.Commit(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult DeleteConfirmed(int id) { Tug tug = db.Tugs.Find(id); db.Tugs.Remove(tug); db.SaveChanges(); return(RedirectToAction("Index")); }
void Awake() { mainCharacter = GameObject.FindWithTag("Player").GetComponent <ShootingMode>(); fixedJoint = GetComponent <FixedJoint2D> (); handleKilling = GameObject.FindWithTag("Player").GetComponent <EnemyKilling>(); arrowType = GetComponent <Shoot> (); tugComponent = mainCharacter.GetComponent <Tug> (); IgnoreOnCollisionEnter = false; }
public ActionResult Edit([Bind(Include = "TugId,TugName,BollardPullName,EngineHPName,ClassTypeName")] Tug tug) { if (ModelState.IsValid) { db.Entry(tug).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tug)); }
public ActionResult Create([Bind(Include = "TugId,TugName,BollardPullName,EngineHPName,ClassTypeName")] Tug tug) { if (ModelState.IsValid) { db.Tugs.Add(tug); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tug)); }
public ActionResult Create(Tug tug) { try { tugService.Add(tug); tugService.Commit(); return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: Tugs/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Tug tug = db.Tugs.Find(id); if (tug == null) { return(HttpNotFound()); } return(View(tug)); }
public ActionResult Delete(int id, Tug tug) { try { Tug tug1 = new Tug(); tug1 = tugService.GetById(id); tugService.Delete(tug1); tugService.Commit(); return(RedirectToAction("Index")); } catch { return(View()); } }
// Use this for initialization void Start() { chainConnectionComponent = GetComponent <ChainConnection>(); tugComponent = GetComponent <Tug>(); rigidbodyComponent = GetComponent <Rigidbody2D>(); groundColliderComponent = GetComponentInChildren <GroundCollider>(); buttonLeftF = swingForwardButton.GetComponent <MoveForward>().ButtonLeft; buttonRightF = swingForwardButton.GetComponent <MoveForward>().ButtonRight; buttonUpF = swingForwardButton.GetComponent <MoveForward>().ButtonUp; buttonDownF = swingForwardButton.GetComponent <MoveForward>().ButtonDown; buttonLeftB = swingBackButton.GetComponent <MoveBack>().ButtonLeft; buttonRightB = swingBackButton.GetComponent <MoveBack>().ButtonRight; buttonUpB = swingBackButton.GetComponent <MoveBack>().ButtonUp; buttonDownB = swingBackButton.GetComponent <MoveBack>().ButtonDown; }
// Use this for initialization void Start() { tugComponent = GetComponent <Tug> (); }