2025-03-28 09:49:56 +08:00

73 lines
2.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/********************************************
// 类名MessageModel
// 功能描述:用于返回方法的执行结果的通用格式
// 创建人:齐海宽
// 创建时间2020-10-30
// 描述包含返回消息的整体状态IsSuccesstrue成功 false失败 状态码(StatusCode)使用者在具体使用场景自己定义Msg描述消息Obj带有执行结果类返回如数据集
// 修改人:
// 修改时间:
// 修改描述:
//******************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace ServerPartTransmission.Model
{
/// <summary>
/// 操作结果类,用作返回某方法的执行结果及详情
/// </summary>
public class MessageModel
{
private int _IsSuccess = 0;//总体执行是否成功,缺省值为0
private string _StatusCode;//返回状态码,各状态码代表含义供使用者使用时的场景自己定义
private string _Msg;//对于返回状态的描述,如:执行成功
private object _Obj;//带有返回值类型的方法使用下面对象来存储返回值
/// <summary>
/// 总体执行是否成功:1,成功0失败
/// </summary>
public int IsSuccess
{
get => _IsSuccess;
set => _IsSuccess = value;
}
/// <summary>
/// 返回状态码,各状态码代表含义供使用者使用时的场景自己定义
/// </summary>
public string StatusCode
{
get => _StatusCode;
set => _StatusCode = value;
}
/// <summary>
/// 对于返回状态的描述,如:执行成功
/// </summary>
public string Msg
{
get => _Msg;
set => _Msg = value;
}
/// <summary>
/// 带有返回值类型的方法使用下面对象来存储返回值
/// </summary>
public object Obj
{
get => _Obj;
set => _Obj = value;
}
}
}