private void CallWS() { if (tbPinCode.Text.Trim().Equals("") == true) { AutoClosingMessageBox.Show("請輸入資料夾名稱"); } else { if (list.Contains(tbPinCode.Text.Trim())) { AutoClosingMessageBox.Show("資料夾名稱重複,請重新命名。"); } else { var folderName = tbPinCode.Text.Trim(); GetUploadUserFolder.AsyncPOST(UserID, UserPWD, FolderID, folderName, "rename", (fd) => { this.Dispatcher.BeginInvoke(new Action(() => { if (fd != null && fd.Status != null && fd.Status.Success != null && fd.Status.Success.Equals("Y")) { AutoClosingMessageBox.Show("修改成功"); this.DialogResult = true; this.Close(); } else { AutoClosingMessageBox.Show("修改失敗"); } })); }); } } }
private void CallWS() { GetUploadUserFolder.AsyncPOST(UserID, UserPWD, FolderID, FolderName, "del", (fd) => { this.Dispatcher.BeginInvoke(new Action(() => { if (fd != null && fd.Status != null && fd.Status.Success != null && fd.Status.Success.Equals("Y")) { AutoClosingMessageBox.Show("刪除成功"); this.DialogResult = true; this.Close(); } else { AutoClosingMessageBox.Show("刪除失敗"); } })); }); }