Files
lserp_cs_6.0/其他程序/SynchronousOven/NewEmp.cs
T
cyf ab56a9bcf7 基线 SVN r240
SVN-Revision: r240
2025-02-06 06:46:06 +00:00

93 lines
2.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SynchronousOven
{
public sealed class NewEmp
{
/// <summary>
/// 同步数据
/// </summary>
/// <param name="
/// ">没有特殊说明,传入</param>
public static ResponseMode PostMethodToObj(string url, string jsonObj)
{
try
{
return HttpUtil.PostUtil.PostUrl<ResponseMode>(url, jsonObj);
}
catch (Exception)
{
throw;
//return JsonConvert.SerializeObject(new ResponseMode{ code = "-1", errorMsg = "非法操作." });
}
}
/// <summary>
/// 同步数据
/// </summary>
public static ResponseMode GetUrl(string url)
{
try
{
return HttpUtil.GetUtil.GetJson<ResponseMode>(url);
}
catch (Exception)
{
throw;
//return JsonConvert.SerializeObject(new ResponseMode{ code = "-1", errorMsg = "非法操作." });
}
}
/// <summary>
/// 新的响应对象
/// </summary>
public class ResponseMode
{
public int ret;
public string msg;
// public data data;
}
/// <summary>
/// 同步数据
/// </summary>
/// <param name="
/// ">没有特殊说明,传入</param>
public static newResponseMode newPostMethodToObj(string url, string jsonObj)
{
try
{
return HttpUtil.PostUtil.PostUrl<newResponseMode>(url, jsonObj);
}
catch (Exception)
{
throw;
//return JsonConvert.SerializeObject(new ResponseMode{ code = "-1", errorMsg = "非法操作." });
}
}
/// <summary>
/// 新的响应对象
/// </summary>
public class newResponseMode
{
//public int ret;
public string msg;
public string code;
public data data;
}
}
}