千家信息网

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

发表于:2025-01-23 作者:千家信息网编辑
千家信息网最后更新 2025年01月23日,这篇文章主要讲解了"JavaScript中怎么实现返回提示信息",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"JavaScript中怎么实现返回提示信息
千家信息网最后更新 2025年01月23日JavaScript中怎么实现返回提示信息

这篇文章主要讲解了"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中怎么实现返回提示信息这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是,小编将为大家推送更多相关知识点的文章,欢迎关注!

0