コード例 #1
0
 public void AddLocationTypeToViewModel(Model.LocationType locationType)
 {
     ID                    = locationType.ID;
     TypeName              = locationType.TypeName;
     TypeDescription       = locationType.TypeDescription;
     IconString            = locationType.Icon;
     Color                 = locationType.Color;
     DefaultDisplaySetting = locationType.DisplaySettings;
 }
コード例 #2
0
        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);
        }