Ejemplo n.º 1
0
        private void searchButton2_Click(object sender, RoutedEventArgs e)
        {
            if (searchTextBox2.Text.Length == 0)
            {
                return;
            }

            Good goods = busGoods.GetGoodsByGoodsCode(searchTextBox2.Text);

            if (goods.GoodsCode == searchTextBox2.Text)
            {
                var GoodsInformationWindowScreen = new GoodsInformationWindow(goods);

                if (GoodsInformationWindowScreen.ShowDialog() == true)
                {
                    return;
                }
                else
                {
                    return;
                }
            }

            //MessageBox.Show("Không tìm thấy...Vui lòng nhập lại Code!");
            var AnnouncementWindowScreen = new AnnouncementWindow("DON'T FIND THIS CODE...PLEASE TYPE AGAIN!");

            if (AnnouncementWindowScreen.ShowDialog() == true)
            {
                return;
            }
            else
            {
                return;
            }
        }
Ejemplo n.º 2
0
        private void goodsListView1_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var selectedGoods = goodsListView1.SelectedIndex;
            //List<Good> goods = busGoods.GetAllGoods();
            List <Good> goods = goodsListView1.ItemsSource as List <Good>;

            var GoodsInformationWindowScreen = new GoodsInformationWindow(goods[selectedGoods]);

            if (GoodsInformationWindowScreen.ShowDialog() == true)
            {
                return;
            }
            else
            {
                return;
            }
        }