示例#1
0
        /// <summary>
        /// 输出结果,并指定message属性
        /// </summary>
        /// <param name="success">是否执行成功</param>
        /// <param name="message">相关消息</param>
        public static void Write(bool success, string message)
        {
            Hashtable h = new Hashtable();

            h.Add("success", success);
            h.Add("message", message);

            JsonOut.Write(h);
        }
示例#2
0
        /// <summary>
        /// 输出结果并附加一组数组,数组通过json的data属性获取
        /// </summary>
        /// <param name="success">是否执行成功</param>
        /// <param name="data">数组数据</param>
        public static void Write(bool success, string[] data)
        {
            Hashtable h = new Hashtable();

            h.Add("success", success);
            h.Add("message", "");
            h.Add("data", data);

            JsonOut.Write(h);
        }
示例#3
0
        /// <summary>
        /// 输出结果并附加一组数据
        /// </summary>
        /// <param name="success">是否执行成功</param>
        /// <param name="appdate">数据</param>
        public static void Write(bool success, Hashtable appdate)
        {
            Hashtable h = new Hashtable();

            h.Add("success", success);
            h.Add("message", "");

            IDictionaryEnumerator e = appdate.GetEnumerator();

            while (e.MoveNext())
            {
                h[e.Key] = e.Value;
            }

            JsonOut.Write(h);
        }
示例#4
0
 /// <summary>
 /// 输出结果
 /// </summary>
 /// <param name="success">是否执行成功</param>
 public static void Write(bool success)
 {
     JsonOut.Write(success, "");
 }