private void addNewToolStripMenuItem_Click(object sender, EventArgs e) { frmEditGoal editGoal = new frmEditGoal(); editGoal.PopulateScreen(null, m_currUser); editGoal.StartPosition = FormStartPosition.CenterParent; editGoal.BringToFront(); editGoal.FormClosing += new FormClosingEventHandler(editGoal_FormClosing); editGoal.ShowDialog(this); }
private void ShowEdit() { if (gvGoals.SelectedRows.Count > 0) { frmEditGoal editGoal = new frmEditGoal(); editGoal.PopulateScreen(((Goal)gvGoals.SelectedRows[0].DataBoundItem), m_currUser); editGoal.StartPosition = FormStartPosition.CenterParent; editGoal.BringToFront(); editGoal.FormClosing += new FormClosingEventHandler(editGoal_FormClosing); editGoal.ShowDialog(this); } }