Пример #1
0
        private void btnDiscount_Click(object sender, EventArgs e)
        {
            int discount;

            discount = int.Parse(txtDiscount.Text);
            book.DiscountPrice(discount);
        }
Пример #2
0
        private void btnSale_Click(object sender, EventArgs e) //할인 버튼 눌렀을 때 발생하는 이벤트 설정
        {
            int discount = Convert.ToInt32(txtDiscount.Text);  //할인 값 입력받아 정수형으로 변환 후 저장

            b.DiscountPrice(discount);                         //인터페이스 메소드 호출하여 가격 할인
        }