private void buttonSave_Click(object sender, EventArgs e) { //Get the values from input fields c.yearSemester = comboYearSemester.Text; c.programme = comboProgramme.Text; c.groupNumber = Convert.ToInt32(numericBatchNumber.Value); c.subgroupNumber = Convert.ToInt32(numericGroupNumber.Value); c.groupID = textGID.Text; c.subGroupID = textSGID.Text; bool success = c.Insert(c); if (success == true) { if (MessageBox.Show("Do You want to move \'Manage Student Groups\'?", "Tag is ceated...", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { ManageStudentGroups f2 = new ManageStudentGroups(); f2.Show(); } else { } // MessageBox.Show("New Group Successfully Created."); } else { MessageBox.Show("Faild to create new group. "); } }