Exemplo n.º 1
0
        private void UpdateAdditionalLanguages(PartnerInfoTDSPartnerAdditionalInfoRow AOtherDataDR)
        {
            const char LANG_SEPARATOR = '|';
            const string LANG_LIST_SEPARATOR = "; ";

            string[] AdditionalLangs;

            if (!AOtherDataDR.IsAdditionalLanguagesNull())
            {
                if (AOtherDataDR.AdditionalLanguages != "")
                {
                    txtLanguages.Text = txtLanguages.Text + " (Main Lang.); Also: ";

                    AdditionalLangs = AOtherDataDR.AdditionalLanguages.Split(new char[] { LANG_SEPARATOR });

                    for (int Counter = 0; Counter < AdditionalLangs.Length; Counter++)
                    {
                        txtLanguages.Text = txtLanguages.Text +
                                            Cache_Lookup.TMCommon.DetermineLanguageNameFromCode(AdditionalLangs[Counter]) +
                                            LANG_LIST_SEPARATOR;
                    }

                    txtLanguages.Text = txtLanguages.Text.Substring(0,
                        txtLanguages.Text.Length - LANG_LIST_SEPARATOR.Length) + ".";
                }
            }
        }