public void CloseForm() { VMasterDataTable.Clear(); foreach (JkDetailDataSet DataSet in IAppHandler.FindControlByType("JkDetailDataSet", this)) { DataSet.DataTable.Clear(); } if (IAppHandler.OpenPreviousForm(this) != null) { IAppHandler.OpenPreviousForm(this).Run(); } this.Dispose(); }