C# Class Rebel.Cms.Web.Mvc.ModelBinders.BackOffice.DocumentTypePropertyModelBinder

Inheritance: StandardModelBinder
Mostrar archivo Open project: RebelCMS/rebelcmsxu5

Public Methods

Method Description
BindModel ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext ) : object

Ensures that the DataType property of the model is set correctly.

The DataType property may not be null, in which case we need to ensure that the DataTypeId and DataType.Id are the same, if they are not, it means the editor changed the DataType so we need to go look it up by the new Id and re-map. Otherwise if it is null, this generally means that its a new property so we need to lookup the DataType by the DataTypeId and re-map.

DocumentTypePropertyModelBinder ( IRebelApplicationContext applicationContext ) : System

Method Details

BindModel() public method

Ensures that the DataType property of the model is set correctly.
The DataType property may not be null, in which case we need to ensure that the DataTypeId and DataType.Id are the same, if they are not, it means the editor changed the DataType so we need to go look it up by the new Id and re-map. Otherwise if it is null, this generally means that its a new property so we need to lookup the DataType by the DataTypeId and re-map.
public BindModel ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext ) : object
controllerContext System.Web.Mvc.ControllerContext
bindingContext System.Web.Mvc.ModelBindingContext
return object

DocumentTypePropertyModelBinder() public method

public DocumentTypePropertyModelBinder ( IRebelApplicationContext applicationContext ) : System
applicationContext IRebelApplicationContext
return System