public fileName GetLatestMawbDocuments(int TradelaneShipmentId) { fileName fn = new fileName(); var LatestDocument = dbContext.TradelaneShipmentDocuments.Where(a => a.TradelaneShipmentId == TradelaneShipmentId && a.DocumentType == "MAWB").OrderByDescending(a => a.RevisionNumber).FirstOrDefault(); if (LatestDocument != null) { fn.FileName = LatestDocument.DocumentName; fn.FilePath = AppSettings.UploadFolderPath + "/Tradelane/" + TradelaneShipmentId + "/" + LatestDocument.DocumentName; } return(fn); }
public fileName GenerateUnsucessfulShipmentsWithoutService(List <FrayteUserDirectShipment> ShipmentsWithoutService) { fileName fN = new fileName(); var flag = true; //fN.FilePath = @"D:\ProjectFrayte\Frayte\Frayte.WebApi\Manifestedshipments\"; fN.FilePath = AppSettings.WebApiPath + "Manifestedshipments/Incomplete Shipments Without Courier Service Download.csv"; fN.FileName = "Incomplete Shipments Without Courier Service Download"; List <FrayteUploadshipment> FUS = new List <FrayteUploadshipment>(); List <FrayteUploadshipment> FUSNew = new List <FrayteUploadshipment>(); foreach (var Shipment in ShipmentsWithoutService) { var gmd = new DirectBookingUploadShipmentRepository().GetShipmentErrors(Shipment.ShipmentId, "ECOMMERCE_WS"); var res = gmd[0]; FUS.Add(res); } //new eCommerceUploadShipmentRepository().ErrorLog(gmd, ServiceType); //foreach (var g in FUS) //{ // if (g.Errors.Count > 0) // { // FUSNew.Add(g); // } //} var Result = new DirectBookingUploadShipmentRepository().UnsuccessfulExcelWrite(FUS, "ECOMMERCE_WS"); if (fN.FileName.Contains(".csv")) { fN.FileName = fN.FileName; } else { fN.FileName = fN.FileName + ".csv"; } //fN.FilePath = filePath; if (Result.Message == "True") { foreach (var Shipment in ShipmentsWithoutService) { new DirectBookingUploadShipmentRepository().DeleteShipment(Shipment.ShipmentId); } } return(fN); }
public fileName GenerateCustomManifest(int ManifestId, string ManifestName) { if (ManifestName != null && !ManifestName.Contains(".csv")) { ManifestName = ManifestName + ".csv"; } TrackCustomManifest TCM = new TrackCustomManifest(); fileName fN = new fileName(); var flag = true; var filePaths = Directory.GetFiles(AppSettings.ManifestFolderPath); var filePath = AppSettings.WebApiPath + "Manifestedshipments/" + ManifestName; if (ManifestName != null && ManifestName != "") { for (int i = 0; i < filePaths.Length; i++) { var filePathLength = filePaths[i].Length; var FileName = filePaths[i].Split('\\'); var FileNameLength = FileName.Length; var ManifestFileName = FileName[FileNameLength - 1]; if (ManifestFileName == ManifestName) { flag = false; fN.FileName = ManifestName; fN.FilePath = filePath; break; } } } if (flag == true && ManifestName != null && ManifestName != "") { var gmd = new ManifestRepository().GetMainfestDataUI(ManifestId, ManifestName); fN.FileName = new ManifestRepository().ManifestExcelWriteFromUI(gmd, ManifestName); if (fN.FileName.Contains(".csv")) { fN.FileName = fN.FileName; } else { fN.FileName = fN.FileName + ".csv"; } fN.FilePath = filePath; } return(fN); }
AVIFileOpenW(out var fileHandle, fileName, OF_WRITE | OF_CREATE, 0);
ConnectToDatabase(fileName, enckey);
new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.Read),
set => Set(ref fileName, nameof(FileName), value);
public ZipArchive(string fileName, bool caseInsensitive = true) => Load(fileName, caseInsensitive);
Execute(fileName, arguments == null ? null : string.Join(" ", arguments));
MoveTypeOperationKind.MoveTypeNamespaceScope => new MoveTypeNamespaceScopeEditor(service, state, fileName, cancellationToken),
: base(GetHandle(fileName, forWriting, append), forWriting ? FileAccess.Write : FileAccess.Read, true)
=> Initialize(stream, streamOwnership, fileName, endianness, encoding ?? Encoding.Default, blockSize);
: this(columnsCount, fieldSeparator, options) => _writer = InitStreamWriter(fileName, textEncoding);
=> Initialize(stream, streamOwnership, fileName, endianness, encoding, blockSize);
public HttpResponseMessage DownloadCustomManifest(fileName fileName) { return(DownloadCustomManifest(fileName.FileName)); }
public DbAttachment(string fileName, Stream dataStream, bool saveData = false) : this() => PopulateFrom(fileName, dataStream, saveData);
MoveTypeOperationKind.RenameFile => new RenameFileEditor(service, state, fileName, cancellationToken),
Class296 class = Class466.smethod_24(fileName);
=> new MoveTypeEditor(service, state, fileName, cancellationToken),
=> new RenameFileEditor(service, state, fileName, cancellationToken),
internal static string getProjectSubfolderPath(AllSettings settings, subFolders folder, fileName extentionSelector, string fileNameAndExt = "") { string result = string.Empty; string dir = Path.Combine(settings.ProjectPath, folder.ToString()); if (Directory.Exists(dir)) { string fileName = folder.ToString(); switch (extentionSelector.ToString()) { case "pathToFolderFromProjectRoot": result = dir; break; case "appendFolderNameNoExt": result = Path.Combine(dir, fileName); break; case "appendFolderNameDotXml": result = Path.Combine(dir, fileName + ".xml"); break; case "appendFolderNameDotZip": result = Path.Combine(dir, fileName + ".zip"); break; case "appendfolderNameDotPSscript": result = Path.Combine(dir, fileName + ".ps1"); break; case "dataFileXml": result = Path.Combine(dir, "data.xml"); break; case "dataSchemaXml": result = Path.Combine(dir, "data_schema.xml"); break; case "contentTypesXml": result = Path.Combine(dir, @"[Content_Types].xml"); break; case "log": result = Path.Combine(dir, "Log_" + DateTime.Now.ToLocalTime() + ".txt"); break; default: if (GlobalHelper.isValidString(fileNameAndExt)) { result = Path.Combine(dir, fileNameAndExt); } break; } } return(result); }
MoveTypeOperationKind.MoveType => (Editor) new MoveTypeEditor(service, state, fileName, cancellationToken),
_output = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None);
public FileTransmissionHelper(string fileName, FileMode fileMode) => _fileStream = new FileStream(fileName, fileMode);