コード例 #1
0
        private List <Product> GetList(String ID)
        {
            var list = db.Get_All().Where(item => item.ID.Contains(ID)).ToList();

            foreach (var item in list)
            {
                item.Category = MC.Get(item.Category_ID);
                item.Producer = MP.Get(item.Producer_ID);
            }
            return(list);
        }
コード例 #2
0
        // GET: Categories/Edit/5
        public ActionResult Edit(int id)
        {
            var action = new CheckController().CheckStatus("Categories");

            if (action != null)
            {
                return(action);
            }
            //if (id == null)
            //{
            //    return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            //}
            Category categorie = db.Get(id);

            if (categorie == null)
            {
                return(HttpNotFound());
            }
            return(View(categorie));
        }