Ejemplo n.º 1
0
        //Phương thức chọn chức năng kho
        private void ChonChucNang_ThongKeBaoCao(object sender, EventArgs e)
        {
            ThongKeBaoCaoUPresentation wpf = (ThongKeBaoCaoUPresentation)sender;
            int _ChucNang = wpf._ChucNang;

            switch (_ChucNang)
            {
            case 1:    //Chức năng hóa đơn
                ThongKeTheoHoaDon wpf_hoaDon = new ThongKeTheoHoaDon();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_hoaDon);

                lbTitle.Content = "HÓA ĐƠN";
                break;

            case 2:    //Lịch sử bán hàng
                LichSuBanHangUPresentation wpf_lichsubanhang = new LichSuBanHangUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_lichsubanhang);

                lbTitle.Content = "LỊCH SỬ BÁN HÀNG";
                break;

            case 3:    //doanh thu theo sản phẩm
                ThongKeTheoSpUPresentation wpf_thongketheosanpham = new ThongKeTheoSpUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_thongketheosanpham);

                lbTitle.Content = "THỐNG KÊ THEO SẢN PHẨM";
                break;

            case 4:    //thông kê theo nhân viên
                ThongKeTheoNhanVienUPresentation wpf_thongketheonhanvien = new ThongKeTheoNhanVienUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_thongketheonhanvien);

                lbTitle.Content = "THỐNG KÊ THEO NHÂN VIÊN";
                break;

            case 5:
                PhieuNhapKhoUPresentation wpf_phieuNhap = new PhieuNhapKhoUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_phieuNhap);

                lbTitle.Content = "PHIẾU NHẬP";
                break;

            case 6:
                ThongKeTheoKhachHangUPresentation wpf_tkTheoKH = new ThongKeTheoKhachHangUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_tkTheoKH);

                lbTitle.Content = "THỐNG KÊ THEO KHÁCH HÀNG";
                break;
            }
            btnBack.Visibility = System.Windows.Visibility.Visible;
            lbTitle.Visibility = System.Windows.Visibility.Visible;
        }
Ejemplo n.º 2
0
        //Nút Thống kê
        private void btnBaoCao_Click(object sender, RoutedEventArgs e)
        {
            FocusButon(5);
            gdContentMain.Children.Clear();
            ThongKeBaoCaoUPresentation wpf = new ThongKeBaoCaoUPresentation();

            wpf._lstQuyen      = _lstQuyen;
            wpf._ChonChucNang += new EventHandler(ChonChucNang_ThongKeBaoCao);
            gdContentMain.Children.Add(wpf);

            _menu = 3;
            btnBack.Visibility = System.Windows.Visibility.Collapsed;
            lbTitle.Visibility = System.Windows.Visibility.Collapsed;
        }
Ejemplo n.º 3
0
        //Nút back
        private void btnBack_Click(object sender, RoutedEventArgs e)
        {
            switch (_menu)
            {
            case 0:    //Giao diện bắt đầu
                BatDauUPresentation _wpfBatdau = new BatDauUPresentation();
                _wpfBatdau._ChonChucNang += new EventHandler(ChonChucNang_WPFBatDau);
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(_wpfBatdau);
                break;

            case 1:     //Trang chủ
                TrangChuUPresentation wpf_Home = new TrangChuUPresentation();
                wpf_Home._lstQuyen      = _lstQuyen;
                wpf_Home._ChonChucNang += new EventHandler(ChonChucNang_TrangChu);
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_Home);
                break;

            case 2:    //Kho
                KhoUPresentation wpf_kho = new KhoUPresentation();
                wpf_kho._lstQuyen      = _lstQuyen;
                wpf_kho._ChonChucNang += new EventHandler(ChonChucNang_KHO);
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_kho);
                break;

            case 3:    //Báo cáo
                ThongKeBaoCaoUPresentation wpf_baocao = new ThongKeBaoCaoUPresentation();
                wpf_baocao._lstQuyen      = _lstQuyen;
                wpf_baocao._ChonChucNang += new EventHandler(ChonChucNang_ThongKeBaoCao);
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_baocao);
                break;

            case 4:    //Thiết lập
                ThietLapUPresentation wpf_thietlap = new ThietLapUPresentation();
                wpf_thietlap._lstQuyen       = _lstQuyen;
                wpf_thietlap.evChonChucNang += new EventHandler(evMoChucNang);
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_thietlap);
                break;
            }
            lbTitle.Visibility = System.Windows.Visibility.Collapsed;
            btnBack.Visibility = System.Windows.Visibility.Collapsed;
        }