protected void Page_Load(object sender, EventArgs e) { string timeSeriesId = Request.QueryString["tm"]; TimeSeriesResources tm = new TimeSeriesResources(); DataTable dt = new DataTable(); dt = tm.GetTimeSeriesInfo(timeSeriesId); timeSeriesInfoView.DataSource = dt; timeSeriesInfoView.DataBind(); }
protected void odmInfoGridView_DataBound(object sender, EventArgs e) { foreach (GridViewRow gridrow in odmInfoGridView.Rows) { HyperLink odmLink = (HyperLink)gridrow.FindControl("odmInfoLink"); odmLink.NavigateUrl = "#"; odmLink.Attributes.Add("onclick", "window.open('TimeSeriesInformation.aspx?tm=" + gridrow.Cells[12].Text + "',null,'height=600, width=500,status= no, resizable= no, scrollbars=yes, toolbar=no,location=no,menubar=no');"); Table sitecodeTable = (Table)gridrow.FindControl("sitecodetable"); TableRow sitecodeRow = new TableRow(); TableCell sitecodeCell = new TableCell(); Table variablecodeTable = (Table)gridrow.FindControl("variablecodetable"); TableRow variablecodeRow = new TableRow(); TableCell variablecodeCell = new TableCell(); Table generalcategoryTable = (Table)gridrow.FindControl("generalcategorytable"); TableRow generalcategoryRow = new TableRow(); TableCell generalcategoryCell = new TableCell(); Table valuetypeTable = (Table)gridrow.FindControl("valuetypetable"); TableRow valuetypeRow = new TableRow(); TableCell valuetypeCell = new TableCell(); Table samplemediumTable = (Table)gridrow.FindControl("samplemediumtable"); TableRow samplemediumRow = new TableRow(); TableCell samplemediumCell = new TableCell(); Table qclevelTable = (Table)gridrow.FindControl("qcleveltable"); TableRow qclevelRow = new TableRow(); TableCell qclevelCell = new TableCell(); Table methoddescriptionTable = (Table)gridrow.FindControl("methoddescriptiontable"); TableRow methoddescriptionRow = new TableRow(); TableCell methoddescriptionCell = new TableCell(); Table organizationTable = (Table)gridrow.FindControl("organizationtable"); TableRow organizationRow = new TableRow(); TableCell organizationCell = new TableCell(); Table sourcedescriptionTable = (Table)gridrow.FindControl("sourcedescriptiontable"); TableRow sourcedescriptionRow = new TableRow(); TableCell sourcedescriptionCell = new TableCell(); Table datetimerangeTable = (Table)gridrow.FindControl("datetimerangetable"); TableRow datetimerangeRow = new TableRow(); TableCell datetimerangeCell = new TableCell(); Table obervationsTable = (Table)gridrow.FindControl("observationstable"); TableRow obervationsRow = new TableRow(); TableCell obervationsCell = new TableCell(); TimeSeriesResources tmObj = new TimeSeriesResources(); DataTable dt = new DataTable(); dt = tmObj.GetTimeSeriesInfo(gridrow.Cells[12].Text); foreach (DataRow row in dt.Rows) { sitecodeCell.Text = row["sitecode"].ToString() + Environment.NewLine + row["sitename"].ToString(); variablecodeCell.Text = row["variablecode"].ToString() + " : " + row["variablename"].ToString(); generalcategoryCell.Text = row["generalcategory"].ToString(); valuetypeCell.Text = row["valuetype"].ToString(); samplemediumCell.Text = row["samplemedium"].ToString(); qclevelCell.Text = row["qualitycontrollevelcode"].ToString(); methoddescriptionCell.Text = row["methoddescription"].ToString(); organizationCell.Text = row["organization"].ToString(); sourcedescriptionCell.Text = row["sourcedescription"].ToString(); datetimerangeCell.Text = row["datecreated"].ToString(); obervationsCell.Text = row["valuecount"].ToString(); } sitecodeRow.Cells.Add(sitecodeCell); sitecodeTable.Rows.Add(sitecodeRow); variablecodeRow.Cells.Add(variablecodeCell); variablecodeTable.Rows.Add(variablecodeRow); generalcategoryRow.Cells.Add(generalcategoryCell); generalcategoryTable.Rows.Add(generalcategoryRow); valuetypeRow.Cells.Add(valuetypeCell); valuetypeTable.Rows.Add(valuetypeRow); samplemediumRow.Cells.Add(samplemediumCell); samplemediumTable.Rows.Add(samplemediumRow); qclevelRow.Cells.Add(qclevelCell); qclevelTable.Rows.Add(qclevelRow); methoddescriptionRow.Cells.Add(methoddescriptionCell); methoddescriptionTable.Rows.Add(methoddescriptionRow); organizationRow.Cells.Add(organizationCell); organizationTable.Rows.Add(organizationRow); sourcedescriptionRow.Cells.Add(sourcedescriptionCell); sourcedescriptionTable.Rows.Add(sourcedescriptionRow); datetimerangeRow.Cells.Add(datetimerangeCell); datetimerangeTable.Rows.Add(datetimerangeRow); valuetypeRow.Cells.Add(valuetypeCell); valuetypeTable.Rows.Add(valuetypeRow); obervationsRow.Cells.Add(obervationsCell); obervationsTable.Rows.Add(obervationsRow); } }