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

            subcat.TipoAccion = 0;
            subcat.ShowDialog();
            MostrarCategorias();
        }
예제 #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());
     }
 }
예제 #3
0
        private void BtnMantenimiento_Click(object sender, RoutedEventArgs e)
        {
            SubCategoria subcategoria1 = new SubCategoria();

            subcategoria1.ShowDialog();
        }