Jumat, 05 April 2013

Delphi 7 - Form Biaya Rumah Sakit

Posted by PYSSA 4D On 02.40 | No comments


Form Biaya Rumah Sakit Bakti Insan
Dangan Delphi 7








procedure TForm12.kodedClick(Sender: TObject);
begin
if koded.Text = 'DRD01' then
begin
namad.Text := 'dr Okta';
spesialis.Text := 'Penyakit Dalam';
biaya.Text := '200000';
end

else if koded.Text = 'DRJ02' then
begin
namad.Text := 'dr Yondra';
spesialis.Text := 'Gangguan Jiwa';
biaya.Text := '150000';
end

else if koded.Text = 'DRM03' then
begin
namad.Text := 'dr Wulan';
spesialis.Text := 'Mata';
biaya.Text := '100000';
end

else
begin
namad.Text := '-';
spesialis.Text := '-';
biaya.Text := '0';
end

end;


procedure TForm12.kodeoKeyPress(Sender: TObject; var Key: Char);
begin
if kodeo.Text = 'B001' then
begin
namao.Text := 'Paracetamol';
hargao.Text := '10000';
end

else if kodeo.Text = 'B002' then
begin
namao.Text := 'Paratusin';
hargao.Text := '12000';
end

else if kodeo.Text = 'B003' then
begin
namao.Text := 'Amoxilin';
hargao.Text := '15000';
end

else
begin
namao.Text := '-';
hargao.Text := '0';
end
end;


procedure TForm12.totalClick(Sender: TObject);
var by,hrg,tot : longint;

begin
by := strtoint(biaya.Text);
hrg := strtoint (hargao.Text);
tot := by + hrg;
totalb.Text := inttostr(tot);
bayar.SetFocus;
end;

procedure TForm12.bayarKeyPress(Sender: TObject; var Key: Char);
var tot,bay,kem : longint;
begin
if key = #13 then
begin
tot := strtoint(totalb.Text);
bay := strtoint(bayar.Text);
kem := bay - tot;

if (bay < tot) then
begin
showmessage('Maaf Uang Anda Kurang Rp.' + inttostr(tot -  bay));
bayar.Text := '';
bayar.setfocus;
end

else
kembali.Text := inttostr(kem);
end

end;

procedure TForm12.bersihClick(Sender: TObject);
begin
koded.Text := 'Pilih';
namad.Text := '';
spesialis.Text := '';
biaya.Text := '';
kodeo.Text := '';
namao.Text := '';
hargao.Text := '';
totalb.Text := '';
bayar.Text := '';
kembali.Text := '';
end;

procedure TForm12.keluarClick(Sender: TObject);
begin
if (application.MessageBox('Yakin Anda Mau Keluar ?','Konfirmasi',MB_YESNO)=ID_YES) then
close;
end;

end.

Sumber : Masiv Az-Zikra

0 komentar:

Posting Komentar

View All

Country View

Flag Counter