Exemple #1
0
        private void lvTonDauKy_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            tonDauKy        tonKy      = lvTonDauKy.SelectedItem as tonDauKy;
            TonDauKySanPham tonSanPham = new TonDauKySanPham(tonKy);

            tonSanPham.Show();
        }
Exemple #2
0
        private void Button_Sua_Click(object sender, RoutedEventArgs e)
        {
            tonDauKy tonKy = lvTonDauKy.SelectedItem as tonDauKy;

            if (tonKy != null)
            {
                SuaKy suaKy = new SuaKy(tonKy);
                suaKy.ShowDialog();
                LayDanhSachTonKy();
            }
            else
            {
                MessageBox.Show("Hãy chọn kỳ cần sửa", "Thông báo");
            }
        }
Exemple #3
0
        private void Button_Xoa_Click(object sender, RoutedEventArgs e)
        {
            tonDauKy tonKy = lvTonDauKy.SelectedItem as tonDauKy;

            if (tonKy != null)
            {
                if (MessageBox.Show("Xóa kỳ có mã " + tonKy.MaKy, "Thông báo", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
                {
                }
                else
                {
                    Database.DELETE.XoaKy(tonKy);
                    LayDanhSachTonKy();
                }
            }
            else
            {
                MessageBox.Show("Hãy chọn kỳ cần xóa", "Thông báo");
            }
        }