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();