예제 #1
0
 public ISvt Build(IPsdzSollverbauung sollVerbauung, IDictionary <string, string> orderNumbers)
 {
     if (sollVerbauung != null && sollVerbauung.Svt != null)
     {
         IPsdzSvt            svt                 = sollVerbauung.Svt;
         IPsdzOrderList      psdzOrderList       = sollVerbauung.PsdzOrderList;
         SystemVerbauTabelle systemVerbauTabelle = new SystemVerbauTabelle();
         systemVerbauTabelle.Version         = svt.Version;
         systemVerbauTabelle.HoSignature     = svt.HoSignature;
         systemVerbauTabelle.HoSignatureDate = svt.HoSignatureDate;
         IEnumerable <IPsdzEcu> ecus = svt.Ecus;
         if (ecus != null)
         {
             foreach (IPsdzEcu psdzEcu in ecus)
             {
                 IEcuObj ecuObj = this.Build(psdzEcu);
                 if (orderNumbers != null && orderNumbers.Any <KeyValuePair <string, string> >())
                 {
                     string key = this.BuildKey(psdzEcu);
                     if (orderNumbers.ContainsKey(key))
                     {
                         ((EcuObj)ecuObj).OrderNumber = orderNumbers[key];
                     }
                 }
                 systemVerbauTabelle.AddEcu(ecuObj);
             }
         }
         return(systemVerbauTabelle);
     }
     return(null);
 }
예제 #2
0
        public ISvt Build(IPsdzStandardSvt svtInput)
        {
            if (svtInput == null)
            {
                return(null);
            }
            SystemVerbauTabelle systemVerbauTabelle = new SystemVerbauTabelle();

            systemVerbauTabelle.Version         = svtInput.Version;
            systemVerbauTabelle.HoSignature     = svtInput.HoSignature;
            systemVerbauTabelle.HoSignatureDate = svtInput.HoSignatureDate;
            IEnumerable <IPsdzEcu> ecus = svtInput.Ecus;

            if (ecus != null)
            {
                foreach (IPsdzEcu ecuInput in ecus)
                {
                    IEcuObj ecu = this.Build(ecuInput);
                    if (ecu != null)
                    {
                        systemVerbauTabelle.AddEcu(ecu);
                    }
                }
            }
            return(systemVerbauTabelle);
        }