Пример #1
0
 /// <summary>
 /// 响应消息封装类
 /// </summary>
 /// <param name="Status">状态:1-成功;0-缺省; -1失败</param>
 /// <param name="Message">消息内容</param>
 /// <returns></returns>
 public static ResponseResult Error(string errorMessage)
 {
     var result = new ResponseResult();
     result.Status = -1;
     result.Message = errorMessage;
     return result;
 }
Пример #2
0
        /// <summary>
        /// 响应消息封装类
        /// </summary>
        /// <param name="Status">状态:1-成功;0-缺省; -1失败</param>
        /// <param name="Message">消息内容</param>
        /// <returns></returns>
        public static ResponseResult Success(string message = null)
        {
            var result = new ResponseResult();
            result.Status = 1;
            result.Message = message;

            return result;
        }
Пример #3
0
        /// <summary>
        /// 响应消息封装类
        /// </summary>
        /// <param name="Status">状态:1-成功;0-缺省; -1失败</param>
        /// <param name="Message">消息内容</param>
        /// <returns></returns>
        public static ResponseResult Default(string message = null)
        {
            var result = new ResponseResult();
            result.Status = 0;
            result.Message = message;

            return result;
        }