Arifullah Irfann

Arifullah Irfann

  • NA
  • 410
  • 26.8k

Decimal Value comparison with integer value

Jun 23 2019 12:32 AM
Hello
I am working on Inventory system
I have a product table which contains Id, item name, SalePrice
the data type for sale price is decimal(18,2)
when I want to add this item to sale list there is a condition that if this item already added to list it will increase the quantity and will not add this item again
the problem is
the product sale price is 50.00 and I add it to sale list if I add again this with 50.00 price product it will increase the quantity
but I change the price to 50 it adds a new item in the sale list
how to change this 50 to decimal then make the comparison in c# windows app

Answers (3)