Esempio n. 1
0
 public Task<bool> SaveFile(Row p_row)
 {
     Pubfile pf = new Pubfile(
             ID: p_row.ID,
             ParentID: FolderID,
             Name: p_row.Str("name"),
             IsFolder: false,
             ExtName: p_row.Str("extname"),
             Info: p_row.Str("info"),
             Ctime: p_row.Date("ctime"));
     return AtCm.Save(pf, false);
 }
Esempio n. 2
0
 public Task<bool> MoveFiles(IEnumerable<Row> p_files, long p_folderID)
 {
     var ls = new List<Pubfile>();
     foreach (var row in p_files)
     {
         var pf = new Pubfile(ID: row.ID);
         pf.IsAdded = false;
         pf["ParentID"] = p_folderID;
         ls.Add(pf);
     }
     return AtCm.BatchSave(ls, false);
 }
Esempio n. 3
0
 public async Task<bool> SaveFolder(long p_id, string p_name)
 {
     Pubfile pf;
     if (p_id == -1)
     {
         pf = new Pubfile(
             ID: await AtCm.NewID(),
             ParentID: FolderID,
             Name: p_name,
             IsFolder: true,
             Ctime: Kit.Now);
     }
     else
     {
         pf = new Pubfile(ID: p_id);
         pf.IsAdded = false;
         pf["name"] = p_name;
     }
     return await AtCm.Save(pf);
 }