private void searchButton1_Click(object sender, RoutedEventArgs e) { if (searchTextBox1.Text.Contains("Mã Code") || searchTextBox1.Text.Length == 0) { return; } Good goods = busGoods.GetGoodsByGoodsCode(searchTextBox1.Text); if (goods.GoodsCode == searchTextBox1.Text) { var goodsInformationScreen = new GoodsInformation(goods); if (goodsInformationScreen.ShowDialog() == true) { return; } else { return; } } MessageBox.Show("Không tìm thấy...Vui lòng nhập lại Code!"); }
private void goodsListView1_MouseDoubleClick(object sender, MouseButtonEventArgs e) { var selectedGoods = goodsListView1.SelectedIndex; List <Good> goods = busGoods.GetAllGoods(); var goodsInformationScreen = new GoodsInformation(goods[selectedGoods]); if (goodsInformationScreen.ShowDialog() == true) { return; } }