private void ButtonListar_Click(object sender, RoutedEventArgs e) { ClassTipoP list = new ClassTipoP(); dataGrid1.ItemsSource = list.MostrarTodo(); buttonActualizar.IsEnabled = true; buttonGuardar.IsEnabled = false; }
public UserControlProductos() { InitializeComponent(); ClassProveedor Logica = new ClassProveedor(); comboProveedor.ItemsSource = Logica.ListarProveedor(); comboProveedor.DisplayMemberPath = "nombreProveedor"; comboProveedor.SelectedValuePath = "proveedorID"; ClassTipoP Lg = new ClassTipoP(); comboTipo.ItemsSource = Lg.MostrarTodo(); comboTipo.DisplayMemberPath = "NombreTP"; comboTipo.SelectedValuePath = "tipopID"; ClassPresentacion Lgc = new ClassPresentacion(); comboPresentacion.ItemsSource = Lgc.MostrarTodo(); comboPresentacion.DisplayMemberPath = "NombrePres"; comboPresentacion.SelectedValuePath = "PresentacionID"; }