You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
900 B
38 lines
900 B
3 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Web;
|
||
|
|
||
|
namespace MESWebSite.CommonClass
|
||
|
{
|
||
|
public class ResponseResult
|
||
|
{
|
||
|
public bool IsSuccess { get; set; }
|
||
|
public string Message { get; set; }
|
||
|
|
||
|
private ResponseResult() { }
|
||
|
private ResponseResult(bool isSuccess, string message)
|
||
|
{
|
||
|
IsSuccess = isSuccess;
|
||
|
Message = message;
|
||
|
}
|
||
|
|
||
|
|
||
|
public static ResponseResult Success() { return Success(""); }
|
||
|
|
||
|
public static ResponseResult Success(string message)
|
||
|
{
|
||
|
return new ResponseResult(true, message);
|
||
|
}
|
||
|
|
||
|
public static ResponseResult Fail(string message)
|
||
|
{
|
||
|
return new ResponseResult(false, message);
|
||
|
}
|
||
|
|
||
|
public override string ToString()
|
||
|
{
|
||
|
return JSONHelper.ObjectToJSON(this);
|
||
|
}
|
||
|
}
|
||
|
}
|