예제 #1
0
        //Add Data From Linked Tables for Display
        public void EditItemForDisplay(PolicyAirParameterGroupItemLanguage policyAirParameterGroupItemLanguage)
        {
            //Add LanguageName
            if (policyAirParameterGroupItemLanguage.LanguageCode != null)
            {
                LanguageRepository languageRepository = new LanguageRepository();
                Language           language           = new Language();
                language = languageRepository.GetLanguage(policyAirParameterGroupItemLanguage.LanguageCode);
                if (language != null)
                {
                    policyAirParameterGroupItemLanguage.LanguageName = language.LanguageName;
                }
            }

            //Add PolicyGroupName
            PolicyAirParameterGroupItemRepository policyAirParameterGroupItemRepository = new PolicyAirParameterGroupItemRepository();
            PolicyAirParameterGroupItem           policyAirParameterGroupItem           = new PolicyAirParameterGroupItem();

            policyAirParameterGroupItem = policyAirParameterGroupItemRepository.GetPolicyAirParameterGroupItem(policyAirParameterGroupItemLanguage.PolicyAirParameterGroupItemId);


            if (policyAirParameterGroupItem != null)
            {
                PolicyGroupRepository policyGroupRepository = new PolicyGroupRepository();
                PolicyGroup           policyGroup           = new PolicyGroup();
                policyGroup = policyGroupRepository.GetGroup(policyAirParameterGroupItem.PolicyGroupId);

                //policyAirParameterGroupItemRepository.EditItemForDisplay(policyAirParameterGroupItem);
                policyAirParameterGroupItemLanguage.PolicyGroupName = policyGroup.PolicyGroupName;
                policyAirParameterGroupItemLanguage.PolicyGroupId   = policyAirParameterGroupItem.PolicyGroupId;
            }
        }