public override string ToString()
 {
     StringArrayConverter converter = new StringArrayConverter();
     return converter.ConvertToString(this.Roles);
 }
        new private void SaveFormEntry(FormDescription description)
        {
            FormsManager manager = FormsManager.GetManager();
            FormEntry userHostAddress = null;

            if (_isProgressiveForm && _priorFormEntry == null)
            {
                FieldControl keyField = this.FieldControls.Where(fc => ((IFormFieldControl)fc).MetaField.FieldName == _progressiveKeyFieldName).FirstOrDefault() as FieldControl;

                if (keyField != null && !String.IsNullOrWhiteSpace((string)keyField.Value))
                {
                    _priorFormEntry = GetPriorFormEntryByKeyField((string)keyField.Value);
                }
            }

            if (_isProgressiveForm && _priorFormEntry != null)
            {
                string entryType = String.Format("{0}.{1}", manager.Provider.FormsNamespace, this.FormData.Name);

                userHostAddress = manager.GetFormEntry(entryType, _priorFormEntry.Id);
            }
            else
            {
                userHostAddress = manager.CreateFormEntry(string.Format("{0}.{1}", manager.Provider.FormsNamespace, description.Name));
            }
            
            foreach (IFormFieldControl formFieldControl in this.FieldControls)
            {
                FieldControl fieldControl = formFieldControl as FieldControl;
                object value = fieldControl.Value;

                if (fieldControl.GetType().Name == "FormFileUpload")
                {
                    typeof(FormsControl)
                        .GetMethod("SaveFiles", BindingFlags.Static | BindingFlags.NonPublic)
                        .Invoke(null, new object[] { value as UploadedFileCollection, manager, description, userHostAddress, formFieldControl.MetaField.FieldName });
                }
                else if (!(value is List<string>))
                {
                    userHostAddress.SetValue(formFieldControl.MetaField.FieldName, value);
                }
                else
                {
                    StringArrayConverter stringArrayConverter = new StringArrayConverter();
                    object obj = stringArrayConverter.ConvertTo((value as List<string>).ToArray(), typeof(string));

                    userHostAddress.SetValue(formFieldControl.MetaField.FieldName, obj);
                }
            }
            userHostAddress.IpAddress = this.Page.Request.UserHostAddress;
            userHostAddress.SubmittedOn = DateTime.UtcNow;

            Guid userId = ClaimsManager.GetCurrentUserId();

            userHostAddress.UserId = userId == Guid.Empty ? Guid.Parse(_sfTrackingCookie.Value) : userId;

            if (userHostAddress.UserId == userId)
            {
                userHostAddress.Owner = userId;
            }

            if (SystemManager.CurrentContext.AppSettings.Multilingual)
            {
                userHostAddress.Language = CultureInfo.CurrentUICulture.Name;
            }

            FormDescription formData = this.FormData;
            formData.FormEntriesSeed = formData.FormEntriesSeed + (long)1;
            userHostAddress.ReferralCode = this.FormData.FormEntriesSeed.ToString();

            manager.SaveChanges();
        }
        public override string ToString()
        {
            StringArrayConverter converter = new StringArrayConverter();

            return(converter.ConvertToString(this.Roles));
        }