Пример #1
0
        public override IList <InputField> GetInputFields()
        {
            var list = new List <InputField>();

            list.Add(new HiddenInput("Id", RowData?.GetValue("Id")));
            list.Add(new HiddenInput("CourseId", RowData?.GetValue("CourseId")));

            list.Add(new StringInput("Name", "Name", RowData?.GetValue("Name"), null, true));
            list.Add(new StringInput("Email", "Email", RowData?.GetValue("Email"), null, true));
            var gender = RowData?.GetValue("Gender");

            list.Add(new EnumComboBoxInput <Gender>("Gender", "Gender", false, null, x => x.Value, RowData?.GetValue("GenderString"), null)
            {
                Mandatory = true
            });

            list.Add(new DataSourceComboBoxInput <Region>("Region", "Region", x => x.Id, x => x.Name, RowData?.GetValue("Region"), null, null, x => x.Name, true, false)
            {
                Mandatory = true,
            });

            list.Add(new HiddenInput("rowId", RowId));

            return(list);
        }
Пример #2
0
        public override IList <InputField> GetInputFields()
        {
            var result = new List <InputField>();

            result.Add(new LabelInput("Field", "Field", RowData.GetValue("Field")));
            result.Add(new StringInput("Columns", "Columns", RowData.GetValue("Columns"), mandatory: true));
            result.Add(new LabelInput("Lbl2", "", "Note: Column numbers start from 1"));
            result.Add(new LabelInput("Lbl1", "", "Note: Add multiple columns using '&' (e.g. 1&2) or set first non-empty column using ';' (e.g. 2;3)"));

            result.Add(new HiddenInput("rowId", RowId));

            return(result);
        }