private void Button_Click_1(object sender, RoutedEventArgs e) { ControladorTratamiento ca = new ControladorTratamiento(); Tratamiento a = new Tratamiento(); a.IdTratamiento = Int32.Parse(txtId.Text); ca.DeleteSQL(a); Show(); }
private void Button_Click(object sender, RoutedEventArgs e) { ControladorTratamiento ca = new ControladorTratamiento(); Tratamiento a = new Tratamiento(); a.Nombre = txtNombre.Text; a.Tipo = cmbTipo.Text; a.Precio = Double.Parse(txtPrecio.Text); ca.InsertSQL(a); Show(); }
public void Show() { ControladorTratamiento ac = new ControladorTratamiento(); dtgLista.ItemsSource = ac.ShowAllTratamientos(); }