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: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49:
| procedure TFBuecherei.b_buchremClick(Sender: TObject); var bid, i, x : integer; titel, autor, verlag, inhalt, isbn, regkey :string; status : boolean; preis : real; Buch : CBuch; begin bi := 1; bid := strtoint(InputBox('Buch Löschen!' , 'Geben sie die Buch ID ein!' , '1')); buch := cbuch.create; plist.deletebook(bid);
for i := 0 to plist.getelements()-1 do begin with SGBuch do begin Cells[0,bi] := ''; Cells[1,bi] := ''; Cells[2,bi] := ''; Cells[3,bi] := ''; Cells[4,bi] := ''; Cells[5,bi] := ''; Cells[6,bi] := ''; Cells[7,bi] := ''; Cells[8,bi] := ''; inc(bi); end; end;
bi := 1;
for i := 0 to plist.getelements()-1 do begin buch := plist.getbook(i); with SGBuch do begin Cells[0,bi] := inttostr(bi); Cells[1,bi] := buch.proptitel; Cells[2,bi] := buch.propautor; Cells[3,bi] := buch.propverlag; Cells[4,bi] := buch.propinhalt; Cells[5,bi] := buch.propisbn; Cells[6,bi] := buch.propregkey; Cells[7,bi] := booltostr(buch.Propstatus); Cells[8,bi] := floattostr(buch.proppreis); inc(bi) end; end; end; |