Esempio n. 1
0
 /// <summary>
 /// ��������б�
 /// </summary>
 public List<SeoWebSite.Model.BetItems> DataTableToList(DataTable dt)
 {
     List<SeoWebSite.Model.BetItems> modelList = new List<SeoWebSite.Model.BetItems>();
     int rowsCount = dt.Rows.Count;
     if (rowsCount > 0)
     {
         SeoWebSite.Model.BetItems model;
         for (int n = 0; n < rowsCount; n++)
         {
             model = new SeoWebSite.Model.BetItems();
             model.id=dt.Rows[n]["id"].ToString();
             model.name=dt.Rows[n]["name"].ToString();
             model.description=dt.Rows[n]["description"].ToString();
             modelList.Add(model);
         }
     }
     return modelList;
 }
Esempio n. 2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <SeoWebSite.Model.BetItems> DataTableToList(DataTable dt)
        {
            List <SeoWebSite.Model.BetItems> modelList = new List <SeoWebSite.Model.BetItems>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                SeoWebSite.Model.BetItems model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model             = new SeoWebSite.Model.BetItems();
                    model.id          = dt.Rows[n]["id"].ToString();
                    model.name        = dt.Rows[n]["name"].ToString();
                    model.description = dt.Rows[n]["description"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Esempio n. 3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(SeoWebSite.Model.BetItems model)
 {
     dal.Update(model);
 }
Esempio n. 4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(SeoWebSite.Model.BetItems model)
 {
     dal.Add(model);
 }