Exemple #1
0
        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");
        }
Exemple #2
0
 partial void UpdateProcessFile(ProcessFile instance);
Exemple #3
0
 partial void DeleteProcessFile(ProcessFile instance);
Exemple #4
0
 partial void InsertProcessFile(ProcessFile instance);