增加数据            

     OrmCommonClient orm = new OrmCommonClient();
                List<BackUp> list=new List<BackUp>();
                BackUp bp = new BackUp();
                bp.Version = version;
                bp.Date = backtime;
                bp.Path = path2;
                list.Add(bp);
                orm.AddEntityList(list);

datagridview 数据源绑定(查询数据)    

       OrmCommonClient orm = new OrmCommonClient();
            BackUp bp = new BackUp();
            List<BackUp> bpList = orm.GetEntity(bp, false);
            this.dataGridView1.DataSource = bpList;

 根据条件查询

                    OrmCommonClient orm = new OrmCommonClient();
                    RpotDefType report = new RpotDefType();
                    report.Rpot_id = rpot_id;
                    List<RpotDefType> rdtList = orm.GetEntity(report, true);

posted on 2011-11-15 16:14  swarb  阅读(212)  评论(0编辑  收藏  举报