Пример #1
0
        private void UIStock_LostFocus(object sender, RoutedEventArgs e)
        {
            ProductUI productUI = ((sender as TextBox).DataContext as ProductUI);

            if (productUI != null)
            {
                productPageViewModel.UpdateProduct(productUI.Product);
            }
        }
Пример #2
0
        private void SetCatPrice_Click(object sender, RoutedEventArgs e)
        {
            ProductUI productUI = ((sender as CategoryPriceControl).Parent as Grid).DataContext as ProductUI;

            if (productUI != null)
            {
                productPageViewModel.SetCategoriesPrice(productUI.Product);
            }
        }
Пример #3
0
        private void DeleteProduct_Click(object sender, RoutedEventArgs e)
        {
            ProductUI productUI = ((sender as Button).DataContext as ProductUI);

            if (productUI != null)
            {
                productPageViewModel.DeleteProduct(productUI.Product.Code);
            }
        }
Пример #4
0
        private void SetPicture_Click(object sender, RoutedEventArgs e)
        {
            ProductUI productUI = (sender as Button).DataContext as ProductUI;

            if (productUI != null)
            {
                productPageViewModel.SetPictureProduct(productUI.Product);
            }
        }