Coding/Listing :
public
{ Public declarations }
procedure aktif;
procedure nonaktif;
procedure bersih;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.aktif;
begin
lbtanggal.Enabled:= true;
lbjam.Enabled:= true;
ckode.Enabled:= true;
ljenis.Enabled:= true;
eharga.Enabled:= true;
ejumbel.Enabled:= true;
esubtotal.Enabled:= true;
eppn.Enabled:= true;
etobay.Enabled:= true;
ebayar.Enabled:= true;
ekembali.Enabled:= true;
end;
procedure TForm1.nonaktif;
begin
lbtanggal.Enabled:= false;
lbjam.Enabled:= false;
ckode.Enabled:= false;
ljenis.Enabled:= false;
eharga.Enabled:= false;
ejumbel.Enabled:= false;
esubtotal.Enabled:= false;
eppn.Enabled:= false;
etobay.Enabled:= false;
ebayar.Enabled:= false;
ekembali.Enabled:= false;
end;
procedure TForm1.bersih;
begin
ckode.Text:='--Silakan Pilih--';
ljenis.Clear;
eharga.Text:= '0';
ejumbel.Text:= '0';
esubtotal.Text:= '0';
eppn.Text:= '0';
etobay.Text:= '0';
ebayar.Text:= '0';
ekembali.Text:= '0';
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
nonaktif;
bersih;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
lbtanggal.Caption:= datetostr(now);
lbjam.Caption:= timetostr(now);
end;
procedure TForm1.binputClick(Sender: TObject);
begin
aktif;
bersih;
end;
procedure TForm1.ckodeClick(Sender: TObject);
begin
if ckode.ItemIndex = 0 then
begin
ljenis.Clear;
ljenis.Items.Add('Flash Disk 4GB');
ljenis.Items.Add('Flash Disk 8GB');
end
else if ckode.ItemIndex = 1 then
begin
ljenis.Clear;
ljenis.Items.Add('Hardisk 200GB');
ljenis.Items.Add('Hardisk 250GB');
end
else
begin
ljenis.Clear;
ljenis.Items.Add('Keyboard Joystick');
ljenis.Items.Add('Keyboard Logitech');
end;
eharga.Text:= '0';
end;
procedure TForm1.ljenisClick(Sender: TObject);
begin
if ckode.ItemIndex = 0 then
begin
if ljenis.ItemIndex = 0 then
eharga.Text:= '80000'
else
eharga.Text:= '125000';
end
else if ckode.ItemIndex = 1 then
begin
if ljenis.ItemIndex = 0 then
eharga.Text:= '300000'
else
eharga.Text:= '400000';
end
else
begin
if ljenis.ItemIndex = 0 then
eharga.Text:= '75000'
else
eharga.Text:= '100000';
end;
ejumbel.SetFocus;
end;
procedure TForm1.bhitungClick(Sender: TObject);
begin
esubtotal.Text:= inttostr(strtoint(eharga.Text)*strtoint(ejumbel.Text));
eppn.Text:= floattostr(0.1*strtofloat(esubtotal.Text));
etobay.Text:= inttostr(strtoint(esubtotal.Text)+strtoint(eppn.Text));
ebayar.SetFocus;
end;
procedure TForm1.ebayarKeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
ekembali.Text:= inttostr(strtoint(ebayar.Text) - strtoint(etobay.Text));
nonaktif;
end;
end;
procedure TForm1.bexitClick(Sender: TObject);
begin
if(application.MessageBox('Yakin Ingin Keluar Dari Program Ini..?!','Question',4+32)=6)then
close
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ckode.Items.Add('001');
ckode.Items.Add('002');
ckode.Items.Add('003');
end;
end.
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :