基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
|
||||
using Hoker.Util;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Lserp_UpdateServer
|
||||
{
|
||||
public sealed class NewEmp
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 同步人员
|
||||
/// </summary>
|
||||
/// <param name="
|
||||
/// ">没有特殊说明,传入</param>
|
||||
/// <param name="jsonBody"></param>
|
||||
/// <returns>System.String.</returns>
|
||||
/// DomainN, Port, jsonObj
|
||||
|
||||
public static ResponseMode PostMethodToObj(string url, string jsonObj)
|
||||
{
|
||||
try
|
||||
{
|
||||
return PostUtil.PostUrl<ResponseMode>(url, jsonObj);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
//return JsonConvert.SerializeObject(new ResponseMode{ code = "-1", errorMsg = "非法操作." });
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断key值是否正确
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="jsonObj"></param>
|
||||
/// <returns></returns>
|
||||
public static ResponseMode GetUrl(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
return 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user