Exemplo n.º 1
0
        private void removeK3CloudApiClientFormCache(K3CloudApiClient k3CloudApiClient)
        {
            var removeObj = k3CloudApiClientCache.Where(p => p.ApiServerInfo.Equals(p.ApiServerInfo)).SingleOrDefault();

            if (removeObj == null)
            {
                return;
            }

            k3CloudApiClientCache.Remove(removeObj);
        }
Exemplo n.º 2
0
        private K3CloudApiClient createK3CloudApiClient()
        {
            var result      = new K3CloudApiClient(this.ApiServerInfo);
            var loginResult = result.ValidateUser(this.ApiServerInfo.Dbid, this.ApiServerInfo.UserName, this.ApiServerInfo.Password, this.ApiServerInfo.Lcid);
            var resultType  = JObject.Parse(loginResult)["LoginResultType"].Value <int>();

            if (resultType != 1)
            {
                throw new Exception(loginResult);
            }

            return(result);
        }
Exemplo n.º 3
0
 private void setK3CloudApiClientFormCache(K3CloudApiClient k3CloudApiClient)
 {
     k3CloudApiClientCache.Add(k3CloudApiClient);
 }