private void btn_Save_Click(object sender, EventArgs e)
{
if (cmb_Catalogue.SelectedItem != null)
{
if (rad_Copy.Checked == true)
{
if (countcheck() > 0)
{
CopyQuestion();
//notifyIcon1.Icon = SystemIcons.Information;
//notifyIcon1.BalloonTipText = "Sao chép câu hỏi từ chủ đề " + cmb_Catalogue.SelectedItem.ToString() + "thành công.";
//notifyIcon1.ShowBalloonTip(2000);
MessageBox.Show("Sao chép câu hỏi từ chủ đề " + cmb_Catalogue.SelectedItem.ToString() + "thành công.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
Form FindForm = this.FindForm();
FindForm.Close();
}
else
{
//notifyIcon1.Icon = SystemIcons.Warning;
//notifyIcon1.BalloonTipText = "Không có câu hỏi nào được chọn để sao chép đến chủ đề.";
//notifyIcon1.ShowBalloonTip(2000);
MessageBox.Show("Vui lòng chọn câu hỏi trước khi lưu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
if (rad_Move.Checked == true)
{
if (countcheck() > 0)
{
MoveQuestion();
//notifyIcon1.Icon = SystemIcons.Information;
//notifyIcon1.BalloonTipText = "Di chuyển câu hỏi từ chủ đề " + cmb_Catalogue.SelectedItem.ToString() + "thành công.";
//notifyIcon1.ShowBalloonTip(2000);
MessageBox.Show("Di chuyển câu hỏi từ chủ đề " + cmb_Catalogue.SelectedItem.ToString() + "thành công.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
Form FindForm = this.FindForm();
FindForm.Close();
}
else
{
MessageBox.Show("Vui lòng chọn câu hỏi trước khi lưu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
else
{
MessageBox.Show("Vui lòng chọn chủ đề trước khi lưu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}