コード例 #1
0
        // GET: 客戶資料/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ViewBag.客戶分類 = repo.Get客戶分類下拉選單列表();
            var data = repo.Get單筆資料ByID(id.Value);

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