示例#1
0
        /// <summary>
        /// 删除书源
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            BookSource bookSource = ListSource.SelectedItem as BookSource;

            if (bookSource != null && bookSource is BookSource)
            {
                if (MessageBox.Show("确定要删除书源【" + bookSource.Title + "】? 本操作不可以逆转,请谨慎操作~", "提示", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
                {
                    DataFetch.DeleteBookSource((int)bookSource.Id);
                }
            }
        }