Пример #1
0
        private void newSite(object sender, EventArgs e)
        {
            var d = new Reclamation.TimeSeries.Forms.ImportForms.AddSite(DB);

            if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                DB.AddSiteWithTemplate(CurrentFolder, d.SeriesCatalog, d.SiteName, d.SiteID,
                                       d.State, d.Elevation, d.Lat, d.Lon, d.TimeZone, d.Install, d.Program);
                DatabaseChanged();
            }
        }
Пример #2
0
        private void newSite(object sender, EventArgs e)
        {
            var d = new Reclamation.TimeSeries.Forms.ImportForms.AddSite(DB);

            DB.SuspendTreeUpdates();
            if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                double lat  = 0;
                double lon  = 0;
                double elev = 0;

                double.TryParse(d.Lat, out lat);
                double.TryParse(d.Lon, out lon);
                double.TryParse(d.Elevation, out elev);

                DB.AddSiteWithTemplate(CurrentFolder, d.SeriesCatalog, d.SiteName, d.SiteID,
                                       d.State, elev, lat, lon, d.TimeZone, d.Install, d.Program);
                DB.ResumeTreeUpdates();
                DatabaseChanged();
            }
        }
Пример #3
0
        private void newSite(object sender, EventArgs e)
        {
            var d = new Reclamation.TimeSeries.Forms.ImportForms.AddSite(DB);
            DB.SuspendTreeUpdates();
            if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                double lat = 0;
                double lon = 0;
                double elev = 0;

                double.TryParse(d.Lat, out lat);
                double.TryParse(d.Lon, out lon);
                double.TryParse(d.Elevation, out elev);

                DB.AddSiteWithTemplate(CurrentFolder, d.SeriesCatalog, d.SiteName, d.SiteID, 
                    d.State, elev, lat, lon, d.TimeZone, d.Install,d.Program);
                DB.ResumeTreeUpdates();
                DatabaseChanged();
            }
        }