Exemple #1
0
        /// <summary>
        /// Gets the feedback items.
        /// </summary>
        /// <returns>The <see cref="FeedbackItemModel"/>.</returns>
        public static FeedbackItemModel GetFeedbackItems(IRoadsService client)
        {
            var feedbacksItemsListFromWcf = client.GetFeedbackItemsData().OrderBy(x => x.SortNumber).ToList();
            var feedbacksItemsListForView = new FeedbackItemModel();

            foreach (var feedbackItemData in feedbacksItemsListFromWcf)
            {
                feedbacksItemsListForView.feedbackItemSettings.Add(new FeedbackItemSettings
                {
                    feedbackItemId = feedbackItemData.FeedbackItemId,
                    settingName = feedbackItemData.NameTranslationKey,
                    sortNumber = feedbackItemData.SortNumber,
                    description = feedbackItemData.DescriptionTranslationKey,
                    isNumeric = feedbackItemData.IsNumeric,
                    isMandatory = feedbackItemData.Mandatory,
                    feedbackModelId = feedbackItemData.FeedbackModelId
                });
            }
            return feedbacksItemsListForView;
        }