예제 #1
0
        internal static IList <CATEGORY_TRANSLATION> VerifyIsUniversal(IList <CATEGORY_TRANSLATION> catsT, int id)
        {
            bool isUniversal = TranslationBL.CheckIfUniversal(catsT);
            int  count       = catsT.Count();

            if (isUniversal)
            {
                List <CATEGORY_TRANSLATION> result = new List <CATEGORY_TRANSLATION>();
                catsT[0].categoryId = id;
                //change language with universal
                catsT[0].languageId = LanguageBL.FindUniversalId();

                result.Add(catsT[0]);

                return(result);
            }
            else
            {
                foreach (var item in catsT)
                {
                    item.categoryId = id;
                }
                return(catsT);
            }
        }
예제 #2
0
        internal static IList <SHOP_TRANSLATION> VerifyIsUniversal(IList <SHOP_TRANSLATION> shopsTrans, int id)
        {
            bool isUniversal = TranslationBL.CheckIfUniversal(shopsTrans);
            int  count       = shopsTrans.Count();

            if (isUniversal)
            {
                List <SHOP_TRANSLATION> result = new List <SHOP_TRANSLATION>();
                shopsTrans[0].shopId = id;
                //change language with universal
                shopsTrans[0].languageId = LanguageBL.FindUniversalId();

                result.Add(shopsTrans[0]);

                return(result);
            }
            else
            {
                foreach (var item in shopsTrans)
                {
                    item.shopId = id;
                }
                return(shopsTrans);
            }
        }
예제 #3
0
        internal static IList <MESSAGE_TRANSLATION> VerifyIsUniversal(IList <MESSAGE_TRANSLATION> messagesTrans, int id)
        {
            bool isUniversal = TranslationBL.CheckIfUniversal(messagesTrans);
            int  count       = messagesTrans.Count();

            if (isUniversal)
            {
                List <MESSAGE_TRANSLATION> result = new List <MESSAGE_TRANSLATION>();
                messagesTrans[0].messageId = id;
                //change language with universal
                messagesTrans[0].languageId = LanguageBL.FindUniversalId();

                result.Add(messagesTrans[0]);

                return(result);
            }
            else
            {
                foreach (var item in messagesTrans)
                {
                    item.messageId = id;
                }
                return(messagesTrans);
            }
        }
예제 #4
0
        internal static IList <PRODUCT_TRANSLATION> VerifyIsUniversal(IList <PRODUCT_TRANSLATION> productsTrans, int id)
        {
            bool isUniversal = TranslationBL.CheckIfUniversal(productsTrans);
            int  count       = productsTrans.Count();

            if (isUniversal)
            {
                List <PRODUCT_TRANSLATION> result = new List <PRODUCT_TRANSLATION>();
                productsTrans[0].productId = id;
                //change language with universal
                productsTrans[0].languageId = LanguageBL.FindUniversalId();
                if (productsTrans[0].description == null)
                {
                    productsTrans[0].description = " - ";
                }
                result.Add(productsTrans[0]);

                return(result);
            }
            else
            {
                foreach (var item in productsTrans)
                {
                    item.productId = id;
                }
                return(productsTrans);
            }
        }