public TicketVO[] Collection(DataTable table) { int length = table.Rows.Count; TicketVO[] result = new TicketVO[length]; for (int i = 0; i < length; i++) { result [i] = new TicketVO (); } return result; }
TicketVO Init(DataRow dr) { if (dr == null) return null; TicketVO VO = new TicketVO (); VO.ticket = dr["ticket"] as string; VO.url = dr["url"] as string; VO.createtime = Convert.ToInt32(dr["createtime"]); VO.expireSeconds = Convert.ToInt32(dr["expire_seconds"]); VO.title = dr["title"] as string; return VO; }