コード例 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            gdContentMain.Children.Clear();
            //NhapHangTraUPresentation wpf = new NhapHangTraUPresentation();
            //wpf._TiepTucMua += new EventHandler(TiepTucMua);

            //LichSuBanHangUPresentation wpf_ls = new LichSuBanHangUPresentation();
            //gdContentMain.Children.Add(wpf_ls);

            //ThongKeTheoHoaDon wpf = new ThongKeTheoHoaDon();
            //ThongKeTheoNhanVienUPresentation wpf = new ThongKeTheoNhanVienUPresentation();
            //ThietLapHeThongUPresentation wpf = new ThietLapHeThongUPresentation();
            //PhanQuyenUPresentation wpf = new PhanQuyenUPresentation();
            //NhanVienUPresentation wpf = new NhanVienUPresentation();
            //NhomKhachHangUPresentation wpf = new NhomKhachHangUPresentation();
            //KhachHangUPresentation wpf = new KhachHangUPresentation();
            //NhomSanPhamUPresentation wpf = new NhomSanPhamUPresentation();
            //TaoMaVachUPresentation wpf = new TaoMaVachUPresentation();
            //SanPhamUPresentation wpf = new SanPhamUPresentation();
            //BanHangUPresentation wpf = new BanHangUPresentation();
            //PhieuNhapKhoUPresentation wpf = new PhieuNhapKhoUPresentation();
            //ThongKeTheoKhachHangUPresentation wpf = new ThongKeTheoKhachHangUPresentation();
            //MaGiamGiaUPresentation wpf = new MaGiamGiaUPresentation();

            //ThietLapHeThongUPresentation wpf = new ThietLapHeThongUPresentation();
            //ThongKeTheoSpUPresentation wpf = new ThongKeTheoSpUPresentation();
            //LichSuBanHangUPresentation wpf = new LichSuBanHangUPresentation();
            //SanPhamUPresentation wpf = new SanPhamUPresentation();
            //DonViTinhUPresentation wpf = new DonViTinhUPresentation();
            NhaCungCapUPresentation wpf = new NhaCungCapUPresentation();

            gdContentMain.Children.Add(wpf);
        }
コード例 #2
0
        //SỰ KIỆN MỞ FOMR CHỨC NĂNG - THIẾT LẬP
        void evMoChucNang(object sender, EventArgs e)
        {
            ThietLapUPresentation frm = (ThietLapUPresentation)sender;
            string ChucNang           = frm.ChucNang;

            switch (ChucNang)
            {
            case "1":    //Sản phẩm
                SanPhamUPresentation sp = new SanPhamUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(sp);

                lbTitle.Content = "QUẢN LÝ SẢN PHẨM";
                break;

            case "2":    //Nhóm sản phẩm
                NhomSanPhamUPresentation nsp = new NhomSanPhamUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(nsp);

                lbTitle.Content = "QUẢN LÝ NHÓM SẢN PHẨM";
                break;

            case "3":    //Đơn vị tính
                DonViTinhUPresentation dvt = new DonViTinhUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(dvt);

                lbTitle.Content = "QUẢN LÝ ĐƠN VỊ TÍNH";
                break;

            case "4":    //Nhà cung cấp
                NhaCungCapUPresentation ncc = new NhaCungCapUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(ncc);

                lbTitle.Content = "QUẢN LÝ NHÀ CUNG CẤP";
                break;

            case "5":    //Nhân viên
                NhanVienUPresentation nv = new NhanVienUPresentation();
                nv._CapNhatHienThi += new EventHandler(CapNhatSuaNV_TL);
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(nv);

                lbTitle.Content = "QUẢN LÝ NHÂN VIÊN";
                break;

            case "6":    //Khách hàng
                KhachHangUPresentation kh = new KhachHangUPresentation();

                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(kh);

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

            case "7":    //Nhóm khách hàng
                NhomKhachHangUPresentation nhk = new NhomKhachHangUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(nhk);

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

            case "8":    //Tạo mã vạch
                TaoMaVachUPresentation tmv = new TaoMaVachUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(tmv);

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

            case "9":
                MaGiamGiaUPresentation mgg = new MaGiamGiaUPresentation();
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(mgg);

                lbTitle.Content = "TẠO MÃ GIẢM GIÁ";
                break;

            case "10":
                PhanQuyenUPresentation pq = new PhanQuyenUPresentation();
                pq._nhanVien = _NhanVien;
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(pq);

                lbTitle.Content = "QUẢN LÝ NHÓM QUYỀN";
                break;

            case "11":
                ThietLapHeThongUPresentation tl = new ThietLapHeThongUPresentation();
                tl._CapNhatHienThi += new EventHandler(CapNhatSuaNV_TL);
                gdContentMain.Children.Clear();
                gdContentMain.Children.Add(tl);

                lbTitle.Content = "THIẾT LẬP HỆ THỐNG";
                break;

            case "12":
                DoiMatKhauPresentation dmk = new DoiMatKhauPresentation();
                dmk._nhanvien = _NhanVien;
                dmk.ShowDialog();
                UpdateThongTin();

                break;

            default:
                break;
            }//end switch
            btnBack.Visibility = System.Windows.Visibility.Visible;
            lbTitle.Visibility = System.Windows.Visibility.Visible;
        }