//# __________ PROTOCOL :: CONSTRUCTOR __________ #// public VmAccount(JwList<String> sa) { Code = sa[0]; Name = sa[1]; Path = sa[2]; Profile = sa[3]; }
public void AddIfBeingUsed(JwList<VmEventManagerIF> v, VmEventManagerIF eventManager) { if( eventManager == null ) return; if( !eventManager.HasMoreEvents() ) return; v.Add(eventManager); }
public void AddAccounts(JwList<VmAccount> v, String fileName) { JwList<JwCsvRow> rows = JwUtility.ReadCsvFile(fileName); foreach(JwCsvRow row in rows) { VmAccount ac = new VmAccount(row.Fields); v.Add(ac); } }
//# __________ PROTOCOL :: PRIVATE (ACCOUNT CONFIGURATIONS) __________ #// public void InitializeAccounts() { _accounts = new JwList<VmAccount>(); String accountConfigDirectory = VmConstant.RESOURCE_DIRECTORY + "/account"; String[] fileNames = Directory.GetFiles(accountConfigDirectory, "*.config"); foreach( String fileName in fileNames) { AddAccounts(_accounts, fileName); } }
public static JwList<JwValidationError> ValidateSerialNumber(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Nest", "Serial Number", value); o.Errors = v; o.MaximumLength = MAXIMUM_SERIAL_NUMBER_LENGTH;; o.Validate(); return v; }
//# __________ PROTOCOL :: PUBLIC __________ #// public static JwList<JwValidationError> ValidateNote(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Nest", "Note", value); o.Errors = v; o.MaximumLength = MAXIMUM_NOTE_LENGTH; o.Validate(); return v; }
//# __________ PROTOCOL :: PUBLIC __________ #// public String Format(JwList<JwValidationError> errors, String newLineString) { StringBuilder sb = new StringBuilder(); foreach( JwValidationError error in errors ) { sb.Append( Format(error) ); sb.Append(newLineString); } return sb.ToString(); }
public static JwList<JwValidationError> ValidateNote(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Cart", "Note", value); o.Errors = v; o.MaximumLength = 50; o.Validate(); return v; }
public JwList<VmNest> GetAllNests() { JwList<VmNest> v = VmNestManager.Default.GetAllNests(); JwList<VmNest> nests = new JwList<VmNest>(); foreach( VmNest nest in v ) { nests.Add( VmNestManager.Default.GetNest(nest.Id)); } return nests; }
public static JwList<JwValidationError> ValidateUldSerialNumber(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Uld", "Number", value); o.Errors = v; o.MaximumLength = 7; o.Validate(); return v; }
//# __________ PROTOCOL :: PUBLIC __________ #// public static JwList<JwValidationError> ValidateName(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Nest", "Name", value); o.Errors = v; o.MaximumLength = NAME_LENGTH; o.RequiredFlag = true; o.Validate(); return v; }
//# __________ PROTOCOL :: PUBLIC __________ #// public static JwList<JwValidationError> ValidateIdentifier(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Container", "Identifer", value); o.Errors = v; o.MaximumLength = SERIAL_NUMBER_LENGTH; // o.TextFlag = true; o.RequiredFlag = true; o.Validate(); return v; }
public JwList<VmItemManifest> GetAllItems() { JwList<VmItemManifest> v = new JwList<VmItemManifest>(); int nestId = Engine.Nest.Id; JwList<VmNestedItem> nestedItems = VmAirportData.Default.AirportOutputData.GetNestedItemFile(nestId).GetAll(); foreach( VmNestedItem nestedItem in nestedItems) { VmItemManifest item = VmItemManager.Default.GetItem(nestedItem.ItemId); v.Add(item); } return v; }
//# __________ PROTOCOL :: CONST __________ #// //# __________ PROTOCOL :: PUBLIC __________ #// public static JwList<JwValidationError> ValidateType(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("ULD", "Type", value); o.Errors = v; o.FixedLength = 3; o.AlphaNumericFlag = true; o.RequiredFlag = true; o.Validate(); return v; }
public static JwList<JwValidationError> ValidateDestination(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Flight", "Destination Airport Code", value); o.Errors = v; o.FixedLength = 3; o.LetterFlag = true; o.RequiredFlag = true; o.Validate(); return v; }
public JwList<VmNest> GetAllNests() { JwList<VmNest> nests = new JwList<VmNest>(); JwList<VmNestManifest> v = VmAirportData.Default.AirportOutputData.NestManifestFile.GetAll(); foreach( VmNestManifest nestManifest in v ) { VmNest nest = GetNest(nestManifest.NestId); if( nest == null) continue; nests.Add(nest); } return nests; }
//# __________ PROTOCOL :: PUBLIC __________ #// public static JwList<JwValidationError> ValidateSerialNumber(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Cart", "Number", value); o.Errors = v; o.MaximumLength = SERIAL_NUMBER_LENGTH; o.RequiredFlag = true; o.Validate(); return v; }
//# __________ PROTOCOL :: PUBLIC __________ #// public static JwList<JwValidationError> ValidateUserName(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("User", "User Name", value); o.Errors = v; o.MaximumLength = USER_NAME_MAXIMUM_LENGTH; o.CodeFlag = true; o.RequiredFlag = true; o.Validate(); return v; }
//# __________ PROTOCOL :: PUBLIC __________ #// public static JwList<JwValidationError> ValidateCarrierCode(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Carrier", "Code", value); o.Errors = v; o.MaximumLength = CARRIER_CODE_LENGTH; o.MinimumLength = CARRIER_CODE_LENGTH; o.CodeFlag = true; o.RequiredFlag = true; o.Validate(); return v; }
public static JwList<JwValidationError> ValidateSerialNumber(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("ULD", "Serial Number", value); o.Errors = v; o.MinimumLength = VmProperties.Default.GetNestUldSerialNumberMinimumLength(); o.MaximumLength = VmProperties.Default.GetNestUldSerialNumberMaximumLength(); o.DigitFlag = true; o.RequiredFlag = true; o.Validate(); return v; }
public static JwList<JwValidationError> ValidateFlightNumber(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwStringValidator o = new JwStringValidator("Flight", "Number", value); o.Errors = v; o.MinimumLength = 1; o.MaximumLength = 5; o.CodeFlag = true; o.RequiredFlag = true; o.Validate(); return v; }
//# __________ PROTOCOL :: PUBLIC __________ #// public static JwList<JwValidationError> ValidateWeight(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); JwDoubleValidator o = new JwDoubleValidator("Item", "Weight", value); o.Errors = v; o.RequiredFlag = true; o.MinimumValue = 0; o.MaximumValue = 9999999; o.PositiveFlag = true; o.Validate(); return v; }
//# __________ PROTOCOL :: CONSTRUCTOR __________ #// public static JwList<VmScheduledFlight> Read() { JwList<VmScheduledFlight> v = new JwList<VmScheduledFlight>(); String pathName = JwUtility.JoinPath( VmAirportData.Default.GetInputPath(), "scheduledFlight.txt"); JwList<JwCsvRow> rows = JwUtility.ReadCsvFile(pathName); foreach( JwCsvRow row in rows) { VmScheduledFlight sf = Convert(row.Fields); v.Add(sf); } return v; }
public void AddNest(VmNest nest, String airportCode) { JwList<VmNest> v = null; if( ! _nests.ContainsKey(airportCode) ) { v = new JwList<VmNest>(); _nests[airportCode] = v; } else { v = _nests[airportCode]; } v.Add(nest); }
public static VmScheduledFlight Convert(JwList<String> tokens) { int index = 0; VmScheduledFlight sf = new VmScheduledFlight(); sf.Id = JwUtility.ParseInteger(tokens[index++]); sf.EffectiveDateInterval.Start = JwDateParser.ParseDate(tokens[index++]); sf.EffectiveDateInterval.End = JwDateParser.ParseDate(tokens[index++]); sf.CarrierCode = tokens[index++]; sf.FlightNumber = tokens[index++]; sf.OriginAirportCode = tokens[index++]; sf.DepartureTime = JwTimeParser.ParseTime(tokens[index++]); sf.DestinationAirportCode = tokens[index++]; sf.ArrivalTime = JwTimeParser.ParseTime(tokens[index++]); sf.Frequency = new VmFrequency(tokens[index++]); return sf; }
public JwList<VmScheduledUpload> GetChunkedScheduledUploads() { JwList<VmScheduledUpload> uploads = new JwList<VmScheduledUpload>(); JwList<JwCsvRow> rows = JwUtility.ReadCsvFile(GetChunkedSessionManifestFileName()); foreach( JwCsvRow row in rows) { VmScheduledUpload upload = new VmScheduledUpload(); upload.Name = row.Fields[0]; upload.FileType = row.Fields[1]; upload.SizeInBytes = JwUtility.ParseInteger(row.Fields[2]); upload.AirportCode = row.Fields[3]; uploads.Add(upload); } return uploads; }
public static JwList<JwValidationError> ValidateOwner(Object e) { String value = (String)e; JwList<JwValidationError> v = new JwList<JwValidationError>(); if( value != null && VmProperties.Default.GetNestUldOwnerNonStandardEnabledFlag() ) { value = value.ToUpper(); if( VmProperties.Default.GetUldDefaultOwners().Contains(value) ) return v; } JwStringValidator o = new JwStringValidator("ULD", "Owner", value); o.Errors = v; o.FixedLength = 2; o.AlphaNumericFlag = true; o.RequiredFlag = true; o.Validate(); return v; }
public void PopulateComboBoxes() { if( ! ShouldCollectDestinationAirportCode() ) return; JwSet<String> airportCodes = new JwSet<String>(); _airports = airportCodes; airportCodes.AddRange( VmAccountData.Default.GetAirportCodes() ); if( Engine.Cart != null && ! JwUtility.IsEmpty( Engine.Cart.DestinationAirportCode ) ) airportCodes.Add(Engine.Cart.DestinationAirportCode); if( Engine.HasLocationCode() && VmProperties.Default.ShouldNestCartDefaultTagDestination() ) airportCodes.Add(Engine.LocationCode); if( ! VmProperties.Default.IsCartDestinationAirportRequired() ) airportCodes.Add(""); if( ShouldCollectFlightNumber() ) { _scheduledFlights = VmAirportData.Default.GetScheduledFlights(); _flightNumberCB.ClearValues(); } _destinationAirportCodeCB.SetValues(airportCodes.GetSortedList()); if( airportCodes.Count == 1 ) _destinationAirportCodeCB.SelectedItem = airportCodes.GetAny(); if( Engine.HasLocationCode() && VmProperties.Default.ShouldNestCartDefaultTagDestination() ) _destinationAirportCodeCB.SelectedItem = Engine.LocationCode; }
public void AddAccountUpload( JwList<VmScheduledUpload> v, String path, String fileTypeCode) { AddUpload(v, null, path, fileTypeCode); }
//# __________ PROTOCOL :: PRIVATE (UTILITY) __________ #// public void WriteSessionManifest(VmUploadDirectoryManager manager, JwList<VmScheduledUpload> uploads) { String sessionManifest = ConvertToSessionUploadManifest(uploads); manager.WriteSessionManifest(sessionManifest); if( VmProperties.Default.ShouldTransmitChunked() ) { String s = ConvertToChunkedSessionUploadManifest(uploads); manager.WriteChunkedSessionManifest(s); } }