You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB
C#

11 months ago
using System.Web.Mvc;
using HcUtility.Comm;
namespace DSWeb.TruckMng.Helper
{
public class JsonResponse
{
public bool Success {get;set;}
public string Message {get;set;}
public object Data {get;set;}
public object DataBody { get; set; }
public ContentResult getContentReult() {
ContentResult result = new ContentResult();
result.Content = JsonConvert.Serialize(this);
return result;
}
public void SetDBResult(DBResult r)
{
Success = r.Success;
Message = r.Message;
Data = r.Data;
}
public JsonResponse() {
}
public JsonResponse(DBResult r) {
SetDBResult(r);
}
}
public class jsonresponse
{
public bool success { get; set; }
public string message { get; set; }
public object data { get; set; }
public object databody { get; set; }
public ContentResult getContentReult()
{
ContentResult result = new ContentResult();
result.Content = JsonConvert.Serialize(this);
return result;
}
}
}