protected void btnApply_Click(object sender, ImageClickEventArgs e) { try { #region Build Object //Gets the amount scale AmountScaleOption scaleOption = BudgetUtils.GetAmountScaleOptionFromText(this.Request.QueryString["AmountScaleOption"]); int multiplier = 1; //Find out the number that will be used to multiply the values with for (int i = 1; i <= (int)scaleOption; i++) { multiplier *= 1000; } //Build the object from the screen values InitialBudgetOtherCosts otherCosts = SessionManager.GetSessionValueNoRedirect(this, SessionStrings.INITIAL_OTHER_COSTS) as InitialBudgetOtherCosts; otherCosts.TE = (txtTE.Text == String.Empty) ? ApplicationConstants.DECIMAL_NULL_VALUE : decimal.Parse(txtTE.Text) * multiplier; otherCosts.ProtoParts = (txtProtoParts.Text == String.Empty) ? ApplicationConstants.DECIMAL_NULL_VALUE : decimal.Parse(txtProtoParts.Text) * multiplier; otherCosts.ProtoTooling = (txtProtoTooling.Text == String.Empty) ? ApplicationConstants.DECIMAL_NULL_VALUE : decimal.Parse(txtProtoTooling.Text) * multiplier; otherCosts.Trials = (txtTrials.Text == String.Empty) ? ApplicationConstants.DECIMAL_NULL_VALUE : decimal.Parse(txtTrials.Text) * multiplier; otherCosts.OtherExpenses = (txtOtherExpenses.Text == String.Empty) ? ApplicationConstants.DECIMAL_NULL_VALUE : decimal.Parse(txtOtherExpenses.Text) * multiplier; //Add object to session SessionManager.AddOtherCosts(this, otherCosts); #endregion Buidl Object //Close the page if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "ButtonClickScript")) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ButtonClickScript", "window.returnValue = 1; window.close();", true); } } catch (IndException exc) { ShowError(exc); return; } catch (Exception exc) { ShowError(new IndException(exc)); return; } }