Example #1
0
        private void _load()
        {
            db           = new BB_LINQDataContext(DB.connectionString);
            _rammeaftale = db.RammeAftales.OrderBy(x => x.AftaleID).Skip(_rammeaftalenr - 1).Take(1).ToArray()[0];
            _kunde       = db.Kundes.Where(x => x.KundeID == _rammeaftale.KundeID).First();
            _rabat       = db.Rabats.Where(x => x.RabatID == _rammeaftale.RabatID).First();
            _postby      = db.PostBies.Where(x => x.Postnr == _kunde.Postnummer).First();
            _notater     = db.Notats.Where(x => x.AftaleID == _rammeaftale.AftaleID).ToList();

            _refresh();
        }
 partial void DeleteRammeAftale(RammeAftale instance);
 partial void UpdateRammeAftale(RammeAftale instance);
 private void detach_RammeAftales(RammeAftale entity)
 {
     this.SendPropertyChanging();
     entity.Kunde = null;
 }
 partial void InsertRammeAftale(RammeAftale instance);
 private void attach_RammeAftales(RammeAftale entity)
 {
     this.SendPropertyChanging();
     entity.Rabat = this;
 }