Esempio n. 1
0
        public void EquipShoe(ShoeType type)
        {
            this.ViewModel.ShoeType = type;

            this.SetShoeSpeed();
            this.RefreshMovement();
        }
Esempio n. 2
0
        protected void Submitbtn_Click(object sender, EventArgs e)
        {
            ShoeType model = new ShoeType();
            BootType pt    = createBootType();

            LabelResult.Text = model.InsertProductType(pt);
        }
Esempio n. 3
0
 public Shoe()
 {
     name        = "";
     shoeType    = ShoeType.Leather;
     size        = 0;
     description = "";
 }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        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"));
        }
Esempio n. 6
0
 // Shoe constructor
 public Shoe(ShoeType type, Season season, int size, string color, Condition condition)
 {
     Type      = type;
     Season    = season;
     Size      = size;
     Color     = color;
     Condition = condition;
 }
Esempio n. 7
0
 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"));
        }
Esempio n. 10
0
 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;
 }
Esempio n. 11
0
        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));
 }
Esempio n. 13
0
 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));
        }
Esempio n. 15
0
        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));
        }
Esempio n. 16
0
        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));
        }
Esempio n. 17
0
        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();
        }
Esempio n. 18
0
        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();
        }
Esempio n. 19
0
        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();
        }
Esempio n. 20
0
 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));
        }
Esempio n. 22
0
    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());
        }
    }
Esempio n. 23
0
 public Sandal(ShoeType type)
 {
     this.type = type;
 }
Esempio n. 24
0
 public StreetShoe(ShoeType type)
 {
     this.type = type;
 }
Esempio n. 25
0
File: Shoe.cs Progetto: gluyas/LEGS
    public static ShoeType NextType(ShoeType prev)
    {
        var count = Enum.GetValues(typeof(ShoeType)).Length;

        return((ShoeType)(((int)prev + 1) % count));
    }
Esempio n. 26
0
 public StreetShoe(ShoeType leather)
 {
     this.type = leather;
 }
Esempio n. 27
0
File: Shoe.cs Progetto: gluyas/LEGS
    public static ShoeType PrevType(ShoeType succ)
    {
        var count = Enum.GetValues(typeof(ShoeType)).Length;

        return((ShoeType)(((int)succ + count - 1) % count));
    }
Esempio n. 28
0
 public Sandal(ShoeType leather)
 {
     this.type = leather;
 }
Esempio n. 29
0
        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"));
        }