public static void RecordFileDetailsInDB(Dictionary <string, clsFileList> importFiles, string logProcessName) { uint count = 0; Utils.FileStatus status; WindART_SMIDataContext windARTDataContext = new WindART_SMIDataContext(); foreach (clsFileList readFile in importFiles.Values) { ProcessFile pf = new ProcessFile(); pf.ProcessDate = DateTime.Now; pf.OriginalName = readFile.OriginalFullFilepath; pf.Name = readFile.FullFilePath; pf.FileLocationId = readFile.FileLocationId; status = Utils.GetNextFileStatus(readFile); //status = Utils.FileStatus.UploadingToSharepoint; pf.FileStatus = (int)status; windARTDataContext.ProcessFiles.InsertOnSubmit(pf); windARTDataContext.SubmitChanges(); // Now we have the ProcessFile primary key readFile.ProcessFileId = pf.ProcessFileId; count++; } Utils.WriteToLog(Utils.LogSeverity.Info, logProcessName, count.ToString() + " file(s) marked as read"); }
partial void UpdateProcessFile(ProcessFile instance);
partial void DeleteProcessFile(ProcessFile instance);
partial void InsertProcessFile(ProcessFile instance);