P. 1
Form Pengaarang Barang

Form Pengaarang Barang

|Views: 0|Likes:
Published by Anggito Abimanyu
sontoh pengadaan barang
sontoh pengadaan barang

More info:

Categories:Types, School Work
Published by: Anggito Abimanyu on Jun 12, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

06/28/2015

pdf

text

original

Nama : Nur mUhammad Dani NIM : 1110031802250

Tugas : Delphi II . Form Pengadaan Barang

Kode Lengkapnya :
unit Unit11; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, StdCtrls, jpeg, ExtCtrls, StrUtils, DBGrids; type TForm11 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel;

public { Public declarations } end.Button1Click(Sender: TObject). i.clear.dfm} procedure TForm11. var Form11: TForm11.1 do begin with dm.RowCount . begin for i := 1 to Sg1.Caption + . Button1: TButton.add('insert into supplier (kd_supp.'+ 'kd_Brg. procedure Edit2KeyPress(Sender: TObject. indekstwin. {$R *. jml : integer. implementation uses unit2. Edit1: TEdit.Query1 do begin sql.jumlah) values ("' + label4. sg1: TStringGrid. jumlah. subtotal. var Key: Char). private { Private declarations } procedure no_pengadaan. procedure FormCreate(Sender: TObject).tanggal. harga. kode : string. nama.Label8: TLabel. Edit2: TEdit. no_sekarang : string. Edit3: TEdit.no_faktur. Label9: TLabel. totalbelanja. sql. procedure Button1Click(Sender: TObject).

clear.Query1 do begin sql.Text. ExecSQL. begin kode := Edit2. if not eof then begin nama harga := FieldValues['nm_brg']."' + sg1. with dm.Text + '".Edit2KeyPress(Sender: TObject.').Query1 do begin sql. if key = #13 then begin with DM.add('update barang set stock=stock+"' + Sg1. Sg1.i] + '"."' + Edit1.Cells[4. := FieldValues['hrg_jual']. ExecSQL.Add('select * from barang where kd_brg = "'+ kode +'"'). end. procedure TForm11.. Edit2..'". . sql. var Key: Char).i] + '")').clear. open.Cells[1. no_pengadaan . end.i] + '" where kd_brg="' + sg1.i] + '"')."' + Sg1.clear. sql.Cells[1.now) + '".SetFocus.Cells[4. Edit2.."' + formatdatetime('yyyy/mm/dd'.RowCount := 1. ShowMessage('Berhasil disimpan bung. end. end.

end else begin sg1.Text). jumlah := jumlah + strtoint(sg1. .rowcount .i] := nama. cells[4. label9.Text). cells[1. end. subtotal := harga * jumlah. end. end. cells[2.i] := inttostr(harga).1. cells[5.i] := inttostr(subtotal). := harga * jumlah. end.i] := inttostr(i). cells[3. with sg1 do begin cells[0.cells[4. procedure TForm11. totalbelanja := totalbelanja + subtotal.FormCreate(Sender: TObject).rowcount := sg1.cols[1].IndexOf(Edit2.caption := inttostr(totalbelanja).i]).i] := inttostr(jumlah). indekstwin := sg1. if indekstwin > 0 then begin i := indekstwin.jumlah subtotal := strtoint(Edit3.RowCount + 1. end. end.i] := kode. i := sg1.

edit3. Label6.'. with Sg1 do begin RowCount := 1. colcount := 6. var id : string. .clear. colwidths[0] := 40. edit1. end. colwidths[4] := 50.Clear.Caption := FormatDateTime('dd MMMM yyyy'.0] := 'Nama Barang'.0] := 'Subtotal'.0] := 'Kode Barang'.0] := 'Jumlah'. colwidths[5] := 90. plus : integer.clear. procedure TForm11.0] := 'No. colwidths[2] := 200. cells[4. cells[2. begin no_sekarang := 'P-000001'.0] := '@ Harga'. cells[5. cells[3.no_pengadaan. edit2.begin no_pengadaan . colwidths[1] := 100. cells[1.now) end. cells[0. colwidths[3] := 80.

with dm. end. no_sekarang := 'P-'+ id. id := formatfloat('000000'.Query1 do begin sql. . sql. end.Clear. end. open. label4. if not eof then begin plus := strtoint(rightstr(fieldvalues['kd_supp'].add('select * from supplier order by kd_supp desc limit 1').plus).Caption := no_sekarang.6)) + 1. end.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->