private void Check(RelacjeHandlowe lrn, PozycjeDokHan lpd) { if (!lrn.IsEmpty && !lpd.IsEmpty) { foreach (PozycjaDokHandlowego handlowego in lpd) { var relations = this.GetRelations(handlowego); if (relations.IsEmpty) { this._restore.Enqueue(handlowego); } else { foreach (PozycjaRelacjiHandlowej handlowej in relations) { if ((handlowej.Relacja.Typ == TypRelacjiHandlowej.Kopiowania) && (handlowego.Towar != handlowej.Nadrzedna.Towar)) { this._remove.Enqueue(handlowej); } } this._restore.Enqueue(handlowego); } } } }
public HandelModule(Session session) : base(session, "Handel") { this.defDokHandlowychTable = new DefDokHandlowych(); this.relacjeHandloweTable = new RelacjeHandlowe(); this.defRelHandlowychTable = new DefRelHandlowych(); this.pozRelacjiHandlowejTable = new PozRelHandlowej(); this.pozycjeDokHanTable = new PozycjeDokHan(); this.dokHandloweTable = new DokHandlowe(); this.AddTable(this.defDokHandlowychTable); this.AddTable(this.relacjeHandloweTable); this.AddTable(this.defRelHandlowychTable); this.AddTable(this.pozRelacjiHandlowejTable); this.AddTable(this.pozycjeDokHanTable); this.AddTable(this.dokHandloweTable); }