Pengikut

Senin, 19 Maret 2012

Program Struk Pembelian



procedure TForm1.Button1Click(Sender: TObject);
begin
if ((Edit1.Text='andi') and (Edit2.Text='bisa'))then
begin
ShowMessage('Lanjutkan');
Form1.Hide;
Form2.Show;
end
else
ShowMessage('coba lagi');
end;
                                                                                    end.
















procedure TForm2.Button1Click(Sender: TObject);
var jmlhbrg,hrgbrg,bayar,CB:real;
begin
jmlhbrg:=StrToFloat(Edit1.Text);
hrgbrg:=StrToFloat(Edit2.Text);

case RadioGroup1.ItemIndex of
0:
  if RadioGroup1.ItemIndex=0 then
  begin
  bayar:=(jmlhbrg*hrgbrg*0.8);
  end;
1:
  if RadioGroup1.ItemIndex=1 then
  begin
  bayar:=(jmlhbrg*hrgbrg*0.75);
  end;
2:
  if RadioGroup1.ItemIndex=2 then
  begin
  bayar:=(jmlhbrg*hrgbrg*0.7);
  end;
  end;

  Edit3.Text:=FloatToStr(bayar);
  if bayar>250000 then CB:=bayar-2000  else
  CB:=bayar-0;

  Edit4.Text:=FloatToStr(CB);

  end;

Tidak ada komentar:

Posting Komentar

Monggo dikoment.. :)