Computer Science, asked by sakshimuktagmailcom, 6 days ago

Write a C# program to get input of ProdName, Rate, Qty in textboxes , calculate Amount, Discount (5.5%) ,
Tax(3.9%), NetAmount and show these values in respective textboxes.

Answers

Answered by sarika3111980
2

Answer:

protected void Button1_Click(object sender, EventArgs e) { if (IsValid) { decimal salesPrice; decimal discount; if (decimal.TryParse(TextBox1.Text, out salesPrice)) { if (decimal.TryParse(TextBox2.Text, out discount)) { decimal discountValue = this.CalculateDiscountValue(salesPrice, discount); decimal totalPrice = this.TotalPriceCalculate(salesPrice, discount); Label1.Text = discountValue.ToString("c"); Label2.Text = totalPrice.ToString("c"); } } } }

Similar questions