Remove this block of code
string taxStr = taxRateTxt.Text;
//test for an empty string and set it to db null
if (taxStr == String.Empty)
{
taxStr = DBNull.Value;
}
and change this
cmd.Parameters.Add(new SqlParameter("@TaxRate", taxStr));
to this
cmd.Parameters.Add(new SqlParameter("@TaxRate", string.IsNullOrEmpty(taxRateTxt.Text) ? (object)DBNull.Value : taxRateTxt.Text));