Esempio n. 1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            LiquorType liquorType = await db.LiquorTypes.FindAsync(id);

            db.LiquorTypes.Remove(liquorType);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public async Task <ActionResult> Edit([Bind(Include = "Id_liquorType,Descripcion")] LiquorType liquorType)
        {
            if (ModelState.IsValid)
            {
                db.Entry(liquorType).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(liquorType));
        }
Esempio n. 3
0
        public async Task <ActionResult> Create([Bind(Include = "Id_liquorType,Descripcion")] LiquorType liquorType)
        {
            if (ModelState.IsValid)
            {
                db.LiquorTypes.Add(liquorType);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(liquorType));
        }
Esempio n. 4
0
        // GET: LiquorTypes/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LiquorType liquorType = await db.LiquorTypes.FindAsync(id);

            if (liquorType == null)
            {
                return(HttpNotFound());
            }
            return(View(liquorType));
        }
Esempio n. 5
0
 public Liquor(IBeverage beverage, LiquorType liquorType)
     : base(beverage)
 {
     _type = liquorType;
 }
 /// <summary>
 /// Цена - 50
 /// </summary>
 public static IBeverage AddLiquor(this IBeverage beverage, LiquorType liquorType)
 {
     return(new Liquor(beverage, liquorType));
 }
Esempio n. 7
0
 public Liquor(LiquorType typeOfLiquor)
 {
     _typeOfLiquor = typeOfLiquor;
 }
Esempio n. 8
0
 public Liqour(IBeverage beverage, LiquorType type)
     : base(beverage)
 {
     _type = type;
 }