示例#1
0
        public static MusealView CreateMuseal(Museal o)
        {
            var v = new MusealView();

            setCommonValues(v, o?.Data?.ID, o?.Data?.ValidFrom, o?.Data?.ValidTo);
            setMusealCommonValues(v, o?.Data?.Author, o?.Data?.Designation,
                                  o?.Data?.Info, o?.Data?.DamagesBefore, o?.Data?.DefaultLocation, o?.Data?.CurrentLocation,
                                  o?.Data?.StateBefore);
            return(v);
        }
示例#2
0
 private static void setMusealCommonValues(MusealView model,
                                           string author, string designation, string info, string damagesBefore,
                                           string defaultLocation, string currentLocation,
                                           MusealState?state = MusealState.Määramata)
 {
     model.Author          = author;
     model.Designation     = designation;
     model.Info            = info;
     model.DamagesBefore   = damagesBefore;
     model.DefaultLocation = defaultLocation;
     model.CurrentLocation = currentLocation;
     model.StateBefore     = state ?? MusealState.Määramata;
 }