public JsonResult GetRangeGata([ModelBinder(typeof(DataTablesBinder))] IDataTablesRequest requestModel) { PositionRCollection collection = T_COM_Master_PositionManager.GetPositionRange(SystemConfig.DefaultEntity); int TotalRecord = 0; if (collection.Count > 0) { TotalRecord = collection[0].TotalRecord; } return(Json(new DataTablesResponse(requestModel.Draw, collection, TotalRecord, TotalRecord), JsonRequestBehavior.AllowGet)); }
public string ExportExcelRange() { PositionRCollection collection = T_COM_Master_PositionManager.GetPositionRange(SystemConfig.DefaultEntity); DataTable dt = collection.ToDataTable <PositionR>(); string fileName = "T_COM_Master_Position_" + SystemConfig.CurrentDate.ToString("MM-dd-yyyy"); string[] RemoveColumn = { "CompanyID", "TargetDisplayID", "ReturnDisplay", "TotalRecord", "CreatedUser", "CreatedDate" }; for (int i = 0; i < RemoveColumn.Length; i++) { if (dt.Columns.Contains(RemoveColumn[i])) { dt.Columns.Remove(RemoveColumn[i]); } } FileInputHelper.ExportExcel(dt, fileName, "T_COM_Master_Position List", false); return(fileName); }