Esempio n. 1
0
        private void ODMDatabaseListLoad()
        {
            odmList.Items.Clear();
            List <string>       odmDBList = new List <string>();
            TimeSeriesResources tmObj     = new TimeSeriesResources();

            odmDBList = tmObj.GetODMList();
            foreach (string s in odmDBList)
            {
                odmList.Items.Add(s);
            }
            if (odmList.Items.Count > 0)
            {
                odmList.SelectedValue = odmList.Items[odmList.Items.Count - 1].ToString();
            }

            siteCodeDropDownList.Items.Clear();
            variableCodeDropDownList.Items.Clear();

            ODM       odmInfo = new ODM();
            DataTable dt      = new DataTable();

            if (odmList.Items.Count > 0)
            {
                dt = odmInfo.GetODMInfo(odmList.Items[odmList.Items.Count - 1].ToString());
            }
            foreach (DataRow row in dt.Rows)
            {
                Title.Text       = row["title"].ToString();
                serverName.Text  = row["serveraddress"].ToString();
                Topic.Text       = row["topiccategory"].ToString();
                abstractODM.Text = row["abstract"].ToString();
                citation.Text    = row["citation"].ToString();
            }
            TimeSeriesResources tmResObj = new TimeSeriesResources();

            if (odmList.Items.Count > 0)
            {
                timeSeriesTable = tmResObj.GetTimeSeriesResources(odmList.Items[odmList.Items.Count - 1].ToString());
            }
            odmInfoGridView.DataSource = timeSeriesTable;
            odmInfoGridView.DataBind();
            ViewState["mydata"] = timeSeriesTable;
            //recordCount.Text = timeSeriesTable.Rows.Count.ToString() + " records";

            List <string> siteCodeListObj     = new List <string>();
            List <string> variableCodeListObj = new List <string>();

            foreach (DataRow row in timeSeriesTable.Rows)
            {
                siteCodeListObj.Add(row["sitecode"].ToString());
                variableCodeListObj.Add(row["variablecode"].ToString());
            }

            siteCodeDropDownList.DataSource = siteCodeListObj.Distinct().ToList();
            siteCodeDropDownList.DataBind();
            variableCodeDropDownList.DataSource = variableCodeListObj.Distinct().ToList();
            variableCodeDropDownList.DataBind();
        }
Esempio n. 2
0
        protected void odmList_SelectedIndexChanged(object sender, EventArgs e)
        {
            ODM       odmInfo = new ODM();
            DataTable dt      = new DataTable();
            string    s       = odmList.SelectedItem.ToString();

            dt = odmInfo.GetODMInfo(odmList.SelectedValue.ToString());
            foreach (DataRow row in dt.Rows)
            {
                Title.Text        = row["title"].ToString();
                serverName.Text   = row["serveraddress"].ToString();
                Topic.Text        = row["topiccategory"].ToString();
                abstractODM.Text  = row["abstract"].ToString();
                citation.Text     = row["citation"].ToString();
                waterOneWSDL.Text = row["wateroneflowwsdl"].ToString();
            }
        }
Esempio n. 3
0
        private void ODMInfoload(string odmName)
        {
            odmList.SelectedValue = odmName;
            ODM       odmInfo = new ODM();
            DataTable dt      = new DataTable();
            string    s       = odmList.SelectedItem.ToString();

            dt = odmInfo.GetODMInfo(odmName);
            foreach (DataRow row in dt.Rows)
            {
                Title.Text        = row["title"].ToString();
                serverName.Text   = row["serveraddress"].ToString();
                Topic.Text        = row["topiccategory"].ToString();
                abstractODM.Text  = row["abstract"].ToString();
                citation.Text     = row["citation"].ToString();
                waterOneWSDL.Text = row["wateroneflowwsdl"].ToString();
            }
        }
Esempio n. 4
0
        protected void odmList_SelectedIndexChanged(object sender, EventArgs e)
        {
            siteCodeDropDownList.Items.Clear();
            variableCodeDropDownList.Items.Clear();

            ODM       odmInfo = new ODM();
            DataTable dt      = new DataTable();

            dt = odmInfo.GetODMInfo(odmList.SelectedValue.ToString());
            foreach (DataRow row in dt.Rows)
            {
                Title.Text       = row["title"].ToString();
                serverName.Text  = row["serveraddress"].ToString();
                Topic.Text       = row["topiccategory"].ToString();
                abstractODM.Text = row["abstract"].ToString();
                citation.Text    = row["citation"].ToString();
            }
            TimeSeriesResources tmResObj = new TimeSeriesResources();

            timeSeriesTable            = tmResObj.GetTimeSeriesResources(odmList.SelectedValue.ToString());
            odmInfoGridView.DataSource = timeSeriesTable;
            odmInfoGridView.DataBind();
            ViewState["mydata"] = timeSeriesTable;
            //recordCount.Text = timeSeriesTable.Rows.Count.ToString() + " records";

            List <string> siteCodeListObj     = new List <string>();
            List <string> variableCodeListObj = new List <string>();

            foreach (DataRow row in timeSeriesTable.Rows)
            {
                siteCodeListObj.Add(row["sitecode"].ToString());
                variableCodeListObj.Add(row["variablecode"].ToString());
            }

            siteCodeDropDownList.DataSource = siteCodeListObj.Distinct().ToList();
            siteCodeDropDownList.DataBind();
            variableCodeDropDownList.DataSource = variableCodeListObj.Distinct().ToList();
            variableCodeDropDownList.DataBind();
        }