borjois

WELCOME TO MY BLOG

Ketik yg Anda Cari

Powered By Blogger

15/11/10

Mencari Nilai Deviasi pada Delphi

Listing Program
unit utugas;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, TeEngine, Series, ExtCtrls, TeeProcs, Chart, DbChart, DB,
  DBTables, Grids, DBGrids, StdCtrls;

type
  TForm1 = class(TForm)
    DBGrid1: TDBGrid;
    Table1: TTable;
    Query1: TQuery;
    DataSource1: TDataSource;
    Button1: TButton;
    Button2: TButton;
    Button5: TButton;
    Label1: TLabel;
    Panel1: TPanel;
    DBChart1: TDBChart;
    Series1: TBarSeries;
    Button3: TButton;
    Button4: TButton;
    Button6: TButton;
    Button7: TButton;
    DBChart2: TDBChart;
    Series2: TPieSeries;
    DBChart3: TDBChart;
    Series3: TLineSeries;
    Button8: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);

    procedure Timer2Timer(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button6Click(Sender: TObject);
    procedure Button7Click(Sender: TObject);
    procedure Button8Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses RepBat, RepTab;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
with Query1 do begin
SQL.Clear;
SQL.add('Update TAB_IQ set FX=0');
execSQL;
ShowMessage('Selesai');
Table1.Close;
Table1.Open;
end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
with Query1 do begin
SQL.Clear;
SQL.add('update TAB_IQ set FX=F*X');

execSQL();
showMessage('Selesai');
Table1.Close;
Table1.Open;
end;
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
close;
end;



procedure TForm1.Timer2Timer(Sender: TObject);
begin
if label1.Left > 0 then
label1.Left:=label1.Left + 30
else
begin
label1.Left:=clientwidth;
end
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
if label1.Left > 0 then
label1.Left:=label1.Left - 20
else
begin
label1.Left:=clientwidth;
end
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
if sender = Button3 then RBATANG.Preview;

end;

procedure TForm1.Button4Click(Sender: TObject);
begin
if sender = Button4 then REPORT_TABEL.preview;
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
DBChart1.Show;
DBChart2.Hide;
DBChart3.Hide;
end;

procedure TForm1.Button7Click(Sender: TObject);
begin
DBChart1.Hide;
DBChart2.Show;
DBChart3.Hide;
end;

procedure TForm1.Button8Click(Sender: TObject);
begin
DBChart3.Show;
DBChart1.Hide;
DBChart2.Hide;
end;

end.

Tidak ada komentar:

Posting Komentar

traffic