Exemplo n.º 1
0
        //Add Data From Linked Tables for Display
        public void EditItemForDisplay(PolicyCountryGroupItemLanguage policyCountryGroupItemLanguage)
        {
            //Add LanguageName
            if (policyCountryGroupItemLanguage.LanguageCode != null)
            {
                LanguageRepository languageRepository = new LanguageRepository();
                Language           language           = new Language();
                language = languageRepository.GetLanguage(policyCountryGroupItemLanguage.LanguageCode);
                if (language != null)
                {
                    policyCountryGroupItemLanguage.LanguageName = language.LanguageName;
                }
            }

            //Add PolicyGroupName
            PolicyCountryGroupItemRepository policyCountryGroupItemRepository = new PolicyCountryGroupItemRepository();
            PolicyCountryGroupItem           policyCountryGroupItem           = new PolicyCountryGroupItem();

            policyCountryGroupItem = policyCountryGroupItemRepository.GetPolicyCountryGroupItem(policyCountryGroupItemLanguage.PolicyCountryGroupItemId);


            if (policyCountryGroupItem != null)
            {
                policyCountryGroupItemRepository.EditItemForDisplay(policyCountryGroupItem);
                policyCountryGroupItemLanguage.PolicyGroupName = policyCountryGroupItem.PolicyGroupName;
                policyCountryGroupItemLanguage.PolicyGroupId   = policyCountryGroupItem.PolicyGroupId;
            }
        }