Beispiel #1
0
        override async public void FillAddressenAsync(string deviceLanguage, BusinessLayer.User user)
        {
            // First we get the Rechnungsanschrift
            // if there is noone, the Rechnungsaddresse is the Lieferantenaddresse
            DataAccessLayer.DAL_Lieferant dal_lieferant = new DataAccessLayer.DAL_Lieferant();
            this.RechnungsAnschriften = await dal_lieferant.GetRechnungsAnschriftenAsync(this, deviceLanguage,  user);
            if (RechnungsAnschriften == null)
                return ;
            
            if (UtilityClasses.IsNullOrEmpty(this.RechnungsAnschriften))
            {
                Anschrift temp = new Anschrift();
                temp.Name = this.Name;
                temp.ID = this.ID;
                temp.Land = this.Land;
                temp.LandNummer = this.LandNummer;
                temp.PLZ = this.PLZ;
                temp.Ort = this.Ort;
                this.RechnungsAnschriften.Add(temp);
            }

            // Then we get the Lieferanschrift
            // if there is no one, the Lieferaddresse is the Lieferantenaddresse
            this.LieferAnschriften = await dal_lieferant.GetLieferAnschriftenAsync(this, deviceLanguage,  user);
            if (UtilityClasses.IsNullOrEmpty(this.LieferAnschriften))
            {
                Anschrift temp = new Anschrift();
                temp.Name = this.Name;
                temp.ID = this.ID;
                temp.Land = this.Land;
                temp.LandNummer = this.LandNummer;
                temp.PLZ = this.PLZ;
                temp.Ort = this.Ort;
                this.LieferAnschriften.Add(temp);
            }
        }