/// <summary> /// 取的有未上传完的文件和文件夹 /// </summary> /// <param name="uid"></param> /// <returns></returns> public static string all_uncmp(int uid) { List <FileInf> files = new List <FileInf>(); string sql = @"select f_id ,f_fdTask ,f_nameLoc ,f_pathLoc ,f_pathSvr ,f_blockPath ,f_sizeLoc ,f_perSvr from up7_files where f_uid=@uid and f_complete=0 and f_deleted=0;"; DbHelper db = new DbHelper(); DbCommand cmd = db.GetCommand(sql); db.AddInInt32(cmd, "@uid", uid); var r = db.ExecuteReader(cmd); while (r.Read()) { FileInf f = new FileInf(); f.id = r.GetString(0); f.fdTask = r.GetBoolean(1); f.nameLoc = r.GetString(2); f.pathLoc = r.GetString(3); f.pathSvr = r.GetString(4); f.blockPath = r.GetString(5); f.sizeLoc = r.GetString(6); f.perSvr = r.GetString(7); files.Add(f); } r.Close(); if (files.Count < 1) { return(string.Empty); } return(JsonConvert.SerializeObject(files)); }