private void txtSoLuong_TextChanged(object sender, EventArgs e) { if (txtSoLuong.Text != string.Empty) { if (int.Parse(txtSoLuong.Text) > 0 && int.Parse(txtSoLuong.Text) < hd_bll.GetSoLuong(cboMaSP.SelectedValue.ToString())) { decimal thanhtien = decimal.Parse(txtDonGia.Text.ToString()) * int.Parse(txtSoLuong.Text); txtTongTien.Text = Convert.ToString(thanhtien); } else { txtTongTien.Text = "0"; } } }