private void xoa_hs_trong_csdl_Click(object sender, EventArgs e)
        {
            string mahs_temp = txtMaHS.Text.Trim();
            int    index     = xoa_hoc_sinh_trong_du_lieu.FocusedItem.Index;

            if ((index < 0) && (mahs_temp.Length == 0))
            {
                MessageBox.Show("Chon hoc sinh can xoa");
            }
            else
            {
                txtMaHS.Text = mahs_temp;
                button6_Click(sender, e);
                string sql_text = "DELETE from HOCSINH WHERE MAHS = '" + mahs_temp + "'";
                if (SQL_Connect.exec(sql_text))
                {
                    MessageBox.Show("Xoa thanh cong");
                    button2_Click(sender, e);
                    Form1_Load(sender, e);
                }
                else
                {
                    MessageBox.Show("Loi du lieu");
                }
            }
        }
        private void button4_Click(object sender, EventArgs e)
        {
            bool hopLe = thongTinHopLe();

            if (hopLe)
            {
                string maHS        = txtMaHS.Text.Trim();
                int    maHS_length = maHS.Length;

                string ho_ten       = txtHoTen.Text.Trim();
                int    hoten_length = ho_ten.Length;


                string gioi_tinh = gioitinh.Checked == true ? "Nam" : "Nu";
                string diachi    = dia_chi.Text.Trim();

                Single diemTB = 0;

                bool dtb_bool = kiem_diem(ref diemTB);


                string lop = cbLop.Text;

                string ngay_sinh = ngaysinh.Value.ToShortDateString();

                string txtMaLop = maLop(lop);
                string sql_text = "UPDATE HOCSINH SET " +
                                  "HOTEN = '" + ho_ten + "'," +
                                  "GIOITINH = '" + gioi_tinh + "'," +
                                  "NGAYSINH = '" + ngay_sinh + "'," +
                                  "DIACHI='" + diachi + "'," +
                                  "DTB='" + diemTB + "'," +
                                  "MALOP='" + txtMaLop + "'" +
                                  "WHERE MAHS = '" + maHS + "';";


                if (SQL_Connect.exec(sql_text))
                {
                    MessageBox.Show("Nhap thanh cong");
                    button2_Click(sender, e);
                    Form1_Load(sender, e);
                }
                else
                {
                    MessageBox.Show("loi khi nhap du lieu");
                }
            }
        }