Esempio n. 1
0
        void Client_GetFileListByApplicationIDCompleted(object sender, GetFileListByApplicationIDCompletedEventArgs e)
        {
            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;
                            //formid暂时没用处,用来存储fileurl信息
                            file.FORMID = path;
                        }
                        itemSource = e.Result.FileList;
                        BindDataGrid(itemSource);
                    }
                    else
                    {
                        HasAccessory = false;
                    }
                }
            }
            else
            {
                MessageBox.Show("网络出现错误请联系管理员");
            }
        }
Esempio n. 2
0
       void Client_GetFileListByApplicationIDCompleted(object sender, GetFileListByApplicationIDCompletedEventArgs e)
       {
           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;
                           //formid暂时没用处,用来存储fileurl信息
                           file.FORMID = path;
                       }
                       itemSource = e.Result.FileList;
                       BindDataGrid(itemSource);
                   }
                   else
                   {
                       HasAccessory = false;
                   }
               }
           }
           else
           {
               MessageBox.Show("网络出现错误请联系管理员");
           }
       }