Example #1
0
        void Client_DeleteFileByUrlCompleted(object sender, DeleteFileByUrlCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                if (e.Result != null)
                {
                    //1:删除成功;-1:文件不存在;其他:失败

                    if (e.Result == "1")
                    {
                        MessageBox.Show("删除成功!", "信息提示:", MessageBoxButton.OK);
                        BindDataGrid(itemSource);
                        //List.ItemsSource = itemSource;
                    }
                    else if (e.Result == "-1")
                    {
                        MessageBox.Show("文件不存在!", "信息提示:", MessageBoxButton.OK);
                        //List.ItemsSource = itemSource;
                    }
                    else
                    {
                        MessageBox.Show(e.Result, "信息提示:", MessageBoxButton.OK);
                    }
                }
            }
        }
Example #2
0
       void Client_DeleteFileByUrlCompleted(object sender, DeleteFileByUrlCompletedEventArgs e)
       {
           if (e.Error == null)
           {
               if (e.Result != null)
               {
                   //1:删除成功;-1:文件不存在;其他:失败

                   if (e.Result == "1")
                   {
                       MessageBox.Show("删除成功!", "信息提示:", MessageBoxButton.OK);
                       BindDataGrid(itemSource);
                       //List.ItemsSource = itemSource;
                   }
                   else if (e.Result == "-1")
                   {
                       MessageBox.Show("文件不存在!", "信息提示:", MessageBoxButton.OK);
                       //List.ItemsSource = itemSource;
                   }
                   else
                   {
                       MessageBox.Show(e.Result, "信息提示:", MessageBoxButton.OK);
                   }
               }
           }
       }