Beispiel #1
0
        public ActionResult Edit(int?Id)
        {
            if (Id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            SubCategory SubCategory = Handler.GetSubCategory(Id);

            if (SubCategory == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CategoryId = new SelectList(Context.Categories, "Id", "Name", SubCategory.CategoryId);
            return(View(SubCategory));
        }