public static bool SetCache(long userID, string userCode, string userName, string userPwd, long orgID) { AuthContext authCtx = new AuthContext(); authCtx.UserID = userID; authCtx.UserCode = userCode; authCtx.UserName = userName; authCtx.UserPwd = userPwd; authCtx.Org = orgID; return NHExt.Runtime.Auth.AuthContext.SetCache(authCtx); }
public static void SetContext(long userID, string userCode, string userName, string userPwd, long orgC, long org, string remoteIP, List<long> dataOrgList = null) { AuthContext authCtx = new AuthContext(); authCtx.UserID = userID; authCtx.UserCode = userCode; authCtx.UserName = userName; authCtx.UserPwd = userPwd; authCtx.OrgC = orgC; authCtx.Org = org; authCtx.RemoteIP = remoteIP; authCtx.DataOrgList = new List<long>(); NHExt.Runtime.Auth.AuthContext.SetContext(authCtx); }