using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
|
namespace IStation.Dto
|
{
|
/// <summary>
|
/// 执行返回的通用类,该类带有详细的业务数据,除了告诉用户此次调用是否成功与否,以及一个表示提示信息的字符串外,还带的详细的业务数据
|
/// </summary>
|
public class ApiResult_Boolean : ApiResult
|
{
|
/// <summary>
|
/// 业务数据
|
/// </summary>
|
public Boolean IsOK { get; set; }
|
|
/// <summary>
|
/// 构造函数
|
/// </summary>
|
public ApiResult_Boolean() { }
|
|
/// <summary>
|
/// 构造函数
|
/// </summary>
|
/// <param name="IsOK">是否成功</param>
|
/// <param name="type">状态标识</param>
|
/// <param name="message">提示信息</param>
|
public ApiResult_Boolean(bool IsOK, IStation.Dto.ApiResultCode type, string message)
|
: base(type, message)
|
{
|
this.IsOK = IsOK;
|
}
|
|
/// <summary>
|
/// 构造函数
|
/// </summary>
|
/// <param name="IsOK">是否成功</param>
|
public ApiResult_Boolean(bool IsOK)
|
{
|
this.Code = IsOK ? IStation.Dto.ApiResultCode.Success : IStation.Dto.ApiResultCode.Error;
|
this.Message = "";
|
this.IsOK = IsOK;
|
}
|
}
|
|
}
|