using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Muchinfo.MTPClient.Infrastructure.LinkProxy;
using Muchinfo.MTPClient.Infrastructure.Utilities;
using Muchinfo.MTPClient.IService;
namespace Muchinfo.MTPClient.Service
{
///
/// 风管云平台专用服务
///
public class ErmcpService: IErmcpService
{
public void GetLoginId(string username, Action successAction, Action errorAction)
{
var url = string.Format("{0}{1}?username={2}", LinkManager.Instance.Parameters.GoCommonSearchUrl,
"/User/GetLoginID",
username);
var jsonString = HttpUtility.HttpGet(url);
if (jsonString != null)
{
Dictionary dicJson =
Newtonsoft.Json.JsonConvert.DeserializeObject>(jsonString);
if (dicJson["code"].ToString() == "200")
{
successAction(dicJson["data"].ToString());
return;
}
}
successAction(username);
}
}
}