ඉතින් යාලුවනේ කොහොමද අද අපි බලමු billing සිස්ටම් එකක් හදන්නේ කියල. මුලින්ම ඔයාලට තියෙන්නේ පහතින් තියෙන විදියට interfaceඑක design කරගන්න.interface එක පෙන්නේ නැත්නම් රුපය උඩ ඩබල් click කරලා ලොකු කරගන්න.මෙහි calculate
කියන button එක click කරාම අපි ඇතුලත් කරපු item ගණන සහ price එක වැඩි වෙලා extended price කියන පිළිතුර ලැබෙන්න ඕනේ.
මීලගට 30% ක discount rate එකකින් වැඩිවෙලා ගෙවිය යුතු මිල display කල යුතුය.අපි මෙහෙම මිල සහ ප්රමාණය enter කල වතාවන් අනුව ගනුදෙනු ගණනසහ total invoice amount එක ලැබිය යුතුය.
codings ටික මුලින්ම දෙන්නම් ඊට පස්සේ පැහැදිලි කරගමු මොකක්ද කරේ කියල.
{
clothing_salespublic partial class Form1 : Form{
{
InitializeComponent();
}
{
}
{
quantity =
price =
extendedPrice = quantity * price;
discount = extendedPrice * DISCOUNT_RATE;
amountDue = extendedPrice - discount;
numberOfTransaction++;
totalAmount += amountDue;
three.Text = extendedPrice.ToString(
four.Text = discount.ToString(
five.Text = amountDue.ToString(
six.Text = totalAmount.ToString();
seven.Text = numberOfTransaction.ToString();
}