public static CompanyRightTempEntity DataRowToEntity(DataRow row) { if (row == null) return null; var result = new CompanyRightTempEntity(); result.RoleId = (string)row["RoleId"]; result.CompanyId = (int)row["CompanyId"]; result.Flag = (string)row["RoleId"]; return result; }
public static CompanyRightTempEntity[] DataTableToEntitys(DataTable dt) { if (dt == null) return null; var results = new CompanyRightTempEntity[dt.Rows.Count]; for (int i = 0; i < dt.Rows.Count; i++) { results[i] = CompanyRightTempService.DataRowToEntity(dt.Rows[i]); } return results; }