Exemple #1
0
        private NameValueCollection MergeFormValues(InterationContext context, FormInfo form, FormValue[] formValues)
        {
            var finalFormValues = form.FormValues;

            foreach (var v in formValues)
            {
                if (!string.IsNullOrEmpty(v.Value))
                {
                    finalFormValues[v.Name] = this.PrepareValue(context, v.Value);
                }
                else if (!string.IsNullOrEmpty(v.Text))
                {
                    finalFormValues[v.Name] = form.GetSelectedValueByText(v.Name, this.PrepareValue(context, v.Text));
                }
            }

            return(finalFormValues);
        }