Esempio n. 1
0
        /// <summary>
        ///Get client
        /// </summary>
        /// <param name="ctx">context</param>
        /// <param name="AD_Client_ID">id</param>
        /// <returns>client</returns>
        public static MClient Get(Ctx ctx, int AD_Client_ID)
        {
            int     key    = AD_Client_ID;
            MClient client = (MClient)s_cache[key];

            if (client != null)
            {
                return(client);
            }
            client = new MClient(ctx, AD_Client_ID, null);
            if (AD_Client_ID == 0)
            {
                client.Load((Trx)null);
            }
            s_cache.Add(key, client);
            return(client);
        }