private void addGoalStep() { TreeNode tvn = this.tvGoalsAndSteps.SelectedNode; if (tvn.Tag.ToString().StartsWith("G")) { int goalID = Convert.ToInt32(tvn.Tag.ToString().Substring(1)); EditGoalStep childForm = new EditGoalStep(CurrentUser, PageMode.Add, goalID); childForm.CurrentPageMode = PageMode.Add; childForm.ShowDialog(); loadTree(); } else { ShowError("Please select a Goal first.", Form_Title); } }
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(); } }