JobVO Init(DataRow dr) { if (dr == null) return null; JobVO VO = new JobVO (); VO.jobId = dr["job_id"] as string; VO.title = dr["title"] as string; VO.region = dr["region"] as string; VO.reads = Convert.ToInt32(dr["reads"]); VO.sex = dr["sex"] as string; VO.height = dr["height"] as string; VO.overtime = Convert.ToInt32(dr["overtime"]); VO.context = dr["context"] as string; VO.jTime = dr["j_time"] as string; VO.jAddress = dr["j_address"] as string; VO.mobile = dr["mobile"] as string; VO.spec = dr["spec"] as string; VO.note = dr["note"] as string; VO.type = dr["type"] as string; VO.jtype = dr["jtype"] as string; VO.people = Convert.ToInt32(dr["people"]); VO.status = dr["status"] as string; VO.price = dr["price"] as string; VO.city = dr["city"] as string; VO.extend = dr["extend"] as string; return VO; }
public JobVO[] Collection(DataTable table) { int length = table.Rows.Count; JobVO[] result = new JobVO[length]; for (int i = 0; i < length; i++) { result [i] = new JobVO (); } return result; }