public static EmployeeCMDeptEntity DataRowToEntity2(DataRow dataRow) { if (dataRow == null) return null; var result = new EmployeeCMDeptEntity(); var entity = DataRowToEntity1(dataRow); FengSharp.Tool.Reflect.ClassValueCopier.Copy(result, entity); result.DeptNo = dataRow["DeptNo"].ToString(); result.DeptName = dataRow["DeptName"].ToString(); return result; }
public static EmployeeCMDeptEntity[] DataTableToEntitys2(DataTable dt) { if (dt == null) return null; var results = new EmployeeCMDeptEntity[dt.Rows.Count]; for (int i = 0; i < dt.Rows.Count; i++) { results[i] = EmployeeService.DataRowToEntity2(dt.Rows[i]); } return results; }