Пример #1
0
 void Client_GetFileListBySystemCodeCompleted(object sender, GetFileListBySystemCodeCompletedEventArgs 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;//文件地址
                 }
                 itemSource = e.Result.FileList;
                 BindDataGrid(itemSource);
             }
             else
             {
                 HasAccessory = false;
             }
         }
     }
     else
     {
         MessageBox.Show("网络出现错误请联系管理员");
     }
 }
Пример #2
0
       void Client_GetFileListBySystemCodeCompleted(object sender, GetFileListBySystemCodeCompletedEventArgs 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;//文件地址
                       }
                       itemSource = e.Result.FileList;
                       BindDataGrid(itemSource);
                   }
                   else
                   {
                       HasAccessory = false;
                   }
               }
           }
           else
           {
               MessageBox.Show("网络出现错误请联系管理员");
           }
       }