public IActionResult ExportExcel(MajorListVM vm) { vm.SearcherMode = vm.Ids != null && vm.Ids.Count > 0 ? ListVMSearchModeEnum.CheckExport : ListVMSearchModeEnum.Export; var data = vm.GenerateExcel(); return(File(data, "application/vnd.ms-excel", $"Export_ActionLog_{DateTime.Now.ToString("yyyy-MM-dd")}.xls")); }
public string Search(MajorListVM vm) { if (ModelState.IsValid == true) { return(vm.GetJson(false)); } else { return(vm.GetError()); } }
public StudentVM() { MajorList = new MajorListVM(); SetInclude(x => x.StudentMajor); }
public StudentVM() { MajorList = new MajorListVM(); MajorList.CopyContext(this); SetInclude(x => x.StudentMajor); }
public string Search(MajorListVM vm) { return(vm.GetJson(false)); }