コード例 #1
0
 public VEISVASTRefreshFacility(VASTStation stationFromVAST)
 {
     this.StationID         = stationFromVAST.StationID.Trim();
     this.VisnID            = stationFromVAST.VisnID.Trim();
     this.StationNumber     = stationFromVAST.StationNumber.Trim();
     this.StationName       = stationFromVAST.StationName.Trim();
     this.CommonStationName = stationFromVAST.CommonStationName.Trim();
     this.CoCClassification = stationFromVAST.CocClassification.Trim();
     this.CRMDisplayname    = string.Concat(stationFromVAST.StationNumber.Trim(), " - ", stationFromVAST.CommonStationName.Trim());
 }
コード例 #2
0
        public VEISVASTRefreshSubFacility(VASTStation stationFromVAST, Dictionary <VASTStation, Entity> parentFacilityDictionary)
        {
            this.StationID              = stationFromVAST.StationID.Trim();
            this.VisnID                 = stationFromVAST.VisnID.Trim();
            this.StationNumber          = stationFromVAST.StationNumber.Trim();
            this.StationName            = stationFromVAST.StationName.Trim();
            this.CommonStationName      = stationFromVAST.CommonStationName.Trim();
            this.CoCClassification      = stationFromVAST.CocClassification.Trim();
            this.CRMDisplayname         = string.Concat(stationFromVAST.StationNumber.Trim(), " - ", stationFromVAST.CommonStationName.Trim());
            this.CRMFacilityDefaultFlag = stationFromVAST.IsATopLevelStation;
            KeyValuePair <VASTStation, Entity> keyValuePair = parentFacilityDictionary.FirstOrDefault <KeyValuePair <VASTStation, Entity> >((KeyValuePair <VASTStation, Entity> entry) => (stationFromVAST.IsATopLevelStation ? entry.Key.StationID == stationFromVAST.StationID : entry.Key.StationID == stationFromVAST.ParentStation.StationID));

            this.ParentFacilityRecord = keyValuePair.Value;
        }
コード例 #3
0
        public VASTStation DetermineParentStationFromList(VASTStation[] stations)
        {
            VASTStation vASTStation = null;

            if (!(this.IsATopLevelStation || this.StationNumber == null ? false : this.StationID != null))
            {
                vASTStation = null;
            }
            else if (this.ParentFacilityMappingMethodCode == ParentFacilityMappingMethod.CompareFirstThreeDigitsOfStationNumber)
            {
                vASTStation = ((IEnumerable <VASTStation>)stations).FirstOrDefault <VASTStation>((VASTStation s) => (s.StationNumber == null || s.StationNumber.Length != 3 ? false : s.StationNumber == this.StationNumber.Substring(0, 3)));
            }
            else if ((this.ParentFacilityMappingMethodCode != ParentFacilityMappingMethod.UseParentStationIDFieldFromVAST ? true : this.ParentStationID == null))
            {
                vASTStation = null;
            }
            else
            {
                vASTStation = ((IEnumerable <VASTStation>)stations).FirstOrDefault <VASTStation>((VASTStation s) => s.StationNumber == this.ParentStationID);
            }
            return(vASTStation);
        }