예제 #1
0
 private void btnPayment_Click(object sender, EventArgs e)
 {
     if (CheckBill())
     {
         if (txtMoneyExcess.Text.Equals("-0.000") || txtMoneyExcess.Text.Equals(""))
         {
             MessageBox.Show("Bạn chưa trả đủ tiền", "Lỗi: ", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             if (_service.Comfirm(txtIDBilltoDetail.Text))
             {
                 MessageBox.Show("Thanh toán thành công ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.None);
                 btnPayment.Enabled = false;
                 InHoaDon();
             }
             else
             {
                 MessageBox.Show("Lỗi thanh toán", "Lỗi", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
             }
         }
     }
     View();
 }