private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     GetUploadUserFile.AsyncPOST(UserID, UserPWD, nowVM.ID, FileID, "new", (fd) =>
     {
         this.Dispatcher.BeginInvoke(new Action(() =>
         {
             try
             {
                 if (fd.Status.Success.Equals("Y"))
                 {
                     callback(nowVM.ID, nowVM.Name);
                     this.Close();
                 }
             }
             catch
             { }
         }));
     });
 }
Example #2
0
        private void CallWS()
        {
            GetUploadUserFile.AsyncPOST(UserID, UserPWD, FolderID, FileID, "del", (fd) => {
                this.Dispatcher.BeginInvoke(new Action(() => {
                    if (fd != null && fd.Status != null && fd.Status.Success != null && fd.Status.Success.Equals("Y"))
                    {
                        AutoClosingMessageBox.Show("刪除成功");
                        MSCE.ExecuteNonQuery("update userfile set folderid='' where userid=@1 and fileid=@2"
                                             , UserID
                                             , UserPWD
                                             , FileID);

                        this.DialogResult = true;
                        this.Close();
                    }
                    else
                    {
                        AutoClosingMessageBox.Show("新增失敗");
                    }
                }));
            });
        }