Exemple #1
0
        /// <summary>
        /// Sets the feedback items.
        /// </summary>
        /// <param name="feedbacksItemsListFromView">The feedbacks items list from view.</param>
        public static void SetFeedbackItems(IRoadsService client, List<FeedbackItemSettings> feedbacksItemsListFromView)
        {
            var feedbacksItemsListForWCF = new List<FeedbackItemData>();

            foreach (var feedbackItemsFromView in feedbacksItemsListFromView)
            {
                feedbacksItemsListForWCF.Add(new FeedbackItemData
                {
                    FeedbackItemId = feedbackItemsFromView.feedbackItemId,
                    NameTranslationKey = feedbackItemsFromView.settingName,
                    SortNumber = feedbackItemsFromView.sortNumber,
                    DescriptionTranslationKey = feedbackItemsFromView.description,
                    IsNumeric = feedbackItemsFromView.isNumeric,
                    Mandatory = feedbackItemsFromView.isMandatory,
                    FeedbackModelId = feedbackItemsFromView.feedbackModelId
                });
            }
            client.SetFeedbackItemsData(feedbacksItemsListForWCF.ToArray());
        }