Reset usage data for jobs

static void Jimmy_resetUserData(Args _args)
{
    DialogButton    button;
    SysLastValue    sysLastValue;
    Dialog          Dialog = new Dialog("@SYS70748");
    DialogField     dlg    = Dialog.addField(typeid(UserId));
    userId          userId;
;
    dlg.value(curuserId());
    Dialog.doInit();
    if(!Dialog.run())
        return;

    userId = dlg.value();
    if(userId)
    {
        button= Box::yesNoCancel("@SYS62458", DialogButton::No, "@SYS70748");
        if (button == DialogButton::Yes)
        {
            ttsbegin;
            delete_from sysLastValue
                where sysLastValue.UserId == userId;
            ttscommit;
        }
    }
}

posted @ 2010-11-24 15:30  Fandy Xie  Views(263)  Comments(0Edit  收藏  举报