interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, Grids, DBGrids, DB, DBTables;
type
TFRMPEMBAYARAN = class(TForm)
TPEMBAYARAN: TTable;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
MaskEdit1: TMaskEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
PROCEDURE KOSONGKANFORM;
var
FRMPEMBAYARAN: TFRMPEMBAYARAN;
implementation
{$R *.dfm}
PROCEDURE TFRMPEMBAYARAN.KOSONGKANFORM;
BEGIN
EDIT2.Text:='';
EDIT3.Text:='';
MASKEDIT1.Text:='';
END;
exit;
end;
TPEMBAYARAN.Insert;
TPEMBAYARAN['NO_TRANSAKSI']:=edit1.Text;
TPEMBAYARAN['TGL_TRANSAKSI']:=MASKEDIT1.Text;
TPEMBAYARAN['JML_TRANSAKSI']:=edit2.Text;
TPEMBAYARAN['KD_METERAN']:=edit3.Text;
TPEMBAYARAN.Post;
edit1.Text:='';
kosongkanForm;
end;
TPEMBAYARAN.IndexName:='';
ketemu := TPEMBAYARAN.FindKey([edit1.text]);
if ketemu then begin
MASKEDIT1.Text:=TPEMBAYARAN['TGL_TRANSAKSI'];
edit2.Text:=TPEMBAYARAN['JML_TRANSAKSI'];
edit3.Text:=TPEMBAYARAN['KD_METERAN'];
exit;
end;
kosongkanForm;
end;
end.