private void AddNewIssueReward(NodeView nodeView)
        {
            AddEditIssueRewardDialog dialog = new AddEditIssueRewardDialog();
            dialog.Title = "Add new Issue Reward";

            dialog.Show();
            dialog.Closed +=
                (s1, e1) =>
                {
                    if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                    {
                        NodeView child = new NodeView(nodeView)
                        {
                            Id = dialog.SavedIssueReward.Id,
                            Name = dialog.SavedIssueReward.Reward.ToString(),
                            Description = dialog.SavedIssueReward.Production,
                            Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png",
                            Type = NodeType.IssueRewardNode,
                            HasChildren = false,
                            SortField = dialog.SavedIssueReward.Ordinal.ToString(),
                            IsActive = dialog.SavedIssueReward.IsActive
                        };

                        if (nodeView.ChildrenLoaded)
                        {
                            nodeView.Children.Add(child);
                        }
                        nodeView.Sort();
                    }
                    nodeView.Sort(false);
                };
        }
        private void EditIssueReward(NodeView nodeView)
        {
            AddEditIssueRewardDialog dialog = new AddEditIssueRewardDialog(nodeView.Id);
            dialog.Title = "Edit Issue Reward";
            dialog.Show();

            dialog.Closed +=
                (s1, e1) =>
                {
                    if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                    {
                        nodeView.Id = dialog.SavedIssueReward.Id;
                        nodeView.Name = dialog.SavedIssueReward.Reward.ToString();
                        nodeView.Description = dialog.SavedIssueReward.Production;
                        nodeView.SortField = dialog.SavedIssueReward.Ordinal.ToString();
                    }
                    nodeView.Parent.Sort(false);
                };
        }