コード例 #1
0
        //CHỌN CHỨC NĂNG TRANG CHỦ
        private void ChonChucNang_TrangChu(object sender, EventArgs e)
        {
            TrangChuUPresentation wpf = (TrangChuUPresentation)sender;
            int _ChucNang             = wpf._ChucNang;

            switch (_ChucNang)
            {
            case 1:
                BanHangUPresentation _bh = new BanHangUPresentation();
                _bh._NhanVien = _NhanVien;
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(_bh);

                lbTitle.Content = "LẬP HÓA ĐƠN BÁN HÀNG";
                break;

            case 2:
                NhapHangTraUPresentation _nht = new NhapHangTraUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(_nht);

                lbTitle.Content = "NHẬP HÀNG TRẢ";
                break;

            case 3:
                NhapMuaUPresentation _nm = new NhapMuaUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(_nm);

                lbTitle.Content = "NHẬP MUA";
                break;

            case 4:
                TaoMaVachUPresentation _tmv = new TaoMaVachUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(_tmv);

                lbTitle.Content = "TẠO MÃ VẠCH SẢN PHẨM";
                break;

            case 5:
                KhachHangUPresentation _kh = new KhachHangUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(_kh);

                lbTitle.Content = "QUẢN LÝ KHÁCH HÀNG";
                break;

            case 6:
                SanPhamUPresentation _sp = new SanPhamUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(_sp);

                lbTitle.Content = "QUẢN LÝ SẢN PHẨM";
                break;
            }
            lbTitle.Visibility = System.Windows.Visibility.Visible;
            btnBack.Visibility = System.Windows.Visibility.Visible;
            _menu = 1;
        }
コード例 #2
0
        //Phương thức chọn chức năng - KHO
        private void ChonChucNang_KHO(object sender, EventArgs e)
        {
            KhoUPresentation wpf_KHO = (KhoUPresentation)sender;
            int _ChucNang            = wpf_KHO._ChucNang;

            switch (_ChucNang)
            {
            case 1:    //Nhập mua
                NhapMuaUPresentation wpf_nhapmua = new NhapMuaUPresentation();
                wpf_nhapmua._nhanVien = _NhanVien;
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_nhapmua);

                lbTitle.Content = "NHẬP MUA";
                break;

            case 2:
                KiemKeUPresentation wpf_KiemKe = new KiemKeUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_KiemKe);

                lbTitle.Content = "KIỂM KÊ SẢN PHẨM";
                break;

            case 3:
                NhapHangTraUPresentation wpf_NhapHangTra = new NhapHangTraUPresentation();
                wpf_NhapHangTra._NhanVien = _NhanVien;
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(wpf_NhapHangTra);

                lbTitle.Content = "NHẬP HÀNG TRẢ LẠI";
                break;

            default:
                break;
            }

            lbTitle.Visibility = System.Windows.Visibility.Visible;
            btnBack.Visibility = System.Windows.Visibility.Visible;
        }