public BouwnummerItem(string Bid, string omsch, string verkoopstatus, string tpe, OpgeslagenOfferteLean oO)
        {
            B_ID             = Bid;
            B_omschrijving   = omsch;
            TypeOmschrijving = tpe;
            Accoord          = false;
            VerkoopStatus    = verkoopstatus;
            oOL = oO;
            if (oOL != null)
            {
                Gebruiker  = oOL.gebruiker;
                Opgeslagen = true;
            }
            else
            {
                Opgeslagen = false;
            }


            /*  ctx.Load(ctx.GetOpgeslagenOfferteByIdQuery(B_ID)).Completed += (sender, args) =>
             *      {
             *          if (ctx.OpgeslagenOffertes.Count > 0)
             *          {
             *              Opgeslagen = true;
             *
             *          }
             *          else
             *          {
             *              Opgeslagen = false;
             *          }
             *      };*/
        }
        private void CompleteSaveOfferte(OpgeslagenOffertes oo, string xml, bool volledig, KeuzeControls.FinalStage FinSta)
        {
            var ctx = Acumulator.Instance().ctx;

            oo.Bouwnummer_NR = Acumulator.Instance().Bouwnr;
            oo.Xml_Value     = xml;
            oo.Gebruiker     = Acumulator.Instance().HuidigGebruiker.GebruikersNaam;
            oo.Volledig      = volledig;
            oo.Gebruiker_ID  = Acumulator.Instance().HuidigGebruiker.ID;
            oo.Prijs         = Acumulator.Instance().InfoBar.totaalprijs.Text;
            ctx.OpgeslagenOffertes.Add(oo);

            Acumulator.Instance().SavedXml = xml;

            var oOL = new OpgeslagenOfferteLean();

            oOL.gebruiker = Acumulator.Instance().HuidigGebruiker.GebruikersNaam;
            oOL.Datum     = (DateTime)oo.timestamp;
            oOL.B_ID      = Acumulator.Instance().Bouwnr;
            oOL.Prijs     = oo.Prijs;
            if (volledig)
            {
                if (Acumulator.Instance().oOL != null)
                {
                    oOL.VersieFull = Acumulator.Instance().oOL.VersieFull + 1;
                }
                else
                {
                    oOL.VersieFull = 1;
                }
                oOL.VersiePartial = 0;
                RemovePartialSaves();
            }
            else
            {
                if (Acumulator.Instance().oOL != null)
                {
                    oOL.VersiePartial = Acumulator.Instance().oOL.VersiePartial + 1;
                    oOL.VersieFull    = Acumulator.Instance().oOL.VersieFull;
                }
                else
                {
                    oOL.VersiePartial = 1;
                    oOL.VersieFull    = 0;
                }
                ctx.SubmitChanges();
            }
            Acumulator.Instance().oOL = oOL;
            FinSta.CurrentStatusBox.SetDataSaved();
            FinSta.CurrentStatusBox.Visibility = System.Windows.Visibility.Visible;
        }