private void EditReport(NodeView nodeView)
        {
            var dialog = new AddEditReportDialog();
            dialog.Title = "Edit Report";

            var addEditReportModel = new AddEditReportModel(nodeView.Id) { View = dialog };
            addEditReportModel.DataLoaded +=
                () => { dialog.DataContext = addEditReportModel; };

            dialog.Show();
            dialog.Closed +=
                (s1, e1) =>
                {
                    if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                    {
                        nodeView.Name = dialog.ReportLink.ReportName;
                        nodeView.Description = dialog.ReportLink.Description;
                        nodeView.SortField = dialog.ReportLink.Ordinal.ToString();
                        nodeView.Parent.Sort();
                    }
                };
        }
        private void EditReport(NodeView nodeView)
        {
            AddEditReportDialog dialog = new AddEditReportDialog(nodeView.Id);
            dialog.Title = "Edit Report";

            dialog.Show();
            dialog.Closed +=
                (s1, e1) =>
                {
                    if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                    {
                        nodeView.Name = dialog.ReportLink.ReportName;
                        nodeView.Description = dialog.ReportLink.Description;
                        nodeView.SortField = dialog.ReportLink.Ordinal.ToString();
                    }
                    nodeView.Parent.Sort();
                };
        }
        private void AddNewReport(NodeView nodeView)
        {
            var dialog = new AddEditReportDialog();
            dialog.DataContext = new AddEditReportModel(mTab) { View = dialog };
            dialog.Show();

            dialog.Closed +=
                (s1, e1) =>
                {
                    if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                    {
                        var child = new NodeView(nodeView)
                        {
                            Id = dialog.ReportLink.Id,
                            Name = dialog.ReportLink.ReportName,
                            Description = dialog.ReportLink.Description,
                            Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png",
                            Type = NodeType.ReportNode,
                            HasChildren = false,
                            SortField = dialog.ReportLink.Ordinal.ToString()
                        };
                        if (nodeView.ChildrenLoaded)
                        {
                            nodeView.Children.Add(child);
                            nodeView.Sort();
                        }
                    }
                };
        }
        private void AddNewReport(NodeView nodeView)
        {
            AddEditReportDialog addEditReportDialog = new AddEditReportDialog(mTab);
            addEditReportDialog.Show();

            addEditReportDialog.Closed +=
                (s1, e1) =>
                {
                    if (addEditReportDialog.DialogResult.HasValue && addEditReportDialog.DialogResult.Value)
                    {
                        NodeView child = new NodeView(nodeView)
                        {
                            Id = addEditReportDialog.ReportLink.Id,
                            Name = addEditReportDialog.ReportLink.ReportName,
                            Description = addEditReportDialog.ReportLink.Description,
                            Icon = "/CmsEquipmentDatabase;component/Images/Item.png",
                            Type = NodeType.ReportNode,
                            SortField = addEditReportDialog.ReportLink.Ordinal.ToString(),
                            HasChildren = false
                        };
                        if (nodeView.ChildrenLoaded)
                        {
                            nodeView.Children.Add(child);
                            nodeView.Sort();
                        }
                    }
                };
        }