for DaHongMen
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

27 lines
703 B

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;
}
}
}