I have an asp.net e-commerce application in which I am adding functionality of Discount:
if the totalPurchase amount >=200, then 5% disc,
if it is >=500, then 7%.. Like that.
Problem is the discount % should be changed dynamically via Admin login. i.e. I am not allowed to write this code in code-behind.
if(totalPurchase>=200 && totalPurchase<700)
{ // code for 5% discount }
I am trying to implement recordet to iterate through database table Discount whose fields are..
DiscID -1
DiscPer -5
DiscAmount -200
and so on..
I feel that you are missing a database column for storing your discount amount range like
200to700etc. I am assuming the database table name to beDiscountsand the range columns to beAmountFromandAmountTo. Here is my solution for you: