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
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
India Languages,
3 days ago
India Languages,
3 days ago
English,
3 days ago
Math,
6 days ago
Math,
6 days ago
Math,
8 months ago