Jumat, 20 Juli 2012

aplikasi menghitung lembar fotocopy dari delphi

mohon kritik dan saranya
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.clear;
Edit4.Clear;
Edit5.clear;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.clear;
Edit4.Clear;
Edit5.Clear;
end;

procedure TForm1.Button1Click(Sender: TObject);
var nilai,x:Real;
begin
if (RadioButton1.Checked=false) and (RadioButton2.Checked=false) then
  begin
  Application.MessageBox('pilih pelanggan atau tidak','::info:::',MB_ICONINFORMATION);
  end
  else if (Edit1.text)=''  then
  begin
  Application.MessageBox('lengkapi datax','info');
  end
  else if RadioButton1.Checked then
  begin
  Edit3.text:=IntToStr(StrToInt(Edit1.text)*StrToInt(Edit2.text));
  x:=0.2;
  nilai:=x*StrToFloat(Edit3.Text);
  Edit4.Text:=FloatToStr(nilai);
  end
else if RadioButton2.Checked then
  begin
  Edit3.Text:=IntToStr(StrToInt(Edit1.Text)*StrToInt(Edit2.text));
  x:=0.05;
  nilai:=x*StrToFloat(Edit3.text);
  Edit4.Text:=FloatToStr(nilai);
  end

end;



procedure TForm1.Button3Click(Sender: TObject);
begin
CLOSE;
end;

procedure TForm1.Button4Click(Sender: TObject);
var kembalian:Real;
begin
kembalian:=StrToInt(Edit4.Text)-StrToInt(Edit5.Text);
Label7.Caption:=FloatToStr(kembalian);
end;

end.


illank bundrank

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 komentar:

Poskan Komentar