Академический Документы
Профессиональный Документы
Культура Документы
implementation
{$R *.dfm}
UNTUK SAVE
begin
//rumus laba
beli:=StrToInt(edit4.Text);
jual:=StrToInt(edit5.Text);
qty:=StrToInt(edit3.Text);
laba:=(jual-beli)*qty;
LANJUTAN SAVE
if RadioButton1.Checked=true then
begin
sql.Clear;
sql.Text:=
'insert into barang (kode,namabrg,qty,satuan,kualitas,hargabeli,hargajual,laba) values(' +
QuotedStr(edit1.Text) +' , ' +
QuotedStr(edit2.Text) + ' , ' +
QuotedStr(edit3.Text) + ' , ' +
QuotedStr(ComboBox1.Text) + ' , ' +
QuotedStr(RadioButton1.Caption) + ' , ' +
QuotedStr(edit4.Text) + ' , ' +
QuotedStr(edit5.Text)+ ' , ' +
QuotedStr(intToStr(laba)) + ')';
ExecSQL;
MessageDlg('Data Sudah Tersimpan !',mtInformation,[mbOK],0);
DI DELETE
end;
DI UPDATE