温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

JavaScript中怎么实现返回提示信息

发布时间:2021-11-15 16:13:58 来源:亿速云 阅读:164 作者:iii 栏目:大数据

这篇文章主要讲解了“JavaScript中怎么实现返回提示信息”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“JavaScript中怎么实现返回提示信息”吧!

【服务端】在输出的方法块中,加入要输出的字段(qcm_batch_id)

QCMUserType.cs:

  public struct QCM_Custom_Create_Batch_Out_Tag
        {
            public BASCoreType.Cmn_Out_Tag _cmn_out;
            public string qcm_batch_id;
            public int batch_count;
            public int _size_batch_list;
            public QCM_Custom_Create_Batch_Out_Tag_batch_list[] batch_list;
        }


  public static void serialize_QCM_Custom_Create_Batch_Out_Tag(ref MessageReply reply, ref QCM_Custom_Create_Batch_Out_Tag sourceType)
        {
            BASCoreType.serialize_Cmn_Out_Tag(ref reply, ref sourceType._cmn_out);

            reply.ReplyNode.AddInt("batch_count".ToUpper(), sourceType.batch_count);
            reply.ReplyNode.AddInt("_size_batch_list".ToUpper(), sourceType._size_batch_list);
            reply.ReplyNode.AddString("qcm_batch_id".ToUpper(), sourceType.qcm_batch_id);

            TRSNode batch_list;
            for (int i = 0; i < sourceType._size_batch_list; i++)
            {
                batch_list = reply.ReplyNode.AddNode("batch_list".ToUpper());
                QCMUserType.serialize_QCM_Custom_Create_Batch_Out_Tag_batch_list(ref batch_list, ref sourceType.batch_list[i]);
            }


        }

在数据层设置到要输出的值:

 OutTag.qcm_batch_id = sBatchId;

【客户端】在客户端获取值并弹出提示框:

 CommonFunction.ShowMsgBox(out_node.GetString("QCM_BATCH_ID")+"创建成功!");

=========================

提示信息:是否关闭xxx

     private void btnClose_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (CommonFunction.ShowMsgBox("是否关闭该检查批?", MessageBoxButtons.OKCancel, 1) == DialogResult.OK)
                {
                    GlobalVariable.gaSelectPOID.Clear();
                    int[] iaPOs = gdvDetail.GetSelectedRows();
                    if (iaPOs.Length < 1)
                    {
                        CommonFunction.ShowMsgBox("请选择一条或多条参数");//ToDo: Multi-Language
                        return;
                    }
                    int[] iaRAWID = new int[iaPOs.Length];//+2
                    string sBatchID = "";
                    // string sFinalDecision = "";
                    for (int i = 0; i < iaPOs.Length; i++)
                    {
                        sBatchID = gdvDetail.GetRowCellValue(iaPOs[i], "BATCH_ID").ToString();
                        //sFinalDecision = gdvDetail.GetRowCellValue(iaPOs[i], "FINAL_DECISION").ToString();
                    }

                    //saPARA_ID[iaPOs.Length] = cboModelVer.EditValue.ToString();
                    //saPARA_ID[iaPOs.Length + 1] = "EVENT";
                    TRSNode in_node = new TRSNode("CREATE_BATCH_IN");
                    TRSNode out_node = new TRSNode("CMN_OUT");

                    if (sBatchID != "")
                    {
                        CommonRoutine.SetInMsg(in_node);
                        in_node.ProcStep = '1';


                        in_node.AddString("BATCH_ID", CommonFunction.Trim(sBatchID));



                        if (CommonRoutine.CallService("QCM", "QCM_Custom_Final_Decision", in_node, ref out_node) == false)
                        {
                            return;
                        }

                        CommonRoutine.ShowSuccessMsg(out_node);
                        BindGV();
                        return;
                    }
                    else
                    {
                        CommonFunction.ShowMsgBox("BatchID不能为空!");
                    }
                }
            }
            catch (Exception ex)
            {
                CommonFunction.ShowMsgBox("frmAPSReleaseWO.btnSelect_Click()\n" + ex.Message);
            }

        }

感谢各位的阅读,以上就是“JavaScript中怎么实现返回提示信息”的内容了,经过本文的学习后,相信大家对JavaScript中怎么实现返回提示信息这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI