I have a master page with three dropdowns that allow people to choose the building, the year, and the quarter. That sets the url params that run the gridviews in all of the pages.
The problem is, when I am on a page and use one of the links to go to another page, it doesn't change the url params. If I am on page 1 and I hit bldg1, qtr 1 and year 2007 and then I hit the link for page2, the url params are still in place, which is good. The problem is, if I change the dropdowns, the url params stay the same.
I had thought I would just reset them in the onclick event of the button, but I'm having problems setting things once it comes to the page.
from the masterpage codebehind:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ScoreCardEntry : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
string fac = Request.QueryString["fac"];
string year = Request.QueryString["year"];
string qtr = Request.QueryString["qtr"];
udsp_SCCust1.FilterExpression = "measureshortname='CUST1'";
try
{
if (year != null)
{
ddlYear.SelectedValue = year;
}
else
{
//l_Error.Visible = true;
l_Error.Text = "Year is not set.";
}
if (qtr != null)
{
ddlQuarter.SelectedValue = qtr;
}
else
{
//l_Error.Visible = true;
l_Error.Text = "Quarter is not set.";
}
if (fac != null)
{
ddlFacility.SelectedValue = fac;
ddlFacility.DataBind();
//l_Error.Visible = false;
}
else
{
//l_Error.Visible = true;
l_Error.Text = "Facility is not set.";
}
}
catch (Exception )
{
l_Error.Text = "Check your dropdown values.";
}
//if they've picked all three, show the content pane
if (!ddlFacility.SelectedValue.Equals(0) && ddlYear.SelectedIndex != 0 && ddlQuarter.SelectedIndex != 0)
{
ContentPlaceHolder1.Visible = true;
//l_Error.Visible = false;
}
else
{
ContentPlaceHolder1.Visible = false;
//l_Error.Visible = true;
}
}
protected void submit_Click(object sender, EventArgs e)
{
if (!ddlFacility.SelectedValue.Equals(0) && ddlYear.SelectedIndex != 0 && ddlQuarter.SelectedIndex != 0)
{
ContentPlaceHolder1.Visible = true;
l_Error.Visible=false;
}
else
{
ContentPlaceHolder1.Visible = false;
}
Response.Write(Request.ServerVariables["SCRIPT_NAME"]+"?fac="+ddlFacility.SelectedValue+"&qtr="+ddlQuarter.SelectedValue+"&year="+ddlYear.SelectedValue);
}
}
from one of the aspx pages:
<%@ Page Language="C#" MasterPageFile="ScoreCardEntry.master" AutoEventWireup="true"
CodeFile="fin.aspx.cs" Inherits="fin" %>
<asp:Content ID="finMeasure" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<table border="0" cellpadding="5" style="width: 755px">
<tr>
<td colspan="8" style="border-right: black thin solid; border-top: black thin solid;
margin: 1px; border-left: black thin solid; border-bottom: black thin solid;"
valign="top" bordercolor="#000000">
<table border="0" style="width: 650px">
<tr>
<td colspan="2" valign="top">
<table style="width: 187px">
<tr>
<td style="height: 23px" width="100%">
<asp:Label ID="label_FIN1" runat="server" Font-Bold="True" Text="FIN1" CssClass="header"></asp:Label></td>
<td style="height: 23px" width="100%">
</td>
<td style="height: 23px" valign="top" width="100%">
<asp:Label ID="l_fin1Desc" runat="server" Text="Label" CssClass="header" Width="250px"></asp:Label></td>
</tr>
</table>
</td>
<td align="left" style="width: 349px;" valign="bottom">
</td>
</tr>
<tr>
<td colspan="2" rowspan="1" style="height: 139px" valign="top">
<asp:GridView ID="gv_fin1" runat="server" AutoGenerateColumns="False" DataSourceID="udsp_SCFin1"
CellPadding="4" Font-Names="Arial" Font-Size="12px" OnRowDataBound="gridSetup1"
ForeColor="#333333" GridLines="None">
<Columns>
<asp:BoundField DataField="month" HeaderText="Month" SortExpression="month" />
<asp:TemplateField HeaderText="Measure1" SortExpression="Measure1">
<ItemTemplate>
<!--%# GetMeasure1Total(decimal.Parse(Eval("Measure1").ToString(),)).ToString("0.00")%-->
<%# GetMeasure1Total(Eval("Measure1").ToString()) %>
</ItemTemplate>
<FooterTemplate>
<%# Get1Total().ToString("0.00")%>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Measure2" SortExpression="Measure2">
<ItemTemplate>
<%# GetMeasure2Total(decimal.Parse(Eval("Measure2").ToString())).ToString("0.00") %>
</ItemTemplate>
<FooterTemplate>
<%# Get2Total().ToString("0.00")%>
</FooterTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Score" HeaderText="Score" ReadOnly="True" SortExpression="Score" />
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="fin1Ball" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="Green" ForeColor="White" Font-Bold="True" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="Green" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
<td colspan="1" rowspan="1" style="height: 139px; width: 349px;" valign="top">
<asp:TextBox ID="tbCommFin1" runat="server" Height="123px" TextMode="MultiLine"
Width="337px">enter your new comments here</asp:TextBox><br />
<asp:Button ID="bSaveFin1" runat="server" OnClick="bSaveFin1_Click" Text="Save" />
<asp:HyperLink ID="hl_fin1" runat="server" Target="_blank" Width="290px"
Font-Names="Arial" Font-Size="11px" NavigateUrl="~/ScoreCardEntry/comments.aspx">Previous Comments</asp:HyperLink></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="8" style="border-right: black thin solid; border-top: black thin solid;
margin: 1px; border-left: black thin solid; border-bottom: black thin solid;"
valign="top" bordercolor="#000000">
<table border="0" style="width: 650px">
<tr>
<td colspan="2" valign="top" style="height: 38px">
<table style="width: 187px">
<tr>
<td style="height: 23px" width="100%">
<asp:Label ID="label_FIN2" runat="server" Font-Bold="True" Text="FIN2" CssClass="header"></asp:Label></td>
<td style="height: 23px" width="100%">
</td>
<td style="height: 23px" valign="top" width="100%">
<asp:Label ID="l_fin2Desc" runat="server" Text="Label" CssClass="header" Width="250px"></asp:Label></td>
</tr>
</table>
</td>
<td align="left" style="width: 349px; height: 38px;" valign="bottom">
</td>
</tr>
<tr>
<td colspan="2" rowspan="1" style="height: 159px" valign="top">
<asp:GridView ID="gv_fin2" runat="server" AutoGenerateColumns="False" DataSourceID="udsp_SCFin2"
CellPadding="4" Font-Names="Arial" Font-Size="12px" OnRowDataBound="gridSetup2"
ForeColor="#333333" GridLines="None">
<Columns>
<asp:BoundField DataField="month" HeaderText="Month" SortExpression="month" />
<asp:TemplateField HeaderText="Measure1" SortExpression="Measure1">
<ItemTemplate>
<%# GetMeasure1Total(Eval("Measure1").ToString()).ToString("0.00")%>
</ItemTemplate>
<FooterTemplate>
<%# Get1Total().ToString("0.00")%>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Measure2" SortExpression="Measure2">
<ItemTemplate>
<%# GetMeasure2Total(decimal.Parse(Eval("Measure2").ToString())).ToString("0.00") %>
</ItemTemplate>
<FooterTemplate>
<%# Get2Total().ToString("0.00")%>
</FooterTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Score" HeaderText="Score" ReadOnly="True" SortExpression="Score" />
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="fin2Ball" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="Green" ForeColor="White" Font-Bold="True" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="Green" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
<td colspan="1" rowspan="1" style="height: 159px; width: 349px;" valign="top">
<asp:TextBox ID="tbCommFin2" runat="server" Height="123px" TextMode="MultiLine"
Width="337px">enter your new comments here</asp:TextBox><br />
<asp:Button ID="bSaveFin2" runat="server" OnClick="bSaveFin2_Click" Text="Save" />
<asp:HyperLink ID="hl_fin2" runat="server" Target="_blank" Width="290px"
Font-Names="Arial" Font-Size="11px" NavigateUrl="~/ScoreCardEntry/comments.aspx">Previous Comments</asp:HyperLink></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="8" style="border-right: black thin solid; border-top: black thin solid;
margin: 1px; border-left: black thin solid; border-bottom: black thin solid;"
valign="top" bordercolor="#000000">
<table border="0" style="width: 650px">
<tr>
<td colspan="2" valign="top" style="height: 38px">
<table style="width: 187px">
<tr>
<td style="height: 23px" width="100%">
<asp:Label ID="label_FIN3" runat="server" Font-Bold="True" Text="FIN3" CssClass="header"></asp:Label></td>
<td style="height: 23px" width="100%">
</td>
<td style="height: 23px" valign="top" width="100%">
<asp:Label ID="l_fin3Desc" runat="server" Text="Label" CssClass="header" Width="250px"></asp:Label></td>
</tr>
</table>
</td>
<td align="left" style="width: 349px; height: 38px;" valign="bottom">
</td>
</tr>
<tr>
<td colspan="2" rowspan="1" style="height: 159px" valign="top">
<asp:GridView ID="gv_fin3" runat="server" AutoGenerateColumns="False" DataSourceID="udsp_SCFin3"
CellPadding="4" Font-Names="Arial" Font-Size="12px" OnRowDataBound="gridSetup3"
ForeColor="#333333" GridLines="None">
<Columns>
<asp:BoundField DataField="month" HeaderText="Month" SortExpression="month" />
<asp:TemplateField HeaderText="Measure1" SortExpression="Measure1">
<ItemTemplate>
<%# GetMeasure1Total(Eval("Measure1").ToString()).ToString("0.00")%>
</ItemTemplate>
<FooterTemplate>
<%# Get1Total().ToString("0.00")%>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Measure2" SortExpression="Measure2">
<ItemTemplate>
<%# GetMeasure2Total(decimal.Parse(Eval("Measure2").ToString())).ToString("0.00") %>
</ItemTemplate>
<FooterTemplate>
<%# Get2Total().ToString("0.00")%>
</FooterTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Score" HeaderText="Score" ReadOnly="True" SortExpression="Score" />
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="fin3Ball" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="Green" ForeColor="White" Font-Bold="True" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="Green" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
<td colspan="1" rowspan="1" style="height: 159px; width: 349px;" valign="top">
<asp:TextBox ID="tbCommFin3" runat="server" Height="123px" TextMode="MultiLine"
Width="337px">enter your new comments here</asp:TextBox><br />
<asp:Button ID="bSaveFin3" runat="server" OnClick="bSaveFin3_Click" Text="Save" />
<asp:HyperLink ID="hl_fin3" runat="server" Target="_blank" Width="290px"
Font-Names="Arial" Font-Size="11px" NavigateUrl="~/ScoreCardEntry/comments.aspx">Previous Comments</asp:HyperLink></td>
</tr>
</table>
</td>
</tr>
</table>
<asp:SqlDataSource ID="udsp_SCFin1" runat="server" ConnectionString="<%$ ConnectionStrings:Cypress_APPConnectionString %>" SelectCommand="udsp_ScorecardQuarterly" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter Name="qtr" QueryStringField="qtr" Type="Int32" />
<asp:QueryStringParameter Name="year" QueryStringField="year" Type="Int32" />
<asp:QueryStringParameter Name="entID" QueryStringField="fac" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="udsp_SCFin2" runat="server" ConnectionString="<%$ ConnectionStrings:Cypress_APPConnectionString %>"
SelectCommand="udsp_ScorecardQuarterly" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter Name="qtr" QueryStringField="qtr" Type="Int32" />
<asp:QueryStringParameter Name="year" QueryStringField="year" Type="Int32" />
<asp:QueryStringParameter Name="entID" QueryStringField="fac" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="udsp_SCFin3" runat="server" ConnectionString="<%$ ConnectionStrings:Cypress_APPConnectionString %>"
SelectCommand="udsp_ScorecardQuarterly" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter Name="qtr" QueryStringField="qtr" Type="Int32" />
<asp:QueryStringParameter Name="year" QueryStringField="year" Type="Int32" />
<asp:QueryStringParameter Name="entID" QueryStringField="fac" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="udsp_SCFin4" runat="server" ConnectionString="<%$ ConnectionStrings:Cypress_APPConnectionString %>"
SelectCommand="udsp_ScorecardQuarterly" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="ddlQuarter" Name="qtr" PropertyName="SelectedValue"
Type="Int32" />
<asp:ControlParameter ControlID="ddlYear" Name="year" PropertyName="SelectedValue"
Type="Int32" />
<asp:ControlParameter ControlID="ddlFacility" Name="entID" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
</asp:Content>
from the code behind
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class fin : System.Web.UI.Page
{
string email = "";
SqlConnection conn;
SqlCommand cmd;
string source = "this works";
string fin1Meas1 = "";
string fin1Meas2 = "";
string fin2Meas1 = "";
string fin2Meas2 = "";
string fin3Meas1 = "";
string fin3Meas2 = "";
protected void Page_Load(object sender, EventArgs e)
{
hl_fin1.NavigateUrl = "~/ScoreCardEntry/comments.aspx?meas=FIN1&fac=" + Request.QueryString["fac"];
hl_fin2.NavigateUrl = "~/ScoreCardEntry/comments.aspx?meas=FIN2&fac=" + Request.QueryString["fac"];
hl_fin3.NavigateUrl = "~/ScoreCardEntry/comments.aspx?meas=FIN3&fac=" + Request.QueryString["fac"];
udsp_SCFin1.FilterExpression = "measureshortname='FIN1'";
udsp_SCFin2.FilterExpression = "measureshortname='FIN2'";
udsp_SCFin3.FilterExpression = "measureshortname='FIN3'";
udsp_SCFin4.FilterExpression = "measureshortname='FIN4'";
email = Request.QueryString["email"];
//automatically update status for the contract so they can see where they are from the contracttablepage
string select = "SELECT Description, shortname, measure1, measure2 FROM Measure where shortname like 'FIN%'";
conn = new SqlConnection(source);
conn.Open();
cmd = new SqlCommand(select, conn);
SqlDataReader dbreader = cmd.ExecuteReader();
while (dbreader.Read())
{
if(dbreader["shortname"].ToString() == "FIN1")
{
l_fin1Desc.Text = dbreader.GetValue(0).ToString();
fin1Meas1 = dbreader.GetValue(2).ToString();
fin1Meas2 = dbreader.GetValue(3).ToString();
}
else if (dbreader["shortname"].ToString() == "FIN2")
{
l_fin2Desc.Text = dbreader.GetValue(0).ToString();
fin2Meas1 = dbreader.GetValue(2).ToString();
fin2Meas2 = dbreader.GetValue(3).ToString();
}
else if (dbreader["shortname"].ToString() == "FIN3")
{
l_fin3Desc.Text = dbreader.GetValue(0).ToString();
fin3Meas1 = dbreader.GetValue(2).ToString();
fin3Meas2 = dbreader.GetValue(3).ToString();
}
else if (dbreader["shortname"].ToString() == "FIN4")
{
}
}
conn.Close();
}
public void gridSetup1(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[1].Text = fin1Meas1;
e.Row.Cells[2].Text = fin1Meas2;
}
if (e.Row.RowType == DataControlRowType.DataRow)
{
Image myImage;
myImage = (Image)e.Row.FindControl("fin1Ball");
if (e.Row.Cells[3].Text.Trim() == "3.00")
{
//e.Row.Cells[3].BackColor = System.Drawing.Color.LightGreen;
myImage.ImageUrl = "media/images/greenball.gif";
}
else if (e.Row.Cells[3].Text.Trim() == "0.00")
{
//e.Row.Cells[3].BackColor = System.Drawing.Color.Red;
myImage.ImageUrl = "media/images/redball.gif";
}
else
{
//e.Row.Cells[3].BackColor = System.Drawing.Color.Yellow;
myImage.ImageUrl = "media/images/yellowball.gif";
}
}
}
public void gridSetup2(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[1].Text = fin1Meas1;
e.Row.Cells[2].Text = fin1Meas2;
}
if (e.Row.RowType == DataControlRowType.DataRow)
{
Image myImage;
myImage = (Image)e.Row.FindControl("fin2Ball");
if (e.Row.Cells[3].Text.Trim() == "3.00")
{
//e.Row.Cells[3].BackColor = System.Drawing.Color.LightGreen;
myImage.ImageUrl = "media/images/greenball.gif";
}
else if (e.Row.Cells[3].Text.Trim() == "0.00")
{
//e.Row.Cells[3].BackColor = System.Drawing.Color.Red;
myImage.ImageUrl = "media/images/redball.gif";
}
else
{
//e.Row.Cells[3].BackColor = System.Drawing.Color.Yellow;
myImage.ImageUrl = "media/images/yellowball.gif";
}
}
}
public void gridSetup3(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[1].Text = fin1Meas1;
e.Row.Cells[2].Text = fin1Meas2;
}
if (e.Row.RowType == DataControlRowType.DataRow)
{
Image myImage;
myImage = (Image)e.Row.FindControl("fin3Ball");
if (e.Row.Cells[3].Text.Trim() == "3.00")
{
//e.Row.Cells[3].BackColor = System.Drawing.Color.LightGreen;
myImage.ImageUrl = "media/images/greenball.gif";
}
else if (e.Row.Cells[3].Text.Trim() == "0.00")
{
//e.Row.Cells[3].BackColor = System.Drawing.Color.Red;
myImage.ImageUrl = "media/images/redball.gif";
}
else
{
//e.Row.Cells[3].BackColor = System.Drawing.Color.Yellow;
myImage.ImageUrl = "media/images/yellowball.gif";
}
}
}
protected void bSaveFin1_Click(object sender, EventArgs e)
{
try
{
if (email == null)
{
throw new Exception("email address is missing");
}
else if ((this.tbCommFin1.Text != null) && (email != null))
{
DropDownList ddlFac = (DropDownList)Master.FindControl("ddlFacility");
DropDownList ddlYear = (DropDownList)Master.FindControl("ddlYear");
DropDownList ddlQtr = (DropDownList)Master.FindControl("ddlQuarter");
insertComment(ddlFac.SelectedItem.Value, email, "FIN1", tbCommFin2.Text, ddlQtr.SelectedItem.Value, ddlYear.SelectedItem.Value);
}
}
catch (Exception)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "myAlert", "<script language='javascript'>alert('FIN1: Email address is missing, contact Matt Cushing in IT Dept');</script>");
}
}
protected void bSaveFin2_Click(object sender, EventArgs e)
{
try
{
if (email == null)
{
throw new Exception("email address is missing");
}
else if ((this.tbCommFin2.Text != null) && (email != null))
{
DropDownList ddlFac = (DropDownList)Master.FindControl("ddlFacility");
DropDownList ddlYear = (DropDownList)Master.FindControl("ddlYear");
DropDownList ddlQtr = (DropDownList)Master.FindControl("ddlQuarter");
insertComment(ddlFac.SelectedItem.Value, email, "FIN2", tbCommFin2.Text, ddlQtr.SelectedItem.Value, ddlYear.SelectedItem.Value);
}
}
catch (Exception)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "myAlert", "<script language='javascript'>alert('FIN2: Email address is missing, contact Matt Cushing in IT Dept');</script>");
}
}
protected void bSaveFin3_Click(object sender, EventArgs e)
{
try
{
if (email == null)
{
throw new Exception("email address is missing");
}
else if ((this.tbCommFin3.Text != null) && (email != null))
{
DropDownList ddlFac = (DropDownList)Master.FindControl("ddlFacility");
DropDownList ddlYear = (DropDownList)Master.FindControl("ddlYear");
DropDownList ddlQtr = (DropDownList)Master.FindControl("ddlQuarter");
insertComment(ddlFac.SelectedItem.Value, email, "FIN2", tbCommFin3.Text, ddlQtr.SelectedItem.Value, ddlYear.SelectedItem.Value);
}
}
catch (Exception)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "myAlert", "<script language='javascript'>alert('FIN3: Email address is missing, contact Matt Cushing in IT Dept');</script>");
}
}
public void insertComment(string facID, string submitter, string measure, string comment, string qtr, string year)
{
try
{
//automatically update status for the contract so they can see where they are from the contracttablepage
string select = "insert into ScoreCardEntryComments (facID, submitter, measure, comment, qtr, year entryDate) Values(";
select = select + facID + ",'" + submitter + "','" + measure + "','" + comment + "'," + qtr + "," + year + ",'" + System.DateTime.Now.ToString() + "')";
conn = new SqlConnection(source);
conn.Open();
cmd = new SqlCommand(select, conn);
cmd.ExecuteNonQuery();
}
catch
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "myAlert", "<script language='javascript'>alert('Problem inserting comment');</script>");
}
finally
{
conn.Close();
}
}
decimal Measure1Total;
decimal Measure2Total;
public decimal GetMeasure1Total(string Measure1)
{
if (Measure1 != null)
{
Measure1Total += decimal.Parse(Measure1);
return decimal.Parse(Measure1);
}
else
{
return 0;
}
}
public decimal GetMeasure2Total(decimal Measure2)
{
Measure2Total += Measure2;
return Measure2;
}
public decimal Get1Total()
{
return Measure1Total;
}
public decimal Get2Total()
{
return Measure2Total;
}
}