Exemple #1
0
 public ActionResult Details(int?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     model.ItemDecoracao itemdecoracao = new data.ItemDecoracao().GetElement(id.HasValue ? id.Value : 0);
     if (itemdecoracao == null)
     {
         return(HttpNotFound());
     }
     return(View(itemdecoracao));
 }
Exemple #2
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            model.ItemDecoracao itemdecoracao = new data.ItemDecoracao().GetElement(id.HasValue ? id.Value : 0);
            if (itemdecoracao == null)
            {
                return(HttpNotFound());
            }
            SelectList TipoItemDecoracao = new SelectList(new data.TipoItemDecoracao().GetCollection(0).OrderBy(tid => tid.Nome), "Id", "Nome");

            ViewBag.TipoItemDecoracao = TipoItemDecoracao;
            return(View(itemdecoracao));
        }