public void EquipShoe(ShoeType type) { this.ViewModel.ShoeType = type; this.SetShoeSpeed(); this.RefreshMovement(); }
protected void Submitbtn_Click(object sender, EventArgs e) { ShoeType model = new ShoeType(); BootType pt = createBootType(); LabelResult.Text = model.InsertProductType(pt); }
public Shoe() { name = ""; shoeType = ShoeType.Leather; size = 0; description = ""; }
public async Task <IActionResult> Edit(int id, [Bind("ShoeId,ShoeTypeId,ShoeName,Brand,Color,Size")] ShoeType ShoeType) { if (id != ShoeType.ShoeTypeId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(ShoeType); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ShoeTypeExists(ShoeType.ShoeTypeId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(ShoeType)); }
public async Task <IActionResult> Edit(int id, int shoeCount, ShoeType shoeType, int shoesId, double orderPrice) { var shoe = this.shoeService.GetById(shoesId); this.orderService.Edit(id, orderPrice, shoeCount, shoe, shoeType); return(this.RedirectToAction("List")); }
// Shoe constructor public Shoe(ShoeType type, Season season, int size, string color, Condition condition) { Type = type; Season = season; Size = size; Color = color; Condition = condition; }
public EditOrderViewModel(int id, int shoeCount, ShoeType shoeType, Shoe shoe, double orderPrice) { Id = id; ShoeCount = shoeCount; ShoeType = shoeType; Shoe = shoe; OrderPrice = orderPrice; }
public OrderDetailsViewModels(int id, Shoe shoe, int shoeCount, ShoeType shoeType, double orderPrice) { this.id = id; this.shoe = shoe; this.shoeCount = shoeCount; this.shoeType = shoeType; this.orderPrice = orderPrice; }
public ActionResult DeleteConfirmed(int id) { ShoeType shoeType = db.ShoeTypes.Find(id); db.ShoeTypes.Remove(shoeType); db.SaveChanges(); return(RedirectToAction("Index")); }
public OrderViewModel(int id, string username, int shoeCount, ShoeType shoeType, double shoeSize, double orderPrice) { Id = id; Username = username; ShoeSize = shoeSize; ShoeType = shoeType; ShoeSize = shoeSize; OrderPrice = orderPrice; }
public void Edit(int id, double OrderPrice, int shoeCount, Shoe shoe, ShoeType shoeType) { var order = GetById(id); order.Shoe = shoe; order.ShoeType = shoeType; this.dbContext.SaveChanges(); }
public ActionResult Edit([Bind(Include = "ShoeTypeID,ShoeType1")] ShoeType shoeType) { if (ModelState.IsValid) { db.Entry(shoeType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(shoeType)); }
public ShoeViewModel(int id, int amountInStore, bool isOnSale, double price, bool isNewRelease, ShoeType type, double size) { Id = id; AmountInStore = amountInStore; IsOnSale = isOnSale; Type = type; Price = price; IsNewRelease = isNewRelease; Size = size; }
public ActionResult Create([Bind(Include = "ShoeTypeID,ShoeType1")] ShoeType shoeType) { if (ModelState.IsValid) { db.ShoeTypes.Add(shoeType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(shoeType)); }
public async Task <IActionResult> Create([Bind("ShoeId,ShoeTypeId,ShoeName,Brand,Color,Size")] ShoeType ShoeType) { if (ModelState.IsValid) { _context.Add(ShoeType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(ShoeType)); }
public async Task <IActionResult> Create([Bind("TypeId,BrandId,Name,ReleaseDate")] ShoeType shoeType) { if (ModelState.IsValid) { _context.Add(shoeType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(shoeType)); }
public void Edit(int id, int amountInStore, double price, ShoeType shoeType, double size) { var shoe = GetById(id); shoe.Id = id; shoe.AmountInStore = amountInStore; shoe.Price = price; shoe.ShoeType = shoeType; shoe.Size = size; this.dbContext.SaveChanges(); }
public void Create(int id, double orderPrice, int shoeCount, Shoe shoe, ShoeType shoeType) { var order = new Order() { Id = id, OrderPrice = orderPrice, ShoeCount = shoeCount, Shoe = shoe, ShoeType = shoeType }; this.dbContext.Add(order); this.dbContext.SaveChanges(); }
public void Create(int id, int amountInStore, double price, ShoeType shoeType, double size) { var newShoe = new Shoe( id, amountInStore, true, price, true, shoeType, size); this.dbContext.Shoes.Add(newShoe); this.dbContext.SaveChanges(); }
public Shoe InstantiateShoe(ShoeType type, Vector2 position = default(Vector2)) { foreach (var prefab in ShoePrefabs) { var prefabShoe = prefab.GetComponent <Shoe>(); if (prefabShoe.Type == type) { var instance = Instantiate(prefab, position, Quaternion.identity); return(instance.GetComponent <Shoe>()); } } Debug.LogAssertionFormat("No Shoe prefab for shoe type {0}", type); return(null); }
// GET: ShoeTypes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ShoeType shoeType = db.ShoeTypes.Find(id); if (shoeType == null) { return(HttpNotFound()); } return(View(shoeType)); }
public IShoe ProduceShoe(ShoeType type) { switch (type) { case ShoeType.Boot: return(new Boot()); case ShoeType.Sneaker: return(new Sneaker()); case ShoeType.Spikes: return(new Spikes()); default: return(new Boot()); } }
public Sandal(ShoeType type) { this.type = type; }
public StreetShoe(ShoeType type) { this.type = type; }
public static ShoeType NextType(ShoeType prev) { var count = Enum.GetValues(typeof(ShoeType)).Length; return((ShoeType)(((int)prev + 1) % count)); }
public StreetShoe(ShoeType leather) { this.type = leather; }
public static ShoeType PrevType(ShoeType succ) { var count = Enum.GetValues(typeof(ShoeType)).Length; return((ShoeType)(((int)succ + count - 1) % count)); }
public Sandal(ShoeType leather) { this.type = leather; }
public async Task <IActionResult> Create(int id, double orderPrice, int shoeCount, Shoe shoe, ShoeType shoeType) { this.orderService.Create(id, orderPrice, shoeCount, shoe, shoeType); return(this.RedirectToAction("List")); }