private void btnClose_Click(object sender, EventArgs e) { double count_question = QB.GetCount_of_Question(int.Parse(txtID.Text)); double score = double.Parse(txtTempPoin.Text) / count_question; DialogResult dr = MessageBox.Show("Are You Sure to End this Question?", "QUESTION", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == DialogResult.Yes) { this.Close(); if (temp_score_id != 0) { SC.SaveScore(score, Get_Finish_Time(), temp_score_id); int score_id = int.Parse(SC.Get_User_Id(temp_score_id)); FormQuis FQ = new FormQuis(score_id); FQ.ShowDialog(); FQ.RefreshGridView(); } else { int temp_user_id = Convert.ToInt32(SC.Get_User_Create(bank_id)); FormBank FB = new FormBank(temp_user_id); FB.ShowDialog(); } } }