public CompanyVO[] Collection(DataTable table) { int length = table.Rows.Count; CompanyVO[] result = new CompanyVO[length]; for (int i = 0; i < length; i++) { result [i] = new CompanyVO (); } return result; }
CompanyVO Init(DataRow dr) { if (dr == null) return null; CompanyVO VO = new CompanyVO (); VO.conpanyId = dr["conpany_id"] as string; VO.name = dr["name"] as string; VO.city = dr["city"] as string; VO.date = Convert.ToInt32(dr["date"]); VO.address = dr["address"] as string; return VO; }