Пример #1
0
 // GET: /ItemBebida/Details/5
 public ActionResult Details(int?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     model.ItemBebida itembebida = new data.ItemBebida().GetElement(id.HasValue ? id.Value : 0);
     if (itembebida == null)
     {
         return(HttpNotFound());
     }
     return(View(itembebida));
 }
Пример #2
0
        // GET: /ItemBebida/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            model.ItemBebida itembebida = new data.ItemBebida().GetElement(id.HasValue ? id.Value : 0);
            if (itembebida == null)
            {
                return(HttpNotFound());
            }
            SelectList TipoItemBebida = new SelectList(new data.TipoItemBebida().GetCollection(0).OrderBy(tid => tid.Nome), "Id", "Nome");

            ViewBag.TipoItemBebida = TipoItemBebida;
            return(View(itembebida));
        }