public void retOffLineMission(string fromUser, string toUser) { DataTable dt = sqlHelper.retMission(fromUser, toUser); if (dt != null && dt.Rows.Count >= 0) { for (int i = 0; i < dt.Rows.Count; i++) { DataRow dr = dt.Rows[i]; FileClass file = new FileClass(); file.IsSender = false; file.Operation = OperationType.Download; file.SendFileType = SendFileType.OffLine; file.FileId = dr["fileid"].ToString(); file.IsContinue = true; file.FileName = file.SaveFileName = dr["filename"].ToString(); file.ReceivePath = dr["filePath"].ToString(); file.ReceiveSaveFileName = file.ReceivePath.Substring(file.ReceivePath.LastIndexOf('\\') + 1); file.ReceiveDir = file.ReceivePath.Substring(0, file.ReceivePath.LastIndexOf('\\')); file.FileSize = Convert.ToInt64(dr["fileSize"]); this.AddProcessCotrol.Invoke(file, false); } } }