Exemplo n.º 1
0
 /// <summary>
 /// 添加上传任务方法
 /// </summary>
 /// <param name="file"></param>
 public void dtMissionAdd(FileClass file, ItemUploadFile item, string fromUser, string toUser)
 {
     lock (this.dtMission)
     {
         DataRow dr = dtMission.NewRow();
         dr["fileId"]    = item.File.FileId;
         dr["FileSize"]  = item.File.FileSize;
         dr["item"]      = item;
         dr["Operation"] = (int)file.Operation;
         dtMission.Rows.Add(dr);
         if (file.Operation == OperationType.Download && !file.IsContinue)
         {
             sqlHelper.AddMission(item.File.FileId, item.File.SaveFileName, item.File.ReceivePath,
                                  item.File.FileSize.ToString(), 0, (int)file.Operation, fromUser, toUser);
         }
     }
 }