コード例 #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));
            }
        }
コード例 #2
0
 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;
 }
コード例 #3
0
 public LocationSimpleViewModel(DbGeometry projectLocationPoint, ProjectLocationSimpleTypeEnum projectLocationSimpleType, string projectLocationNotes, string comments)
     : base(projectLocationPoint, projectLocationSimpleType, projectLocationNotes)
 {
     Comments = comments;
 }