怎么做一个简单的图书管理的数据库
不会写啊
1.增加
dw_edit.reset()
dw_edit.settransobject(sqlca)
//dw_list.settransobject(sqlca)
dw_edit.insertrow(0)
cb_save.enabled = true
cb_delete.enabled = false
2.删除
dw_edit.setitem(dw_edit.getrow(),"state",-1)
cb_save.triggerevent(clicked!)
cb_save.enabled = false
3.保存
integer li_i
dw_edit.accepttext()
for li_i=1 to dw_edit.rowcount()
if trim(dw_edit.getitemstring(li_i,"name"))="" or isnull(dw_edit.getitemstring(li_i,"name")) then
messagebox("系统提示","第" +string(li_i)+"行分组名称为空")
dw_edit.setrow(li_i)
dw_edit.setcolumn("name")
dw_edit.setfocus()
return
end if
next
if dw_edit.update()=1 then
commit using sqlca;
cb_find.triggerevent(clicked!)
dw_list.retrieve("%%")
dw_edit.reset()
this.enabled = false
cb_delete.enabled = false
else
rollback using sqlca;
messagebox("系统提示","保存数据失败,请仔细检查数据")
end if
4.退出
close(parent)