private void btnNuevoArticulo_Click(object sender, RoutedEventArgs e)
        {
            ArticuloWindow articuloWin = new ArticuloWindow(ArticuloWindow.Opcion.nuevo, null, ref _ventanasArticulos);

            articuloWin.Owner = this;
            _ventanasArticulos.Add(articuloWin);
            articuloWin.Show();
        }
        private void btnAbrirArticulo_Click(object sender, RoutedEventArgs e)
        {
            if (articuloSeleccionado != null)
            {
                ArticuloWindow articuloWin = new ArticuloWindow(ArticuloWindow.Opcion.consultar, articuloSeleccionado, ref _ventanasArticulos);

                articuloWin.Owner = this;
                _ventanasArticulos.Add(articuloWin);
                articuloWin.Show();
            }
        }
Exemplo n.º 3
0
        private void btnNuevo_Click(object sender, RoutedEventArgs e)
        {
            ArticuloWindow articuloWin = new ArticuloWindow(ArticuloWindow.Opcion.nuevo, null, ref _ventanasArticulos);

            articuloWin.Owner = this;
            _ventanasArticulos.Add(articuloWin);
            articuloWin.ShowDialog();

            if (articuloWin.b_ok)
            {
                articuloSeleccionado = articuloWin.articulo;
                b_ok        = true;
                es_agregado = true;
                this.Close();
                this.Owner.Focus();
            }
        }