Beispiel #1
0
        public static ProjectLocationSimpleType ToType(ProjectLocationSimpleTypeEnum enumValue)
        {
            switch (enumValue)
            {
            case ProjectLocationSimpleTypeEnum.None:
                return(None);

            case ProjectLocationSimpleTypeEnum.PointOnMap:
                return(PointOnMap);

            default:
                throw new ArgumentException(string.Format("Unable to map Enum: {0}", enumValue));
            }
        }
 public ProjectLocationSimpleViewModel(DbGeometry projectLocationPoint, ProjectLocationSimpleTypeEnum projectLocationSimpleType, string projectLocationNotes)
 {
     ProjectLocationSimpleType = projectLocationSimpleType;
     if (projectLocationPoint != null)
     {
         ProjectLocationPointX = projectLocationPoint.XCoordinate;
         ProjectLocationPointY = projectLocationPoint.YCoordinate;
     }
     else
     {
         ProjectLocationPointX = null;
         ProjectLocationPointY = null;
     }
     ProjectLocationNotes = projectLocationNotes;
 }
 public LocationSimpleViewModel(DbGeometry projectLocationPoint, ProjectLocationSimpleTypeEnum projectLocationSimpleType, string projectLocationNotes, string comments)
     : base(projectLocationPoint, projectLocationSimpleType, projectLocationNotes)
 {
     Comments = comments;
 }