private void buttonNMarca_Click(object sender, RoutedEventArgs e)
        {
            AddMarca          view      = new AddMarca();
            AddMarcaViewModel viewModel = new AddMarcaViewModel(new CatalogMarcaViewModel(), (AddArticuloViewModel)this.DataContext);

            view.DataContext = viewModel;
            view.ShowDialog();
        }
示例#2
0
        private void BtnAddMarca_Click(object sender, EventArgs e)
        {
            AddMarca addMarca = new AddMarca();

            addMarca.ShowDialog();

            if (!string.IsNullOrEmpty(addMarca.marcasRow?.Nome))
            {
                this.marcasTableAdapter.Insert(
                    addMarca.marcasRow.Nome,
                    true,
                    1,
                    1,
                    DateTime.Now,
                    DateTime.Now
                    );
            }

            this.marcasTableAdapter.Fill(this.querysInnerJoinDataSet.Marcas);
        }