示例#1
0
        public ActionResult NewAttribute()
        {
            var attribute = new AttributeDefinition();
            var attributeModel = new NewAttributeModel() {
                Attribute = attribute,
                BaseTypes = schemaService.GetBaseTypes(),
                Editors = schemaService.GetEditors(),
                Renderers = schemaService.GetRenderers() };

            return PartialView("Attributes/Edit", attributeModel);
        }
示例#2
0
        public ActionResult NewAttribute()
        {
            var attributeOptions = new NewAttributeModel();

            attributeOptions.BaseTypes = schemaService.GetBaseTypes();
            attributeOptions.Editors = schemaService.GetEditors();
            attributeOptions.Renderers = schemaService.GetRenderers();

            if (Request.IsAjaxRequest())
            {
                return PartialView(attributeOptions);
            }
            else
            {
                return View(attributeOptions);
            }
        }