コード例 #1
0
        public override IEnumerable<TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel) {
            var model = new DateTimeFieldSettings();
            if(updateModel.TryUpdateModel(model, "DateTimeFieldSettings", null, null)) {
                builder.WithSetting("DateTimeFieldSettings.Display", model.Display.ToString());
            }

            yield return DefinitionTemplate(model);
        }
コード例 #2
0
        public override IEnumerable <TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel)
        {
            var model = new DateTimeFieldSettings();

            if (updateModel.TryUpdateModel(model, "DateTimeFieldSettings", null, null))
            {
                builder.WithSetting("DateTimeFieldSettings.Display", model.Display.ToString());
            }

            yield return(DefinitionTemplate(model));
        }