Ejemplo n.º 1
0
        private void SelectTable()
        {
            hydrometRatingTable = new TimeSeriesDatabaseDataSet.RatingTableDataTable();
            var f = new RatingTableSelector();

            if (f.ShowDialog() == DialogResult.OK)
            {
                cbtt  = f.cbtt;
                yparm = f.pcode;

                this.labelSiteName.Text = "Description: " + HydrometInfoUtility.LookupSiteDescription(cbtt);
                this.labelcbtt.Text     = "cbtt: " + cbtt;
                string altid = HydrometInfoUtility.LookupAltID(cbtt).Trim();
                if (altid.Length > 0)
                {
                    labelcbtt.Text += " altid: " + altid;
                }
                this.labelyparm.Text = "y parameter: " + yparm;

                ReadTableFromInternet(cbtt, yparm, f.RatingName, altid);

                hydrometRatingTable.Name     = f.RatingName + " -- " + HydrometInfoUtility.LookupSiteDescription(cbtt);
                hydrometRatingTable.EditDate = f.DateModified;

                this.labelDate.Text = "Modified " + f.DateModified;
            }
        }
Ejemplo n.º 2
0
 private void SetupUsgsLink()
 {
     this.linkLabelUsgs.Visible = false;
     usgsUrl = "";
     if (dataTable != null && dataTable.Columns.Count > 1 && dataTable.Rows.Count > 0)
     {
         string cbtt = this.comboBoxInputs.Text.Trim().Split(' ')[0];
         // check for USGS id..
         string altId = HydrometInfoUtility.LookupAltID(cbtt);
         if (altId.Trim().Length > 0 && Regex.IsMatch(altId, "[0-9]{7,10}"))
         {
             linkLabelUsgs.Text    = "usgs " + altId;
             usgsUrl               = "http://waterdata.usgs.gov/nwis/uv?format=html&period=7&site_no=" + altId;
             linkLabelUsgs.Visible = true;
         }
     }
 }