Exemple #1
0
        public static List <Value> GetFieldValues(Field field)
        {
            List <Value> values = new List <Value>();

            switch (field.Type)
            {
            case FieldTypeEnum.INPUT:
                values = null;
                break;

            case FieldTypeEnum.MULTIINPUT:
                MultiInputField multiInputField = (MultiInputField)field;
                values = multiInputField.GetValues();
                break;

            case FieldTypeEnum.SINGLECHECK:
                values = null;
                break;

            case FieldTypeEnum.MULTICHECK:
                MultiCheckField multiCheckField = (MultiCheckField)field;
                values = multiCheckField.GetValues();
                break;

            case FieldTypeEnum.COMPLEX:
                values = null;
                break;

            case FieldTypeEnum.MULTICOMPLEX:
                values = null;
                break;

            case FieldTypeEnum.LABEL:
                values = null;
                break;

            default:
                values = null;
                break;
            }
            return(values);
        }
Exemple #2
0
        protected List <String> GetFieldValues(Field field)
        {
            List <String> values = new List <String>();

            switch (field.Type)
            {
            case FieldTypeEnum.INPUT:
                InputField inputField = (InputField)field;
                values.Add(inputField.Value);
                break;

            case FieldTypeEnum.SINGLECHECK:
                SingleCheckField singleCheckField = (SingleCheckField)field;
                values.Add(singleCheckField.GetValue().PropertyValue);
                break;

            case FieldTypeEnum.MULTICHECK:
                MultiCheckField multiCheckField = (MultiCheckField)field;
                List <Value>    vList           = multiCheckField.GetValues();
                foreach (Value v in vList)
                {
                    values.Add(v.PropertyValue);
                }
                break;

            case FieldTypeEnum.MULTIINPUT:
                MultiInputField multiInputField = (MultiInputField)field;
                List <Value>    viList          = multiInputField.GetValues();
                foreach (Value v in viList)
                {
                    values.Add(v.PropertyValue);
                }
                break;
            }
            return(values);
        }