Beispiel #1
0
        private void BtnNuevo_Click(object sender, RoutedEventArgs e)
        {
            SubCategoria subcat = new SubCategoria();

            subcat.TipoAccion = 0;
            subcat.ShowDialog();
            MostrarCategorias();
        }
Beispiel #2
0
 private void BtnActualizar_Click(object sender, RoutedEventArgs e)
 {
     if (dgCategorias.SelectedItem != null)
     {
         object       item   = dgCategorias.SelectedItem;
         string       id     = (dgCategorias.SelectedCells[2].Column.GetCellContent(item) as TextBlock).Text;
         SubCategoria subcat = new SubCategoria();
         subcat.IdCategoria          = id;
         subcat.NombreCategoria      = (dgCategorias.SelectedCells[0].Column.GetCellContent(item) as TextBlock).Text;
         subcat.DescripcionCategoria = (dgCategorias.SelectedCells[1].Column.GetCellContent(item) as TextBlock).Text;
         subcat.TipoAccion           = 1;
         subcat.ShowDialog();
         MostrarCategorias();
         //MessageBox.Show(id.ToString());
     }
 }
Beispiel #3
0
        private void BtnMantenimiento_Click(object sender, RoutedEventArgs e)
        {
            SubCategoria subcategoria1 = new SubCategoria();

            subcategoria1.ShowDialog();
        }