private void btnOK_Click(object sender, EventArgs e) { if (SubmitRecord()) { parentForm.AfterAddRecord(indexTable); this.Close(); } //parentForm.AfterAddRecord(indexTable); }