예제 #1
0
 public ArticleVO[] Collection(DataTable table)
 {
     int length = table.Rows.Count;
     ArticleVO[] result = new ArticleVO[length];
     for (int i = 0; i < length; i++) {
         result [i] = new ArticleVO ();
     }
     return result;
 }
예제 #2
0
 ArticleVO Init(DataRow dr)
 {
     if (dr == null)
         return null;
     ArticleVO VO = new ArticleVO ();
     VO.articleId = dr["article_id"] as string;
     VO.title = dr["title"] as string;
     VO.caption = dr["caption"] as string;
     VO.author = dr["author"] as string;
     VO.model = dr["model"] as string;
     VO.pubtime = Convert.ToInt32(dr["pubtime"]);
     VO.summary = dr["summary"] as string;
     VO.reads = Convert.ToInt32(dr["reads"]);
     VO.ispost = dr["ispost"] as string;
     VO.comeUrl = dr["come_url"] as string;
     VO.come = dr["come"] as string;
     VO.keyword = dr["keyword"] as string;
     VO.uid = dr["uid"] as string;
     VO.categorys = dr["categorys"] as string;
     VO.jtype = dr["jtype"] as string;
     VO.categoryId = dr["category_id"] as string;
     VO.iscash = dr["iscash"] as string;
     return VO;
 }