Anda di halaman 1dari 17

BERIKUT INI ADALAH TAMPILAN PROGRAM DARI PENGOLAHAN DATA PADA

BRAND “KIARRA QUEEN”

1.

Dan dibawah ini adalah script dari tombol diatas


procedure TForm1.Button1Click(Sender: TObject);

begin

if (edit1.Text = 'ADMIN') and (edit2.Text = '123456') then

begin

form2.Show

//form1.close;

end

else

begin

showmessage ('Username dan Password Anda Salah');

edit1.Clear;

edit2.Clear;

end;

end;

procedure TForm1.CheckBox1Click(Sender: TObject);


begin

if checkbox1.Checked then

begin

edit2.PasswordChar := #0;

end

else

begin

edit2.PasswordChar := '*';

end

end;

procedure TForm1.Button2Click(Sender: TObject);

begin

edit1.Clear;

edit2.Clear;

end;

rocedure Tform2.Button5Click(Sender: TObject); end;

begin

form4.show; procedure Tform2.Button1Click(Sender: TObject);

begin
Form_distributor.show; form_karyawan.Show

end; end;

procedure Tform2.Button3Click(Sender: TObject); procedure Tform2.Button7Click(Sender: TObject);

begin begin

Form6.Show Form8.show;

end; end;

procedure Tform2.Button4Click(Sender: TObject); procedure Tform2.Button8Click(Sender: TObject);

begin begin

Form7.show; form2.Close

end; end;

procedure Tform2.Button2Click(Sender: TObject); end.

begin

u
nit Unit4; Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms,

Dialogs, StdCtrls, Mask, DBCtrls, DB, ADODB, Grids,


interface DBGrids;

uses type

TForm4 = class(TForm)
Label1: TLabel; DBEdit7: TDBEdit;

Label2: TLabel; DBEdit8: TDBEdit;

Label3: TLabel; DBEdit9: TDBEdit;

Label4: TLabel; DBEdit10: TDBEdit;

Label5: TLabel; Button6: TButton;

Label6: TLabel; procedure Button1Click(Sender: TObject);

ADOTable1: TADOTable; procedure Button4Click(Sender: TObject);

DataSource1: TDataSource; procedure Button2Click(Sender: TObject);

DBGrid1: TDBGrid; procedure Button5Click(Sender: TObject);

DBEdit1: TDBEdit; procedure Button3Click(Sender: TObject);

DBEdit2: TDBEdit; private

DBEdit3: TDBEdit; { Private declarations }

DBEdit4: TDBEdit; public

DBEdit5: TDBEdit; { Public declarations }

Button2: TButton; end;

Button3: TButton;

Button1: TButton; var

GroupBox1: TGroupBox; Form4: TForm4;

Label7: TLabel;

Button4: TButton; implementation

Edit1: TEdit;

Edit2: TEdit; uses Unitmenu;

Edit3: TEdit;

Edit5: TEdit; {$R *.dfm}

Edit6: TEdit;

Button5: TButton; procedure TForm4.Button1Click(Sender: TObject);

GroupBox2: TGroupBox; begin

Label8: TLabel; form2.show;

Label9: TLabel; end;

Label10: TLabel;

Edit4: TEdit; procedure TForm4.Button4Click(Sender: TObject);

Label11: TLabel; begin

Label12: TLabel; if not adotable1.Locate('KODE_PRODUK' , Edit4.Text , [])


then
DBEdit6: TDBEdit;
showmessage ('IDENTITAS TIDAK DITEMUKAN') ; edit5.Text:='';

edit6.Text:='';

Edit1.Visible := false;

Edit2.Visible := false; end;

Edit3.Visible := false;

Edit5.Visible := false; procedure TForm4.Button5Click(Sender: TObject);

Edit6.visible := false; begin

if messagedlg ('apakah anda akan menghapus data ?' ,


mtconfirmation, [mbyes,mbno],0) =mryes then
end;
begin

adotable1.Delete
procedure TForm4.Button2Click(Sender: TObject);
end;
begin
END;
button1.Enabled:=false;

button3.Enabled:=false;
procedure TForm4.Button3Click(Sender: TObject);
button2.Enabled:=true;
begin
button5.Enabled:=false;
if messagedlg ('data ini disimpan?', mtconfirmation,
button4.Enabled:= false; [mbyes,mbno],0)= mRyes then

begin
button1.Enabled:=TRUE;

button3.Enabled:=TRUE; button1.Enabled:=true;
button2.Enabled:=TRUE; button3.Enabled:=false;
button5.Enabled:=TRUE; button4.Enabled:=true;
button4.Enabled:=true; button5.Enabled:=true;

adotable1.Append;

adotable1.FieldByName('KODE_PRODUK').AsString :=
EDIT1.Text;
edit1.Visible:=true;
adotable1.FieldByName('NAMA_PRODUK').AsString :=
edit2.Visible:=true;
EDIT2.Text;
edit3.Visible:=true;
ADOTABLE1.FieldByName('RASA_PRODUK').AsString :=
edit5.Visible:=true; EDIT3.Text;

edit6.Visible:=true; ADOTABLE1.FieldByName('BERAT').AsString := EDIT5.Text;

ADOTABLE1.FieldByName('HARGA_PRODUK').AsString :=
EDIT6.Text;
edit1.SetFocus;

edit2.Text:='';

edit3.Text:='';
ADOTABLE1.Post;
ADOTABLE1.Last; EDIT6.VISIBLE :=FALSE;

EDIT1.Visible :=FALSE;

EDIT2.Visible := FALSE; end;

EDIT3.Visible := FALSE; END;

EDIT5.VISIBLE :=FALSE; end.

procedure TForm_distributor.Button1Click(Sender: button3.Enabled:=false;


TObject);
button4.Enabled:=true;
begin
button5.Enabled:=false;
form2.show;

end;
button1.Enabled:=TRUE;

button3.Enabled:=TRUE;
procedure TForm_distributor.Button4Click(Sender:
TObject); button4.Enabled:=FALSE;

begin button5.Enabled:=TRUE;

if not adotable1.Locate('ID_DISTRIBUTOR' ,
Edit4.Text , []) then

showmessage ('IDENTITAS TIDAK DITEMUKAN') ; edit1.Visible:=true;

edit2.Visible:=true;

edit3.Visible:=true;
end; edit4.Visible:=true;

procedure TForm_distributor.Button2Click(Sender: edit1.SetFocus;


TObject);
edit2.Text:='';
begin
edit3.Text:='';
button1.Enabled:=false;
edit4.Text:=''; button4.Enabled:=true;

button5.Enabled:=true;

adotable1.Append;

end; adotable1.FieldByName('ID_DISTRIBUTOR').AsString
:= EDIT1.Text;

adotable1.FieldByName('NAMA').AsString :=
procedure TForm_distributor.Button5Click(Sender: EDIT2.Text;
TObject);
ADOTABLE1.FieldByName('KOTA').AsString :=
begin EDIT3.Text;
if messagedlg ('apakah anda akan menghapus data
?' , mtconfirmation, [mbyes,mbno],0) =mryes then
ADOTABLE1.Post;
begin
ADOTABLE1.Last;
adotable1.Delete
EDIT1.Visible :=FALSE;
end;
EDIT2.Visible := FALSE;
end;
EDIT3.Visible := FALSE;

END
procedure TForm_distributor.Button3Click(Sender:
TObject); ELSE

begin BEGIN

if messagedlg ('data ini disimpan?', button1.Enabled:=TRUE;


mtconfirmation, [mbyes,mbno],0)= mRyes then
button3.Enabled:=TRUE;
begin
button4.Enabled:=FALSE;

button5.Enabled:=TRUE;
button1.Enabled:=true;
END;
button3.Enabled:=false;
END;
unit Unit5; Button2: TButton;

Button3: TButton;

interface Button1: TButton;

GroupBox1: TGroupBox;

uses Label6: TLabel;

Windows, Messages, SysUtils, Variants, Classes, Edit4: TEdit;


Graphics, Controls, Forms,
Button4: TButton;
Dialogs, StdCtrls, Mask, DBCtrls, DB, ADODB, Grids,
DBGrids; Edit1: TEdit;

Edit2: TEdit;

type Edit3: TEdit;

Tform_karyawan = class(TForm) Edit5: TEdit;

Label1: TLabel; Button5: TButton;

Label2: TLabel; GroupBox2: TGroupBox;

Label3: TLabel; Label8: TLabel;

Label4: TLabel; Label9: TLabel;

Label5: TLabel; Label10: TLabel;

DataSource1: TDataSource; Label11: TLabel;

ADOTable1: TADOTable; DBEdit5: TDBEdit;

DBGrid1: TDBGrid; DBEdit6: TDBEdit;

DBEdit1: TDBEdit; DBEdit7: TDBEdit;

DBEdit2: TDBEdit; DBEdit8: TDBEdit;

DBEdit3: TDBEdit; procedure Button1Click(Sender: TObject);

DBEdit4: TDBEdit; procedure Button4Click(Sender: TObject);


procedure Button5Click(Sender: TObject); Edit3.Visible := false;

procedure Button3Click(Sender: TObject); Edit5.Visible := false;

procedure Button2Click(Sender: TObject); end;

private

{ Private declarations } procedure Tform_karyawan.Button5Click(Sender:


TObject);
public
begin
{ Public declarations }
if messagedlg ('apakah anda akan menghapus
end; data ?' , mtconfirmation, [mbyes,mbno],0) =mryes
then

var begin

form_karyawan: Tform_karyawan; adotable1.Delete

END;

implementation end;

uses Unitmenu; procedure Tform_karyawan.Button3Click(Sender:


TObject);

begin
{$R *.dfm}
if messagedlg ('data ini disimpan?', mtconfirmation,
[mbyes,mbno],0)= mRyes then
procedure Tform_karyawan.Button1Click(Sender: begin
TObject);

begin
button1.Enabled:=true;
form2.show;
button3.Enabled:=false;
end;
button4.Enabled:=true;

button5.Enabled:=true;
procedure Tform_karyawan.Button4Click(Sender:
TObject); adotable1.Append;

begin adotable1.FieldByName('ID_KARYAWAN').AsString :=
EDIT1.Text;
if not adotable1.Locate('ID KARYAWAN' , Edit4.Text ,
[]) then adotable1.FieldByName('NAMA_KARYAWAN').AsStri
ng := EDIT2.Text;
showmessage ('IDENTITAS TIDAK DITEMUKAN') ;
ADOTABLE1.FieldByName('DIVISI_KARYAWAN').AsSt
ring := EDIT3.Text;
Edit1.Visible := false; ADOTABLE1.FieldByName('ALAMAT_KARYAWAN').As
String := EDIT5.Text;
Edit2.Visible := false;
ADOTABLE1.Post; button3.Enabled:=TRUE;

ADOTABLE1.Last; button4.Enabled:=FALSE;

EDIT1.Visible :=FALSE; button5.Enabled:=TRUE;

EDIT2.Visible := FALSE;

EDIT3.Visible := FALSE;

EDIT5.Visible := FALSE; edit1.Visible:=true;

end; edit2.Visible:=true;

END; edit3.Visible:=true;

edit5.Visible:=true;

procedure Tform_karyawan.Button2Click(Sender:
TObject);
edit1.SetFocus;
begin
edit2.Text:='';
button1.Enabled:=false;
edit3.Text:='';
button3.Enabled:=false;
edit5.Text:='';
button4.Enabled:=true;
end;
button5.Enabled:=false;

end.
button1.Enabled:=TRUE;

unit Unit6; Windows, Messages, SysUtils, Variants,


Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, DBCtrls, Grids,
interface DBGrids, DB, ADODB;

uses type
TForm6 = class(TForm) Label9: TLabel;
Label1: TLabel; Label10: TLabel;
Label2: TLabel; Label11: TLabel;
Label3: TLabel; DBEdit6: TDBEdit;
Label4: TLabel; DBEdit7: TDBEdit;
Label5: TLabel; DBEdit8: TDBEdit;
Label6: TLabel; DBEdit9: TDBEdit;
ADOTable1: TADOTable; Label12: TLabel;
DataSource1: TDataSource; DBEdit10: TDBEdit;
DBGrid1: TDBGrid; procedure Button1Click(Sender: TObject);
DBEdit1: TDBEdit; procedure Button4Click(Sender: TObject);
DBEdit2: TDBEdit; procedure Button5Click(Sender: TObject);
DBEdit3: TDBEdit; procedure Button3Click(Sender: TObject);
DBEdit4: TDBEdit; procedure Button2Click(Sender: TObject);
DBEdit5: TDBEdit; private
Button2: TButton; { Private declarations }
Button3: TButton; public
Button1: TButton; { Public declarations }
GroupBox1: TGroupBox; end;
Label7: TLabel;
Edit4: TEdit; var
Button4: TButton; Form6: TForm6;
Edit1: TEdit;
Edit2: TEdit; implementation
Edit3: TEdit;
Edit5: TEdit; uses Unitmenu;
Edit6: TEdit;
Button5: TButton; {$R *.dfm}
GroupBox2: TGroupBox;
Label8: TLabel;
procedure TForm6.Button1Click(Sender: procedure TForm6.Button3Click(Sender:
TObject); TObject);
begin begin
form2.show; if messagedlg ('data ini disimpan?',
mtconfirmation, [mbyes,mbno],0)= mRyes then
end;
begin

procedure TForm6.Button4Click(Sender:
TObject); button1.Enabled:=true;
begin button3.Enabled:=false;
if not adotable1.Locate('NOMOR_PENGADAAN' button4.Enabled:=true;
, Edit4.Text , []) then
button5.Enabled:=true;
showmessage ('IDENTITAS TIDAK
DITEMUKAN') ; adotable1.Append;
adotable1.FieldByName('Nomor_Pengadaan').A
sString := EDIT1.Text;
Edit1.Visible := false;
adotable1.FieldByName('Tanggal').AsString :=
Edit2.Visible := false; EDIT2.Text;
Edit3.Visible := false; ADOTABLE1.FieldByName('Kuantitas').AsString
:= EDIT3.Text
Edit5.Visible := false;
//ADOTABLE1.FieldByName('Kode_Produk').AsS
Edit6.Visible := false tring := edit5.Text;
end; //adotable1.FieldByName('ID_Karyawan').AsStri
ng := edit6.Text

procedure TForm6.Button5Click(Sender:
TObject); //ADOTABLE1.Post;
begin //ADOTABLE1.Last;
if messagedlg ('apakah anda akan //EDIT1.Visible :=FALSE;
menghapus data ?' , mtconfirmation,
[mbyes,mbno],0) =mryes then //EDIT2.Visible := FALSE;
begin //EDIT3.Visible := FALSE
adotable1.Delete //EDIT5.Visible := FALSE;
END; //EDIT6.Visible := FALSE;
end; end;
END;
procedure TForm6.Button2Click(Sender: edit2.Visible:=true;
TObject);
edit3.Visible:=true;
begin
edit4.Visible:=true;
button1.Enabled:=false;
EDIT5.Visible := TRUE;
button2.Enabled:=true;
EDIT6.Visible := TRUE;
button4.Enabled:=false;
button5.Enabled:=false;
edit1.SetFocus;
edit2.Text:='';
button1.Enabled:=TRUE;
edit3.Text:='';
button2.Enabled:=false;
edit4.Text:='';
button4.Enabled:=true;
EDIT5.Text := '';
button5.Enabled:=TRUE;
EDIT6.Text := '';

end;
edit1.Visible:=true;

end.

unit Unit7; uses

Windows, Messages, SysUtils, Variants, Classes,


Graphics, Controls, Forms,
interface
Dialogs, StdCtrls, DB, ADODB, DBCtrls, Grids,
DBGrids;
var

type Form7: TForm7;

TForm7 = class(TForm)

Label1: TLabel; implementation

Label2: TLabel;

Label3: TLabel; uses Unitmenu;

Label4: TLabel;

Label5: TLabel; {$R *.dfm}

Label6: TLabel;

Label7: TLabel; procedure TForm7.Button1Click(Sender: TObject);

Button1: TButton; begin

Edit1: TEdit; form2.show;

Edit2: TEdit; end;

Edit3: TEdit;

ADOTable1: TADOTable; procedure TForm7.Button2Click(Sender: TObject);

DataSource1: TDataSource; begin

DBGrid1: TDBGrid; ADOTABLE1.FieldByName('Nomor_Penjualan').AsStri


ng :=edit1.Text;
DBComboBox1: TDBComboBox;
adotable1.FieldByName('kuantitas').AsString :=
Button5: TButton; edit2.Text;
Button2: TButton; adotable1.FieldByName('tanggal').AsString
Button3: TButton; :=edit3.Text

DBComboBox2: TDBComboBox; end;

DBComboBox3: TDBComboBox;

procedure Button1Click(Sender: TObject); procedure TForm7.Button3Click(Sender: TObject);

procedure Button2Click(Sender: TObject); begin

procedure Button3Click(Sender: TObject); if messagedlg ('data ini disimpan?',


mtconfirmation, [mbyes,mbno],0)= mRyes then
private
begin
{ Private declarations }

public
button1.Enabled:=true;
{ Public declarations }
button3.Enabled:=false;
end;
//button4.Enabled:=true;

button5.Enabled:=true;
adotable1.Append;

ADOTABLE1.FieldByName('Nomor_Penjualan').AsStri
ng :=edit1.Text;

adotable1.FieldByName('kuantitas').AsString :=
edit2.Text; end;

adotable1.FieldByName('tanggal').AsString END;
:=edit3.Text

end.

unit Unit8; DataSource1: TDataSource;

DataSource2: TDataSource;

interface ADOTable2: TADOTable;

ADOTable3: TADOTable;

uses ADOTable4: TADOTable;

Windows, Messages, SysUtils, Variants, Classes, ADOTable5: TADOTable;


Graphics, Controls, Forms,
DataSource3: TDataSource;
Dialogs, DB, ADODB, Grids, DBGrids, ComCtrls,
TabNotBk, StdCtrls, Mask, DataSource4: TDataSource;

DBCtrls; DataSource5: TDataSource;

DBGrid2: TDBGrid;

type DBGrid3: TDBGrid;

TForm8 = class(TForm) DBGrid4: TDBGrid;

Label1: TLabel; DBGrid5: TDBGrid;

TabbedNotebook1: TTabbedNotebook; Button1: TButton;

ADOTable1: TADOTable; DBGrid1: TDBGrid;


ADOTable6: TADOTable;

DataSource6: TDataSource; uses Unitmenu;

Button5: TButton;

Button2: TButton; {$R *.dfm}

GroupBox1: TGroupBox;

Label2: TLabel; procedure TForm8.Button1Click(Sender: TObject);

Label3: TLabel; begin

Label4: TLabel; form2.show;

Label5: TLabel; end;

Button3: TButton;

DBEdit1: TDBEdit; procedure TForm8.Button5Click(Sender: TObject);

DBEdit2: TDBEdit; begin

DBEdit3: TDBEdit; if messagedlg ('apakah anda akan menghapus data


?' , mtconfirmation, [mbyes,mbno],0) =mryes then
DBEdit4: TDBEdit;
begin
Edit1: TEdit;
adotable1.Delete
Edit2: TEdit;
END;
Edit3: TEdit;
end;
Edit4: TEdit;

procedure Button1Click(Sender: TObject);


procedure TForm8.Button3Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
begin
procedure Button2Click(Sender: TObject);
ADOTABLE1.Open;
procedure Button3Click(Sender: TObject);
ADOTABLE1.Append;
private
ADOTABLE1.FieldByName('ID_Karyawan').AsString
{ Private declarations } :=edit1.Text;
public

{ Public declarations } adotable1.FieldByName('Nama_Karyawan').AsString


:=EDIT2.Text;
end;
ADOTABLE1.FieldByName('Divisi').AsString
:=edit3.Text;
var adotable1.FieldByName('alamat').AsString
:=edit4.Text;
Form8: TForm8;
ADOTABLE1.Post;

end;
implementation
procedure TForm8.Button2Click(Sender: TObject); //ADOTABLE1.Post;

begin //ADOTABLE1.Last;

//if messagedlg ('data ini disimpan?', EDIT1.Visible := TRUE;


mtconfirmation, [mbyes,mbno],0)= mRyes then
EDIT2.Visible := TRUE;
//begin
EDIT3.Visible := TRUE;

EDIT4.Visible := TRUE;
//button1.Enabled:=true;
EDIT1.SetFocus;
//button3.Enabled:=false;

//button2.Enabled:=true;
DBEDIT1.Visible := FALSE;
//button5.Enabled:=true;
DBEDIT2.Visible := FALSE;
//adotable1.Append;
DBEDIT3.Visible := FALSE;
//adotable1.FieldByName('ID_KARYAWAN').AsString
:= EDIT1.Text; DBEDIT4.Visible := FALSE;

//adotable1.FieldByName('NAMA_KARYAWAN').AsSt
ring := EDIT2.Text;

//ADOTABLE1.FieldByName('DIVISI').AsString := end;
EDIT3.Text;

//ADOTABLE1.FieldByName('ALAMAT_KARYAWAN').
AsString := EDIT4.Text;

end.