//提供数据的方法 public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 string employname = "0"; if (p.extParam.ContainsKey("employname")) { employname = p.extParam["employname"]; } if (employname == "") { employname = "0"; } string employcode = "0"; if (p.extParam.ContainsKey("employcode")) { employcode = p.extParam["employcode"]; } if (employcode == "") { employcode = "0"; } string StartTime = "0"; if (p.extParam.ContainsKey("StartTime")) { StartTime = p.extParam["StartTime"]; } if (StartTime == "") { StartTime = "0"; } string EndTime = "0"; if (p.extParam.ContainsKey("EndTime")) { EndTime = p.extParam["EndTime"]; } if (EndTime == "") { EndTime = "0"; } string workcontent = "0"; if (p.extParam.ContainsKey("workcontent")) { workcontent = p.extParam["workcontent"]; } if (workcontent == "") { workcontent = "0"; } TeModel tm = new TeModel(); result.table = tm.EmployeeInfo(employname, employcode, StartTime, EndTime, workcontent); return(result); }