Exemple #1
0
        public void DropView_DropsViewFromDatabase()
        {
            viewHandler.Drop("View1");

            var result = FindView("View1");

            Assert.IsNull(result);
        }
        public void Execute(ICollection <TreeItem> collection, TreeItem itemToDelete)
        {
            var userAgrees = dialogService.AskForUserAgreement("MessageBox_ViewDeleteWarning", "MessageBoxTitle_ViewDeletion", itemToDelete.DisplayName);

            if (!userAgrees)
            {
                return;
            }

            using (var viewHandler = new ViewHandler(Properties.Settings.Default.CurrentDatabase))
            {
                viewHandler.Drop(itemToDelete.DisplayName);
                RemoveItemFromHierarchy(collection, itemToDelete);
            }
        }