重置用户状态(初始化用户)

 1 void resetUserData()
 2 {
 3     DialogButton    button;
 4     SysLastValue    sysLastValue;
 5     Dialog          Dialog = new Dialog("@SYS70748");
 6     DialogField     dlg    = Dialog.addField(typeid(UserId));
 7     userId          userId;
 8 ;
 9     dlg.value(curuserId());
10     Dialog.doInit();
11     if(!Dialog.run())
12         return;
13 
14     userId = dlg.value();
15     if(userId)
16     {
17         button= Box::yesNoCancel("@SYS62458", DialogButton::No, "@SYS70748");
18         if (button == DialogButton::Yes)
19         {
20             ttsbegin;
21             delete_from sysLastValue
22                 where sysLastValue.UserId == userId;
23             ttscommit;
24         }
25     }
26 }
posted @ 2012-08-30 15:53  Sprite.z  Views(358)  Comments(0Edit  收藏  举报