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

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