C#空间

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

           DataView dv = new DataView(db1DataSet.Tables["表1"]);
            dv.ApplyDefaultSort = true;
            dv.Sort = "dh";
            while (dhh>0)
            {
                if (dv.Find(dhh) < 0)
                {
                    //dh = i;
                    break;
                }
                else
                {
                    dhh = 1 + dhh;
                }
            }
            d["dh"] = dhh;
            d["日期"] = DateTime.Now;
            db1DataSet.Tables["表1"].Rows.Add(d);

posted on 2010-04-05 20:40  小海洋  阅读(260)  评论(0编辑  收藏  举报