public ActionResult ExportXLSList(QueryContactModel model) { var contactData = ContactRepo.Query(model); return(File(ContactRepo.ExportXLS(contactData), "application/vnd.ms-excel", "客戶聯絡人資料.xls")); }
public ActionResult ExportXLSXList(QueryContactModel model) { var contactData = ContactRepo.Query(model); return(File(ContactRepo.ExportXLSX(contactData), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "客戶聯絡人資料.xlsx")); }
// GET: /Contact public ActionResult Index(QueryContactModel model) { ViewBag.JobTitle = new SelectList(ContactRepo.All().Select(p => new { JobTitle = p.職稱 }).Distinct(), "JobTitle", "JobTitle", model.JobTitle); return(View(ContactRepo.Query(model, 1))); }