public ActionResult ExportMealAllowanceToMoneyList([DataSourceRequest] DataSourceRequest request, Can_MealAllowanceToMoneySearchModel model) { return ExportAllAndReturn<Can_MealAllowanceToMoneyModel, Can_MealAllowanceToMoneyEntity, Can_MealAllowanceToMoneySearchModel>(request, model, ConstantSql.hrm_can_get_MealAllowanceToMoney); }
public ActionResult GetMealAllowanceToMoneyList([DataSourceRequest] DataSourceRequest request, Can_MealAllowanceToMoneySearchModel mealModel) { var result = GetListData<Can_MealAllowanceToMoneyModel, Can_MealAllowanceToMoneyEntity, Can_MealAllowanceToMoneySearchModel> (request, mealModel, ConstantSql.hrm_can_get_MealAllowanceToMoney, ref status).Translate<Can_MealAllowanceToMoneyModel>(); if (mealModel.IsExport) { var fullPath = ExportService.Export(result, mealModel.ValueFields.Split(',')); return Json(fullPath); } request.Page = 1; var dataSourceResult = result.ToDataSourceResult(request); dataSourceResult.Total = result.Count() <= 0 ? 0 : result.FirstOrDefault().TotalRow; return Json(dataSourceResult); }