Exemplo n.º 1
0
        public AzureUploadFile PushBOFile(BOFile file)
        {
            if (file == null)
            {
                Trace.WriteLine("PushBOFile(null)");
                return(null);
            }

            Trace.WriteLine(string.Format("PushBOFile (RetailerId = {0}, RetailerName = {1}, FileType = {2}, FileDate = {3}, FileContentLength = {4}",
                                          file.RetailerId,
                                          file.RetailerName,
                                          file.FileType,
                                          file.FileDate,
                                          file.FileLength));

            string filePath  = BOFilesHelper.GetFileName(file);
            var    signature = BOFilesHelper.GetSignature(filePath);

            RetailerProcessor retProcessor = new RetailerProcessor();

            retProcessor.EnsureRetailerExists(file.RetailerId, file.RetailerName);

            JobAuditWrapper.AddBOFile(file.RetailerId, file.FileType, filePath);

            Trace.WriteLine("Returning " + signature.ToString());
            return(signature);
        }