zoukankan      html  css  js  c++  java
  • JOSN传字符串方法

    #region 提示信息
            /// <summary>
            /// 操作失败(无参数)
            /// </summary>
            /// <returns></returns>
            public string failure()
            {
                return "{"statusCode":"300", "message":"操作失败"}";
            }
            /// <summary>
            /// 操作失败(有参数)
            /// </summary>
            /// <param name="str">错误提示</param>
            /// <returns></returns>
            public string failure(string str)
            {
                return "{"statusCode":"300", "message":"操作失败!" + str + ""}";
            }
            /// <summary>
            /// 操作成功(无参数)
            /// </summary>
            /// <returns></returns>
            public string success()
            {
                return "{"statusCode":"200", "message":"操作成功!","callbackType":"closeCurrent"}";
            }
    
            public string success1()
            {
                return "{"statusCode":"200", "message":"操作成功!"}";
            }
    
            /// <summary>
            /// 操作成功(有参数)
            /// </summary>
            /// <param name="str">信息</param>
            /// <param name="navTabId">页面指向</param>
            /// <returns></returns>
            public string success(string str, string navTabId)
            {
                return "{"statusCode":"200", "message":"操作成功!" + str + "","navTabId":"" + navTabId + ""}";
            }
            public string success(string navTabId)
            {
                return "{"statusCode":"200", "message":"操作成功!","callbackType":"closeCurrent","navTabId":"" + navTabId + ""}";
            }
    
            /// <summary>
            /// 操作成功(有参数)
            /// </summary>
            /// <param name="str">信息</param>
            /// <param name="navTabId">页面指向</param>
            /// <returns></returns>
            public string succes(string str, string navTabId)
            {
                return "{"statusCode":"200", "message":"" + str + "","callbackType":"closeCurrent","navTabId":"" + navTabId + ""}";
            }
            #endregion
    View Code
  • 相关阅读:
    常用排序算法
    eclipse下切换svn用户和 svn插件的使用
    随机红包算法(Java)
    Java中值类型和引用类型的区别?
    CSS引入的方式有哪些? link和@import的区别是?
    在orale中向左/向右填充字符
    select查看oracle表中列的数据类型
    比较使用DateTimePicker组件Delphi 7日期
    【转】Delphi中字符串的处理
    用MySQL 数字类型如何正确的转换函数
  • 原文地址:https://www.cnblogs.com/donchen/p/4031228.html
Copyright © 2011-2022 走看看