Esempio n. 1
0
        private async void SaveImplementation(object obj)
        {
            GoodsGroup goodGroup = new GoodsGroup();

            goodGroup.GoodsGroupId = 0;
            goodGroup.Description  = Characteristics;
            goodGroup.Name         = Name;

            db.GoodsGroup.Add(goodGroup);
            await db.SaveChangesAsync();

            Thiswindow.Close();
        }
Esempio n. 2
0
        private void SaveImplementation(object obj)
        {
            GoodsGroup goodGroup = db.GoodsGroup.SingleOrDefault(g => g.GoodsGroupId == GoodsGroupId);

            if (goodGroup != null)
            {
                goodGroup.Description = Characteristics;
                goodGroup.Name        = Name;
                db.SaveChanges();
            }

            Thiswindow.Close();
        }
Esempio n. 3
0
        private async void SaveImplementation(object obj)
        {
            Producer producer = new Producer();

            producer.ProducerId = 0;

            producer.Name           = Name;
            producer.UserExpierence = UserExpierence;


            db.Producers.Add(producer);
            await db.SaveChangesAsync();

            Thiswindow.Close();
        }
Esempio n. 4
0
        private async void SaveImplementation(object obj)
        {
            Good good = new Good();

            good.GoodsId         = 0;
            good.GoodsGroupId    = SelectedGroupId;
            good.ProducerId      = SelectedProducerId;
            good.Name            = Name;
            good.Characteristics = Characteristics;
            good.SellingPrice    = SellingPrice;

            db.Goods.Add(good);
            await db.SaveChangesAsync();

            Thiswindow.Close();
        }
Esempio n. 5
0
        private void SaveImplementation(object obj)
        {
            Producer producer = db.Producers.SingleOrDefault(g => g.ProducerId == ProducerId);

            if (producer != null)
            {
                producer.ProducerId     = ProducerId;
                producer.Name           = Name;
                producer.UserExpierence = UserExpierence;

                db.SaveChanges();
            }


            Thiswindow.Close();
        }
Esempio n. 6
0
        private void SaveImplementation(object obj)
        {
            Good good = db.Goods.SingleOrDefault(g => g.GoodsId == GoodId);

            if (good != null)
            {
                good.GoodsGroupId    = SelectedGroupId;
                good.ProducerId      = SelectedProducerId;
                good.Name            = Name;
                good.Characteristics = Characteristics;
                good.SellingPrice    = SellingPrice;
                db.SaveChanges();
            }



            Thiswindow.Close();
        }