基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Lskj.Util.HttpUtil
|
||||
{
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user