Ejemplo n.º 1
0
 public void AddCurrent(OperatorModel operatorModel)
 {
     if (LoginProvider == "Cookie")
     {
         WebHelper.WriteCookie(LoginUserKey, DESEncrypt.Encrypt(operatorModel.ToJson()), 120);
     }
     else
     {
         WebHelper.WriteSession(LoginUserKey, DESEncrypt.Encrypt(operatorModel.ToJson()));
     }
     WebHelper.WriteSession(LoginUserKey, DESEncrypt.Encrypt(operatorModel.ToJson()));
     WebHelper.WriteCookie("nfine_mac", Md5.md5(Net.GetMacByNetworkInterface().ToJson(), 32));
     WebHelper.WriteCookie("nfine_licence", Licence.GetLicence());
 }
Ejemplo n.º 2
0
        public void SetProvider(string key, string value)
        {
            switch (LoginProvider)
            {
            case Define.PROVIDER_COOKIE:
                WebHelper.WriteCookie(key, value);
                break;

            case Define.PROVIDER_SESSION:
                WebHelper.WriteSession(key, value);
                break;

            case Define.PROVIDER_WEBAPI:
                break;

            default:
                break;
            }
        }