void EditModel(bool isNewModel) { try { btnModelAdd.Enabled = false; btnModelEdit.Enabled = false; blnAddNewModel = isNewModel; ModelInfo myModelInfo = new ModelInfo(); myModelInfo.PID = this.myModelPID; myModelInfo.TestCtrlName = PNInfo.getDTColumnInfo(PNInfo.TopoToatlDS.Tables["TopoTestControl"], "ItemName", "ID=" + myModelPID); // PNInfo.TopoToatlDS.Tables["TopoTestControl"].Rows[ myModelInfo.ShowDialog(); //show NextForm... RefreshMyInfo(false); btnModelAdd.Enabled = true; btnModelEdit.Enabled = true; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }