tshad, since you are using my own codes, i think i can say, you have to use
GetValueFromDbObject only when you are getting the value from DataReader or
DataParameter.Value (for output parameters.)

when getting the decimal
value from textbox, you probably will parse it to decimal
decimal salary = txtSalary.Text == String.Empty ? Decimal.MaxValue :
Decimal.Parse(txtSalary.Text);
and send to business object layer as decimal (as a method parameter or
entity property value.). to give you an idea, i have encapsulated this logic
to an "DecimalPicker" user web control. added javascript for validation and
Value Property. here is my code (my currency uses , as decimal seperator. so
you can modify):
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="DecimalPicker.ascx.cs"
Inherits="MyCompany.WebUI.WebUserControls.DecimalPicker"
TargetSchema="
http://schemas.microsoft.com/intellisense/ie5"%>
<asp:TextBox ID="txtDecimal" Runat="server" CssClass="SaveFormTextBox" />
<asp:RequiredFieldValidator ID="valReqTxtDecimal" Runat="server"
Display="Dynamic" EnableViewState="False" ControlToValidate="txtDecimal">
<img src="/_MyCompanyLayout/images/warnimg.gif" alt="Please enter an valid
value." />
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valRegExTxtDecimal" Runat="server"
Display="Static" ControlToValidate="txtDecimal" EnableViewState="False"
CssClass="Validator" EnableClientScript="True"
ValidationExpression="^(\d{1,3}(\.\d{3})*|(\d+))(\,\d{2})?$">
<img src="/_MyCompanyLayout/images/warnimg.gif" alt="Lütfen Geçerli Bir
E-Mail Giriniz." />
</asp:RegularExpressionValidator>
this is the code behind :
namespace Synapse.WebUI.WebUserControls
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;
public class DecimalPicker : Synapse.WebUI.SynapseWebUserControlBase
{
protected System.Web.UI.WebControls.TextBox txtDecimal;
protected System.Web.UI.WebControls.RegularExpressionValidator
valRegExTxtDecimal;
protected System.Web.UI.WebControls.RequiredFieldValidator valReqTxtDecimal;
public bool Required
{
get
{
object o = ViewState["Required"];
if(o == null)
return true;
else
return (bool)o;
}
set
{
ViewState["Required"] = value;
}
}
public bool Enabled
{
get{return txtDecimal.Enabled;}
set{txtDecimal.Enabled = value;}
}
public decimal Value
{
get
{
return txtDecimal.Text == String.Empty ? Decimal.MaxValue :
Decimal.Parse(txtDecimal.Text);
}
set
{
txtDecimal.Text = value == Decimal.MaxValue ? String.Empty :
value.ToString();
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
}
#endregion
protected override void OnPreRender(EventArgs e)
{
valReqTxtDecimal.Enabled = Required;
base.OnPreRender (e);
}
}
}