using Forks.JsonRpc.Client;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace FourComponentWeightClient.Utils
|
|
{
|
|
public static class LoginUtil
|
|
{
|
|
public static void Login(string userName, string pwd)
|
|
{
|
|
AppContext.InitRpc();
|
|
RpcFacade.Login(userName, pwd);
|
|
AppContext.Instance.UserName = userName;
|
|
XmlUtil.SerializerObjToFile(AppContext.Instance);
|
|
}
|
|
|
|
internal static string GetUserNameByCode(string code)
|
|
{
|
|
AppContext.InitRpc();
|
|
var method = "/MainSystem/B3CowButcherManage/Rpcs/ClientRpc/GetWpfUserName";
|
|
var result = RpcFacade.Call<string>(method, code);
|
|
return result;
|
|
}
|
|
}
|
|
}
|