コード例 #1
0
ファイル: Test.aspx.cs プロジェクト: justagauy/NearMe
        public static String AddLocation(string[] fields)
        {
            String ret = String.Empty;

            try
            {
                String name = fields[0];
                String description = fields[1];
                String cat = fields[2];
                Double lat = Convert.ToDouble(fields[3]);
                Double lon = Convert.ToDouble(fields[4]);

                nearme_PR.Classes.Location loc = new Classes.Location()
                {
                    Name = name,
                    Description = description,
                    Type = cat,
                    Latitude = lat,
                    Longitude = lon
                };

                nearme_PR.Classes.LocationDataset ds = new Classes.LocationDataset();
                ds.LoadLocations();
                ds.AddLocation(loc);
            }
            catch (Exception ex)
            {
                ret = ex.Message;
            }

            return ret;
        }
コード例 #2
0
ファイル: Default.aspx.cs プロジェクト: justagauy/NearMe
        public static List<nearme_PR.Classes.Location> GetLocationsByType(string[] fields)
        {
            String locationType = fields[0];

            nearme_PR.Classes.LocationDataset ds = new Classes.LocationDataset();
            ds.LoadLocations();
            List<nearme_PR.Classes.Location> lstLocs = ds.getLocationsByType(locationType);

            return lstLocs;
        }