My Team (LOOP Community)

My Team (LOOP Community)

Kamis, 06 Desember 2012

Coding Delphi (Radio Button)




Coding KODE
if ComboBox1.Text='D' then
   Edit1.Text:='Dancow';
if ComboBox1.Text='S' then
   Edit1.Text:='Sustagen';
if ComboBox1.Text='M' then
   Edit1.Text:='Milo';

Coding UKURAN
if RadioButton1.Checked=True then
begin
if ComboBox1.Text='D' then
Edit3.Text:='50000';
end;
if RadioButton1.Checked=True then
begin
if ComboBox1.Text='S' then
Edit3.Text:='51000';
end;
if RadioButton1.Checked=True then
begin
if ComboBox1.Text='M' then
Edit3.Text:='52000';
f RadioButton2.Checked=True then
begin
if ComboBox1.Text='D' then
Edit3.Text:='60000';
end;
if RadioButton2.Checked=True then
begin
if ComboBox1.Text='S' then
Edit3.Text:='61000';
end;
if RadioButton2.Checked=True then
begin
if ComboBox1.Text='M' then
Edit3.Text:='62000';
if RadioButton3.Checked=True then
begin
if ComboBox1.Text='D' then
Edit3.Text:='70000';
end;
if RadioButton3.Checked=True then
begin
if ComboBox1.Text='S' then
Edit3.Text:='71000';
end;
if RadioButton3.Checked=True then
begin
if ComboBox1.Text='M' then
Edit3.Text:='72000';

Coding JUMLAH JUAL
Edit4.Text:=FloatToStr(StrToFloatDef(Edit3.Text,0)*(StrToFloatDef(Edit2.Text,0)));
if (StrToFloatDef(Edit4.Text,0)>=300000) then
begin
Edit5.Text:=FloatToStr(StrToFloatDef(Edit3.Text,0)*0.15);
Edit6.Text:=FloatToStr(StrToFloatDef(Edit4.Text,0)- StrToFloatDef(Edit5.Text,0));
end
else
Edit5.Text:='0';
Edit6.Text:=FloatToStr(StrToFloatDef(Edit4.Text,0)- StrToFloatDef(Edit5.Text,0));

Coding delphi borland7







CODING PENJUALAN SUSU

masukan coding ke kotak sebelah KODE SUSU :
if ComboBox1.Text='D' then
   Edit1.Text:='Dancow';
if ComboBox1.Text='S' then
   Edit1.Text:='Sustagen';
if ComboBox1.Text='M' then
   Edit1.Text:='Milo';
if ComboBox1.Text='D' then
begin
if ComboBox2.Text='Kecil' then
   Edit3.Text:='20000';
if ComboBox2.Text='Sedang' then
   Edit3.Text:='30000';
if ComboBox2.Text='Besar' then
   Edit3.Text:='40000';
end;
if ComboBox1.Text='S' then
begin
if ComboBox2.Text='Kecil' then
   Edit3.Text:='21000';
if ComboBox2.Text='Sedang' then
   Edit3.Text:='31000';
if ComboBox2.Text='Besar' then
   Edit3.Text:='41000';
end;
if ComboBox1.Text='M' then
begin
if ComboBox2.Text='Kecil' then
   Edit3.Text:='22000';
if ComboBox2.Text='Sedang' then
   Edit3.Text:='32000';
if ComboBox2.Text='Besar' then
   Edit3.Text:='42000';
end;

Edit4.Text:=FloatToStr(StrToFloatDef(Edit3.Text,0)*(StrToFloatDef(Edit2.Text,0)));
if (StrToFloatDef(Edit4.Text,0)>=200000) then
begin
Edit5.Text:=FloatToStr(StrToFloatDef(Edit3.Text,0)*0.1);
Edit6.Text:=FloatToStr(StrToFloatDef(Edit4.Text,0)- StrToFloatDef(Edit5.Text,0));
end
else
Edit5.Text:='0';
Edit6.Text:=FloatToStr(StrToFloatDef(Edit4.Text,0)- StrToFloatDef(Edit5.Text,0));


masukan coding ke kotak sebelah JUMLAH JUAL :
Edit4.Text:=FloatToStr(StrToFloatDef(Edit3.Text,0)*(StrToFloatDef(Edit2.Text,0)));
if (StrToFloatDef(Edit4.Text,0)>=200000) then
begin
Edit5.Text:=FloatToStr(StrToFloatDef(Edit3.Text,0)*0.1);
Edit6.Text:=FloatToStr(StrToFloatDef(Edit4.Text,0)- StrToFloatDef(Edit5.Text,0));
end
else
Edit5.Text:='0';
Edit6.Text:=FloatToStr(StrToFloatDef(Edit4.Text,0)- StrToFloatDef(Edit5.Text,0));

masukan coding ke kotak sebelah UKURAN :
if ComboBox1.Text='D' then
begin
if ComboBox2.Text='Kecil' then
   Edit3.Text:='20000';
if ComboBox2.Text='Sedang' then
   Edit3.Text:='30000';
if ComboBox2.Text='Besar' then
   Edit3.Text:='40000';
end;
if ComboBox1.Text='S' then
begin
if ComboBox2.Text='Kecil' then
   Edit3.Text:='21000';
if ComboBox2.Text='Sedang' then
   Edit3.Text:='31000';
if ComboBox2.Text='Besar' then
   Edit3.Text:='41000';
end;
if ComboBox1.Text='M' then
begin
if ComboBox2.Text='Kecil' then
   Edit3.Text:='22000';
if ComboBox2.Text='Sedang' then
   Edit3.Text:='32000';
if ComboBox2.Text='Besar' then
   Edit3.Text:='42000';
end;