void Client_GetFileListByOnlyApplicationIDCompleted(object sender, GetFileListByOnlyApplicationIDCompletedEventArgs e) { try { if (e.Error == null) { if (e.Result != null) { if (e.Result.FileList != null) { HasAccessory = true; foreach (T_SYS_FILELIST file in e.Result.FileList) { string path = file.FILEURL; string filename = path.Substring(path.LastIndexOf('\\') + 1); string filepath = HttpUtility.UrlEncode(file.FILEURL + "\\" + file.FILENAME); file.FILEURL = e.Result.DownloadUrl + "?filename=" + filepath;//文件地址 //string filepath = HttpUtility.UrlEncode(file.THUMBNAILURL + "\\" + file.FILENAME); //file.FILEURL = e.Result.DownloadUrl + "?flag=1&filename=" + filepath; file.FORMID = path; } itemSource = e.Result.FileList; BindDataGrid(itemSource); } else { HasAccessory = false; } } } else { MessageBox.Show("网络出现错误请联系管理员"); } } catch (Exception ex) { SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage(ex.ToString()); SMT.SAAS.Main.CurrentContext.AppContext.ShowSystemMessageText(); } finally { if (GetFileComplete != null) { this.GetFileComplete(this, EventArgs.Empty); } } }
void Client_GetFileListByOnlyApplicationIDCompleted(object sender, GetFileListByOnlyApplicationIDCompletedEventArgs e) { try { if (e.Error == null) { if (e.Result != null) { if (e.Result.FileList != null) { HasAccessory = true; foreach (SMT_FILELIST file in e.Result.FileList) { string path = file.FILEURL; string filename = path.Substring(path.LastIndexOf('\\') + 1); string filepath = HttpUtility.UrlEncode(file.FILEURL + "\\" + file.FILENAME); file.FILEURL = e.Result.DownloadUrl + "?filename=" + filepath;//文件地址 //string filepath = HttpUtility.UrlEncode(file.THUMBNAILURL + "\\" + file.FILENAME); //file.FILEURL = e.Result.DownloadUrl + "?flag=1&filename=" + filepath; file.FORMID = path; } itemSource = e.Result.FileList; BindDataGrid(itemSource); } else { HasAccessory = false; } } } else { MessageBox.Show("网络出现错误请联系管理员"); } } catch (Exception ex) { SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage(ex.ToString()); SMT.SAAS.Main.CurrentContext.AppContext.ShowSystemMessageText(); } finally { if (GetFileComplete != null) { this.GetFileComplete(this, EventArgs.Empty); } } }