protected void SupportUnitMetricsGridView_RowUpdating(Object sender, System.Web.UI.WebControls.GridViewUpdateEventArgs e) { String metricType = (String)Session["metricType"]; String supportUnit = (String)Session["supportUnit"]; TextBox TBox; Double rate; Double totalMetrics; Double costToAllocate; metricType = SupportUnitMetricsGridView.Rows[e.RowIndex].Cells[0].Text; TBox = (TextBox)SupportUnitMetricsGridView.Rows[e.RowIndex].Cells[1].Controls[0]; rate = Double.Parse(TBox.Text)/100; TBox = (TextBox)SupportUnitMetricsGridView.Rows[e.RowIndex].Cells[2].Controls[0]; totalMetrics = Double.Parse(TBox.Text); TBox = (TextBox)SupportUnitMetricsGridView.Rows[e.RowIndex].Cells[3].Controls[0]; costToAllocate = Double.Parse(TBox.Text); //TBox = (TextBox)SupportUnitMetricsGridView.Rows[e.RowIndex].Cells[5].Controls[0]; //metrics = Double.Parse(TBox.Text); StoredProcedures sp = new StoredProcedures(); sp.UpdateCostDrivers(FinancialYearDropDownList.SelectedValue, supportUnit, metricType, rate, totalMetrics, costToAllocate); sp.UpdateRevenueExpenseSummary(FinancialYearDropDownList.SelectedValue); DisplayRevenueExpenseSummaryReport(); DisplaySupportUnit(supportUnit); DisplayAllocatedCostsSummaryReport(); SupportUnitMetricsGridView.EditIndex = -1; DisplaySupportUnitMetrics(supportUnit, metricType); FocusAnchor.Focus(); }