Exemplo n.º 1
0
        protected void ReceiptButton_Click(object sender, EventArgs e)
        {
            if (IsValid) {

                try
                {
                    Model.Reciept rec = new Model.Reciept();

                    rec.Calculate(int.Parse(SumTextBox.Text));

                    RecieptPanel.Visible = true;

                    SubLiteral.Text = String.Format(SubLiteral.Text, rec.Subtotal);

                    DiscountLiteral.Text = String.Format(DiscountLiteral.Text, rec.DiscountRate);

                    MoneyOffLiteral.Text = String.Format(MoneyOffLiteral.Text, rec.MoneyOff);

                    MoneyDueLiteral.Text = String.Format(MoneyDueLiteral.Text, rec.Total);

                }
                catch (Exception)
                {

                    throw;
                }
            }
        }