public void AddLocationTypeToViewModel(Model.LocationType locationType) { ID = locationType.ID; TypeName = locationType.TypeName; TypeDescription = locationType.TypeDescription; IconString = locationType.Icon; Color = locationType.Color; DefaultDisplaySetting = locationType.DisplaySettings; }
public Model.LocationType getLocationTypeFromViewModel() { var newLocationType = new Model.LocationType(); newLocationType.TypeName = TypeName; newLocationType.TypeDescription = TypeDescription; newLocationType.Icon = IconString; newLocationType.CreatedBy = CreatedBy; newLocationType.Color = Color.Substring(1); newLocationType.DisplaySettings = DefaultDisplaySetting; newLocationType.ID = ID; return(newLocationType); }