使用Dorado的AutoSqlDataset的例子

1.保存
  table : employee
  datasetType : autoSql
  思路 : use updateCommand to do it and finish it autoly by Dorado.
2.删除选中记录
  table : employee
  datasetType : autoSql
  commandType : updateCommand
  思路 : give the command a submitScope property valued of "selected";
         if you add a new filed to dataset for being selected, the dataset can't be autoSqlDataset but can be referenceDataset.
3.为当前员工加薪
  table : employee
  datasetType : autoSql
  commandType : updateCommand
  思路 : set the submitScope property of command at "current";
4.保存并记录日志
  table : employee
  datasetType : autoSql
  commandType : updateCommand
 
思想 :
1.AutoSqlDataset可以自动完成与数据库的交互工作,不需要用户操作。
2.AutoSqlDataset与数据库的交互是在DefaultViewModel的方法里面定义的
3.如果我们写了自己的View并且继承了DefaultViewModel, 则父类的doUpdateData,doLoadData方法自动与数据库交互,
  所以我们的方法里面应该由super.doUpdateData(parameters, outParameters);或super.doLoadData()结束。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值