private void addGoal() { EditGoal childForm = new EditGoal(CurrentUser, PageMode.Add); childForm.CurrentPageMode = PageMode.Add; childForm.ShowDialog(); loadTree(); }
private void editNodeContent() { TreeNode tvn = this.tvGoalsAndSteps.SelectedNode; if (tvn.Tag.ToString().StartsWith("G")) { EditGoal childForm = new EditGoal(CurrentUser, PageMode.Add); childForm.CurrentPageMode = PageMode.Edit; childForm.ItemID = Convert.ToInt32(tvn.Tag.ToString().Substring(1)); childForm.ShowDialog(); loadTree(); } else if (tvn.Tag.ToString().StartsWith("S")) { int goalID = Convert.ToInt32(tvn.Parent.Tag.ToString().Substring(1)); EditGoalStep childForm = new EditGoalStep(CurrentUser, PageMode.Add, goalID); childForm.CurrentPageMode = PageMode.Edit; childForm.ItemID = Convert.ToInt32(tvn.Tag.ToString().Substring(1)); childForm.ShowDialog(); loadTree(); } }