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
{
///
/// 同步人员
///
/// 没有特殊说明,传入
///
/// System.String.
/// DomainN, Port, jsonObj
public static ResponseMode PostMethodToObj(string url, string jsonObj)
{
try
{
return PostUtil.PostUrl(url, jsonObj);
}
catch (Exception)
{
throw;
//return JsonConvert.SerializeObject(new ResponseMode{ code = "-1", errorMsg = "非法操作." });
}
}
///
/// 判断key值是否正确
///
///
///
///
public static ResponseMode GetUrl(string url)
{
try
{
return GetUtil.GetJson(url);
}
catch (Exception)
{
throw;
//return JsonConvert.SerializeObject(new ResponseMode{ code = "-1", errorMsg = "非法操作." });
}
}
}
///
/// 新的响应对象
///
public class ResponseMode
{
public int ret;
public string msg;
}
}