public void CreateGroup(string name, string description)
        {
            ObservableCollection <Resource> reses = selected.Count > 0 ? selected : new ObservableCollection <Resource> {
                lastSelected
            };
            DatabaseHandler db = new DatabaseHandler(this);

            db.Open();
            Resource group = db.AddGroup(name, description, parent, reses);

            if (parent == null)
            {
                resources.Add(group);
            }
            else
            {
                parent.AddResource(group);
            }
            if (selected.Count > 0)
            {
                foreach (Resource res in selected)
                {
                    if (res.Group == null)
                    {
                        resources.Remove(res);
                    }
                    else
                    {
                        res.Group.RemoveResource(res, false);
                    }
                    group.AddResource(res);
                    res.Group = group;
                }
            }
            else
            {
                if (lastSelected.Group == null)
                {
                    resources.Remove(lastSelected);
                }
                else
                {
                    lastSelected.Group.RemoveResource(lastSelected, false);
                }
                group.AddResource(lastSelected);
                lastSelected.Group = group;
            }
            InMultiSelectMode = false;
            Select(group);
        }