Exemple #1
0
 void _client_StoreFileAdvancedCompleted(object sender, StoreFileAdvancedCompletedEventArgs e)
 {
     //检查WEB服务是否存在错误
     if (e.Error != null)
     {
         //当错误时放弃上传
         _file.State = Constants.FileStates.Error;
     }
     else
     {
         //如果文件未取消上传的话,则继续上传
         if (!_file.IsDeleted)
         {
             if (e.Result != null && e.Result.Aid > 0)
             {
                 //返回了已上传的附件信息,并添加到已上传附件列表中
                 Page.AttachmentList.Add(e.Result);
             }
             UploadAdvanced();
         }
     }
 }
Exemple #2
0
 void _client_StoreFileAdvancedCompleted(object sender, StoreFileAdvancedCompletedEventArgs e)
 {
     //检查WEB服务是否存在错误
     if (e.Error != null)
     {
         //当错误时放弃上传
         _file.State = Constants.FileStates.Error;
     }
     else
     {
         //如果文件未取消上传的话,则继续上传
         if (!_file.IsDeleted)
         {
             if (e.Result != null && e.Result.Aid > 0)
             {
                 //返回了已上传的附件信息,并添加到已上传附件列表中
                 Page.AttachmentList.Add(e.Result);
             }
             UploadAdvanced();
         }
    }           
 }