using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.ComponentModel.DataAnnotations; using Sleis.Validation.Attribute; using Sleis.Models; namespace Sleis.Models { public class GeographicLocation : BaseModel { public virtual string CollectionMethodCode { get; set; } public virtual string ReferencePointCode { get; set; } public virtual string ReferenceSystemCode { get; set; } public virtual SimpleLookupItem CollectionMethod { get; set; } public virtual SimpleLookupItem ReferencePoint { get; set; } public virtual SimpleLookupItem ReferenceSystem { get; set; } public virtual DateTime? CollectionTime { get; set; } public virtual string Latitude { get; set; } public virtual string Longitude { get; set; } public virtual string UtmNorth { get; set; } public virtual string UtmEast { get; set; } public virtual int? UtmZone { get; set; } public bool HasGeographicPoint { get { return !String.IsNullOrEmpty(Latitude) && !String.IsNullOrEmpty(Longitude); } } public bool HasProjectedPoint { get { return !String.IsNullOrEmpty(UtmNorth) && !String.IsNullOrEmpty(UtmEast) && UtmZone > 0; } } } }