Dynamic ax 2012弹出框Message Box

ax2012弹出框

1.消息提示 (Info)

Box::info("Here is message.", "Title");

2.警告提示 (warning)

Box::warning("Here is message.", "Title");

3.错误提示 (Error)

Box::stop("Here is message.", "Title");

4.不要再次提醒

 Box::infoOnce("Here is message.","Title","helpURL","Owner")

5.Yes/No

    DialogButton diagBut;
    str strMessage = "Here is message";
    str strTitle = "Title";
    ;
    diagBut = Box::yesNo(
        strMessage,
        DialogButton::No, // Initial focus is on the No button.
        strTitle);
    if (diagBut == DialogButton::No)
    {
        print "The No button was clicked.";
        pause;
    }
    else
    {
        print "The button that was clicked was: ", diagBut;           
        pause;
    }

效果:

QQ图片20201204121257.png

6.YesNoCancel

static void JobBoxDemo(Args _args)
    {
        DialogButton diagBut;
        str strMessage = "The No button should have initial focus.";
        str strTitle = "Title";
        ;
        diagBut = Box::yesNoCancel(
            strMessage,
            DialogButton::No, // Initial focus is on the No button.
            strTitle);
        if (diagBut == DialogButton::No)
            {
                print "The No button was clicked.";
            }
        else
            {
                print "The button that was clicked was: ", diagBut;
            }
        pause;
    }

7.Yes And All Option

 DialogButton diagBut;
    ;
 
    diagBut = Box::yesAllNoAllCancel("Hellow Microsoft Dynamics AX." ,DialogButton::Yes,"Title");
 
    switch (diagBut)
    {
        case DialogButton::Cancel :
            box::info("You selected the 'Cancel' button.");
            break;
        case DialogButton::No :
            box::info("You selected the 'No' button.");
            break;
        case DialogButton::NoToAll:
            box::info("You selected the 'NoToAll' button.");
            break;
        case DialogButton::Yes :
            box::info("You selected the 'Yes' button.");
            break;
        case DialogButton::YesToAll:
            box::info("You selected the 'YesToAll' button.");
            break;
    }

https://docs.microsoft.com/en-us/dynamicsax-2012/developer/displaying-a-message-box

    Danzel
    Danzel管理员

    • 声明:本文由Danzel于2020-12-04转载(优化),转载须经原站同意并注明出处。
    • 本文地址:http://maryd.cn/?id=142
    上一篇:cache data in AX
    下一篇:Dynamic ax 2012 Dialog and lookup

    留言评论

    暂无留言
    取消
    扫码支持