Exemple #1
0
        private void SaveAngebot()
        {
            if (IsEditingProcess == true)
            {
                SelectedAngebot.Code       = Code;
                SelectedAngebot.StartDatum = StartDatum;
                SelectedAngebot.EndDatum   = EndDatum;
                SelectedAngebot.Prozent    = Prozent;
                dh.UpdateSpecialOffer(SelectedAngebot);
            }
            else
            {
                dh.AddNewSpecialOffer(new SharedAngebot()
                {
                    Code       = this.Code,
                    StartDatum = this.StartDatum,
                    EndDatum   = this.EndDatum,
                    Prozent    = this.Prozent
                });
            }

            Code       = "";
            Prozent    = 0;
            StartDatum = DateTime.Today;
            EndDatum   = DateTime.Today;
            //SelectedProdukt = null;

            ReloadListFromDatabase();

            IsEditingProcess = false;
        }