private void cmdDown_Click(object sender, RoutedEventArgs e)
        {
            lblSepetInfo.Visibility = Visibility.Hidden;
            Button btn  = e.OriginalSource as Button;
            var    data = btn.DataContext as SepetModel;

            api.DeleteSepetItem(data.Id);
            listsepet.ItemsSource = set.GetAllSepet();
        }
Beispiel #2
0
        private void SepeteEkleButton_Clicked(object sender, EventArgs e)
        {
            var mydetails = btnId.DataContext as ProductModel;

            Sepet sepet = new Sepet()
            {
                Images    = mydetails.ProductImages,
                Name      = mydetails.ProductName,
                Price     = mydetails.ProductPrice,
                new_Price = mydetails.ProductNewPrice,
                Count     = 2,
            };
            //restAPI.PostSepet(sepet);


            SetSepet setSepet = new SetSepet();
            var      deneme   = setSepet.GetAllItems();

            foreach (var item in deneme)
            {
                if (item.ProductName == mydetails.ProductName && item.ProductPrice == mydetails.ProductPrice)
                {
                    restAPI.DeleteSepetItem(item.Id);
                }
            }
            restAPI.PostSepet(sepet);
            //listsepet.ItemsSource = setSepet.GetAllItems();
        }
Beispiel #3
0
        private void cmdDown_Click(object sender, RoutedEventArgs e)
        {
            NumValue--;
            Button btn  = e.OriginalSource as Button;
            var    data = btn.DataContext as SepetModel;

            api.DeleteSepetItem(data.Id);
            listdata.ItemsSource = setsepet.GetAllItems();
        }