Example #1
0
        /// <summary>
        ///Delete translation for po
        /// </summary>
        /// <param name="po">persistent object</param>
        /// <returns>true if no active language or translation deleted</returns>
        public static Boolean Delete(PO po)
        {
            if (!TranslationTable.IsActiveLanguages(false))
            {
                return(true);
            }
            TranslationTable table = TranslationTable.Get(po.Get_TableName());

            return(table.DeleteTranslation(po));
        }
Example #2
0
        /// <summary>
        ///Get TranslationTable from Cache
        /// </summary>
        /// <param name="baseTableName">base table name</param>
        /// <returns>TranslationTable</returns>
        public static TranslationTable Get(String baseTableName)
        {
            TranslationTable retValue = (TranslationTable)s_cache[baseTableName];

            if (retValue != null)
            {
                return(retValue);
            }
            retValue = new TranslationTable(baseTableName);
            s_cache.Add(baseTableName, retValue);
            return(retValue);
        }
Example #3
0
        /// <summary>
        ///Save translation for po
        /// </summary>
        /// <param name="po">persistent object</param>
        /// <param name="newRecord">newRecord new</param>
        /// <returns>true if no active language or translation saved/reset</returns>
        public static bool Save(PO po, bool newRecord)
        {
            if (!TranslationTable.IsActiveLanguages(false))
            {
                return(true);
            }
            TranslationTable table = TranslationTable.Get(po.Get_TableName());

            if (newRecord)
            {
                return(table.CreateTranslation(po));
            }
            return(table.ResetTranslationFlag(po));
        }