// GET: 客戶資料/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            客戶資料 客戶資料 = repo.GetById(id.Value);

            if (客戶資料 == null)
            {
                return(HttpNotFound());
            }
            return(View(客戶資料));
        }
Ejemplo n.º 2
0
        public ActionResult Manage(int id, FormCollection form)
        {
            var 客戶資料 = repo.GetById(id);

            if (TryUpdateModel(客戶資料, new string[] { "客戶名稱", "統一編號", "電話", "傳真", "地址", "Email" }))
            {
                repo.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }
            return(View(客戶資料));
        }