Esempio n. 1
0
        private void BtnNuevo_Click(object sender, RoutedEventArgs e)
        {
            SubProveedor form = new SubProveedor();

            form.TipoAccion = 0;
            form.ShowDialog();
            MostrarProveedores();
        }
Esempio n. 2
0
        private void BtnActualizar_Click(object sender, RoutedEventArgs e)
        {
            if (dgProveedor.SelectedItem != null)
            {
                object item = dgProveedor.SelectedItem;
                string id   = (dgProveedor.SelectedCells[6].Column.GetCellContent(item) as TextBlock).Text;

                SubProveedor form = new SubProveedor();
                form.IdProveedor        = id;
                form.CodigoProveedor    = (dgProveedor.SelectedCells[0].Column.GetCellContent(item) as TextBlock).Text;
                form.NombreProveedor    = (dgProveedor.SelectedCells[1].Column.GetCellContent(item) as TextBlock).Text;
                form.DireccionProveedor = (dgProveedor.SelectedCells[2].Column.GetCellContent(item) as TextBlock).Text;
                form.TelefonoProveedor  = (dgProveedor.SelectedCells[3].Column.GetCellContent(item) as TextBlock).Text;
                form.CorreoProveedor    = (dgProveedor.SelectedCells[4].Column.GetCellContent(item) as TextBlock).Text;
                form.TipoAccion         = 1;
                form.ShowDialog();
                MostrarProveedores();
            }
        }