7 Einträge, 1 Seite |
$hauptfenster->update;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
my $ref_old = &start_frag_nach($dbh, "1");
...
my $frame_top_menu = $hauptfenster->Frame(
-borderwidth => "2")
->grid(-sticky => "nw");
$frame_top_menu->BrowseEntry(-label => "Verwalten von:",
-variable => \$ref_gruppe->[0],
-choices => \@{$ref_gruppe},
-colorstate => 'white',
-browsecmd=> sub{$ref_old = &start_frag_nach($dbh, "2");$hauptfenster->update;print "$ref_old->{nachname}";})
->grid(
...
sub start_frag_nach{
my ($dbh, $id) = @_;
my ($ref_old );
$ref_old = &frag_nach($dbh, "select * from kontakte where ID = ?", $id, "fetchrow_hashref()",);
return (\%{$ref_old});
}
sub frag_nach{
my ($dbh, $sql, $id, $befehl, $eintrag, $typ_in_wert, $typ, $tabellen_name, $spalten_name, $index_name, ) = @_;
my ($sth, $ref, );
$sth = $dbh->prepare( "$sql" );
$sth->execute ($id);
$ref = $sth->fetchrow_hashref();
$sth->finish ();
if (defined ($eintrag)){
eintrag_hinzu(\%{$ref});
}
if (defined ($typ_in_wert)){
#$ref_adresse = typ_in_wert_wandeln(\%{$ref}, "adresstyp_id", "adresstyp", $dbh, "beschreibung", "id");
}
return (\%{$ref});
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
...
$frame_kontakte_haupt = $hauptfenster->Frame(
-borderwidth => "2")
->grid(-sticky => "nw");
...
$frame_kontakte_haupt->Button(-text => '<<', -command => [\&eintrag_zurueck])->grid(
$name_test = $frame_kontakte_haupt->Label(-text => "Nachname:"),
$frame_kontakte_haupt->Entry(-textvariable=> \$ref_old->{nachname}),
$frame_kontakte_haupt->Label(-text => "Vornamen:"),
$frame_kontakte_haupt->Entry(-textvariable=> \$ref_old->{vorname}),
$frame_kontakte_haupt->Button(-text => '>>', -command => [\&eintrag_vor]),
$frame_kontakte_haupt->Label(-text => "Zimmer / Bett:"),
$frame_kontakte_haupt->BrowseEntry( -variable => \$ref_old->{zimmerbett}, -colorstate => 'white',),
$frame_kontakte_haupt->Label(-image => $potrait, -width => "90", -height => "120"),
-sticky => "w");
my @values = lies_spalten_werte ($dbh, "kontakte", "anrede");
7 Einträge, 1 Seite |