Example #1
0
        override public async System.Threading.Tasks.Task InsertPositionAsync(BusinessLayer.Position pos, string deviceLanguage,  BusinessLayer.User user)
        {
            // Insert the new position in the DB
            DataAccessLayer.DAL_Anfrage dal_Anfrage = new DataAccessLayer.DAL_Anfrage();
            BusinessLayer.Position temp = await dal_Anfrage.InsertPositionAsync(this, pos, deviceLanguage,  user);

            // Update the Anfrage fields after inserting the position
            if (temp == null)
                return;

            this.ID = temp.KpfID;
            this.Wert = temp.KpfWert;
            this.Nummer = temp.KpfNummer;
            if (this.Positions == null)
                this.Positions = new List<Position>();
            this.Waehrung = pos.Waehrung;
            this.Positions.Add(temp);

        }