public bool AddNewFile(int pID, WSFileItem fi, int uID) { WorkSummary nf = new WorkSummary(); nf.File_NewName = fi.fileNamePresent; nf.File_OldName = fi.fileName; nf.File_UploadTime = Convert.ToDateTime(fi.updateTime); nf.File_Submiter = (new Person_Infos()).GetPerson_info(uID); nf.File_SavePath = fi.path; nf.File_ExtType = fi.ext; return((new WorkSummaryCatalog()).AddFiletoCatalog(pID, nf)); }
public List <WSFileItem> GetFilesInCatalog(int ID) { List <WorkSummary> files = (new WorkSummaryCatalog()).GetFiles(ID); List <WSFileItem> fs = new List <WSFileItem>(); foreach (var f in files) { Person_Infos submiter = new Person_Infos(); WSFileItem fi = new WSFileItem(); fi.id = Convert.ToString(f.File_Id); //fi.uploader = f.File_Submiter.Person_Name.ToString(); fi.uploader = submiter.GetPerson_info(f.Mission_Id).Person_Name; fi.fileName = f.File_OldName; fi.updateTime = f.File_UploadTime.ToString(); fi.ext = f.File_ExtType; fi.path = f.File_SavePath; fi.fileNamePresent = f.File_NewName; fs.Add(fi); } return(fs); }