示例#1
0
        //public PageViewModel ViewModel;
        //static Paging PagedTable = new Paging();
        //MultiUsesProductoWindow window;

        //AddToExistentProductWindow window3;

        ////test user github

        ////Numeros a mostrar de pagina
        //public int NumeroPaginaActual;
        //public int NumeroPaginaMax;

        //public User thisUser;

        public PageProducts()
        {
            InitializeComponent();
            PageProductsViewModel vm = new PageProductsViewModel();

            DataContext = vm;

            if (vm.OpenAddProductAction == null)
            {
                vm.OpenAddProductAction = new Action(() =>
                {
                    AddProductWindow addProductWindow = new AddProductWindow();
                    addProductWindow.Show();
                });
            }

            ////Obtener el viewmodel de la ventana principal y lo incializamos
            //ViewModel = pageViewModel;
            //DataContext = ViewModel;

            //UtilidadPaginacion();

            //thisUser = user_;
        }
        private void Create_Click(object sender, RoutedEventArgs e)
        {
            AddProductWindow addProductWindow = new AddProductWindow();

            addProductWindow.Show();
        }