예제 #1
0
        private int SaveIndicatorAs(string selectedProfileId, string selectedDomain, int selectedAreaType,
                                    int selectedSex, int selectedAge, int selectedComparator, int selectedComparatorMethod,
                                    string selectedComparatorConfidence, int selectedYearType, int selectedYearRange, int selectedValueType,
                                    int selectedCiMethodType, string selectedCiConfidenceLevel, int selectedPolarityType, int selectedUnitType,
                                    int selectedDenominatorType, string mtvText, int startYear, int endYear, int startQuarterRange,
                                    int endQuarterRange, int startMonthRange, int endMonthRange, int?selectedDecimalPlaces, int?selectedTargetId)
        {
            IList <IndicatorMetadataTextProperty> properties = _reader.GetIndicatorMetadataTextProperties();

            int nextIndicatorId;

            nextIndicatorId = _profileRepository.GetNextIndicatorId();

            if (string.IsNullOrWhiteSpace(mtvText) == false)
            {
                CommonUtilities.CreateNewIndicatorTextValues(selectedDomain, mtvText, properties, nextIndicatorId,
                                                             _userName, _profileRepository);

                _profileRepository.CreateGroupingAndMetaData(_reader.GetProfileDetails(selectedProfileId).Id,
                                                             Convert.ToInt32(selectedDomain),
                                                             nextIndicatorId, selectedAreaType, selectedSex, selectedAge, selectedComparator,
                                                             selectedComparatorMethod,
                                                             Convert.ToDouble(selectedComparatorConfidence), selectedYearType, selectedYearRange,
                                                             selectedValueType, selectedCiMethodType,
                                                             Convert.ToSingle(selectedCiConfidenceLevel), selectedPolarityType, selectedUnitType,
                                                             selectedDenominatorType, startYear, endYear,
                                                             startQuarterRange, endQuarterRange, startMonthRange, endMonthRange, selectedDecimalPlaces, selectedTargetId);
            }

            return(nextIndicatorId);
        }