private void EditOwner(NodeView nodeView)
        {
            AddEditMobileOwnerDialog dialog = new AddEditMobileOwnerDialog(nodeView.Id);
            dialog.Title = "Edit Mobile Owner";
            dialog.Show();

            dialog.Closed +=
                (s1, e1) =>
                {
                    if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                    {
                        nodeView.Name = dialog.MobileOwner.Name;
                        nodeView.Description = dialog.MobileOwner.Description;
                        nodeView.SortField = dialog.MobileOwner.Ordinal.ToString();
                        nodeView.Parent.Sort();
                    }
                };
        }
        private void AddOwner(NodeView nodeView)
        {
            AddEditMobileOwnerDialog dialog = new AddEditMobileOwnerDialog();
            AddEditMobileOwnerModel addEditMobileOwnerModel = new AddEditMobileOwnerModel();
            addEditMobileOwnerModel.View = dialog;
            dialog.DataContext = addEditMobileOwnerModel;
            dialog.Show();

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