public 客戶資料聯絡人明細VM 取得客戶聯絡人清單(int id) { var 客戶資料 = Get單筆資料ByID(id); 客戶資料聯絡人明細VM data = new 客戶資料聯絡人明細VM(); data.客戶資料 = 客戶資料; data.客戶聯絡人 = UnitOfWork.Context.Set <客戶聯絡人>().Where(x => !x.是否已刪除 && x.客戶Id == id).AsQueryable(); return(data); }
// GET: 客戶銀行資訊/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } 客戶資料聯絡人明細VM 客戶明細 = repo.取得客戶聯絡人清單(id.Value); if (客戶明細 == null) { return(HttpNotFound()); } return(View(客戶明細)); }