Exemplo n.º 1
0
 public static List <vwAccountLevels> GetAccountLevels(int accountId)
 {
     using (GovHacSpatialEntities entities = new GovHacSpatialEntities())
     {
         return(entities.vwAccountLevels.Where(a => a.accountId == accountId).ToList());
     }
 }
Exemplo n.º 2
0
 public static IList <spGetImages_Result> GetImages(string lat, string lon, int placeMarkerId)
 {
     using (GovHacSpatialEntities entities = new GovHacSpatialEntities())
     {
         return(entities.spGetImages(placeMarkerId, lat, lon).ToList());
     }
 }
Exemplo n.º 3
0
 public static IList <spGetPlaceMarker_Result> GetPlaceMarker(string lat, string lon)
 {
     using (GovHacSpatialEntities entities = new GovHacSpatialEntities())
     {
         return(entities.spGetPlaceMarker(lat, lon).ToList());
     }
 }
Exemplo n.º 4
0
        public static string GetPlaceMarkerName(int placeMarkerId, bool shortName)
        {
            using (GovHacSpatialEntities entities = new GovHacSpatialEntities())
            {
                string placeName = entities.PlaceMarker.Where(pm => pm.ID == placeMarkerId).Select(pm => pm.Name).FirstOrDefault();

                if (!string.IsNullOrWhiteSpace(placeName))
                {
                    if (shortName)
                    {
                        int idx = placeName.IndexOf("(");

                        if (idx >= 0)
                        {
                            string smallName = placeName.Substring(0, idx - 1);
                            placeName = smallName;
                        }
                    }
                }
                return(placeName);
            }
        }