private void button2_Click(object sender, EventArgs e) { string a = taomas(); string x = ""; string tl = ""; if (ckbHD.Checked == true) { tl = tl + "hanh dong, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbNL.Checked == true) { tl = tl + "nguoi lon, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbPL.Checked == true) { tl = tl + "phieu lieu, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbHH.Checked == true) { tl = tl + "hai huoc, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbDrama.Checked == true) { tl = tl + "drama, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbFan.Checked == true) { tl = tl + "fantasy, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbLS.Checked == true) { tl = tl + "lich su, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbCG.Checked == true) { tl = tl + "con gai, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbCT.Checked == true) { tl = tl + "contrai, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbKDi.Checked == true) { tl = tl + "kinh di, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbTra.Checked == true) { tl = tl + "tragedy, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbBiAn.Checked == true) { tl = tl + "bi an, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbTrinhT.Checked == true) { tl = tl + "trinh tham, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbGGan.Checked == true) { tl = tl + "giat gan, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbLM.Checked == true) { tl = tl + "lang man, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbLN.Checked == true) { tl = tl + "lightnovel, "; x = x + "'True',"; } else { x = x + "'False',"; } if (ckbHT.Checked == true) { tl = tl + "hoc thuat, "; x = x + "'True',"; } else { x = x + "'False'"; } sach.AddDataTL(a, x); if (sach.AddData(a, textBox5.Text, tl, textBox4.Text, textBox2.Text, textBox1.Text, txbAnh.Text, textBox7.Text, textBox8.Text, textBox6.Text, textBox9.Text)) { MessageBox.Show("Them thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Vui long nhap day du cac muc co danh dau *!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }