诗.程序.人生

我们互相笑一笑, 就知道了幸福的滋味, 把已逝的青春都忘了。
posts - 1, comments - 0, trackbacks - 0, articles - 9
  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

ECO中基本的增、删、更新等操作

Posted on 2006-05-08 16:29 诗.程序.人生 阅读(122) 评论(0)  编辑 收藏 引用 所属分类: ECO

增:
new Person(EcoSpace);

增关联对象:
AcctItem acct=new AcctItem(EcoSpace);
acct.Person=(Person)ehPerson.Element.GetAsCollection()[dgPersons.CurrentRowIn
dex].AsObject;

删:
ehPerson.Element.GetAsCollection().RemoveAt(dgPersons.CurrentRowIndex);
ehAcctItem.Element.GetAsCollection().RemoveAt(dgAcctItems.CurrentRowIndex);

彻底删除:
AcctItem item=(AcctItem)ehAcctItem.Element.GetAsCollection()[Index].AsObject;
item.AsIObject().Delete();


数据更新(写到数据库中):
EcoSpace.UpdateDatabase();

只有注册用户登录后才能发表评论。