Retail_manager/RMDataManagerLibrary/ConfigHelper.cs
s459315 f0bea75284 Add Saving Cart to the DB
All the changes necessary to save shopping cart to DB
2022-07-25 17:02:36 +02:00

27 lines
637 B
C#

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RMDataManagerLibrary
{
public class ConfigHelper
{
public static decimal GetTaxRate()
{
string rateText = ConfigurationManager.AppSettings["taxRate"];
bool isValidTaxRate = Decimal.TryParse(rateText, out decimal output);
if (isValidTaxRate == false)
{
throw new ConfigurationErrorsException("The taxRate is not setup properly");
}
return output;
}
}
}