public ActionResult ExportXLSXDataList(QueryCompanyModel model) { var companyData = CompanyRepo.Query(model); return(File(CompanyRepo.ExportXLSX(companyData), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "客戶資料.xlsx")); }
// GET: /Company public ActionResult Index(QueryCompanyModel model) { ViewBag.CompanyType = new SelectList(CompanyRepo.All().Select(p => new { CompanyType = p.客戶分類 }).Distinct(), "CompanyType", "CompanyType", model.CompanyType); return(View(CompanyRepo.Query(model, 1))); }
public ActionResult ExportXLSDataList(QueryCompanyModel model) { var companyData = CompanyRepo.Query(model); return(File(CompanyRepo.ExportXLS(companyData), "application/vnd.ms-excel", "客戶資料.xls")); }
// GET: /Company/List public ActionResult List(QueryCompanyModel model) { return(View(ListRepo.Query(model, 1))); }