Example #1
0
        public string Search(WorkHistoryApiSearcher searcher)
        {
            var vm = CreateVM <WorkHistoryApiListVM>();

            vm.Searcher = searcher;
            return(vm.GetJson());
        }
Example #2
0
        public IActionResult ExportExcel(WorkHistoryApiSearcher searcher)
        {
            var vm = CreateVM <WorkHistoryApiListVM>();

            vm.Searcher     = searcher;
            vm.SearcherMode = ListVMSearchModeEnum.Export;
            var data = vm.GenerateExcel();

            return(File(data, "application/vnd.ms-excel", $"Export_WorkHistory_{DateTime.Now.ToString("yyyy-MM-dd")}.xls"));
        }