untuk coddingnya anda bisa Lihat di bawah...
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, DBCtrls, Grids, DBGrids, DB, ADODB, Buttons,
jpeg;
type
TForm1 = class(TForm)
ADOConnection1: TADOConnection;
ADOTable1: TADOTable;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
Hari: TLabel;
Nama_MK: TLabel;
SKS: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Jam: TLabel;
Kelas: TLabel;
Edit4: TEdit;
Edit5: TEdit;
Label1: TLabel;
Edit6: TEdit;
Label2: TLabel;
Timer1: TTimer;
Label3: TLabel;
Label4: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
Image1: TImage;
Label5: TLabel;
procedure Timer1Timer(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.Timer1Timer(Sender: TObject);
begin
label3.Caption := Timetostr (Time) ;
label4.Caption := FormatDateTime('dddd,dd-mm-yyyy',Date);
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
AdoTable1.Open;
AdoTable1.Append;
ADOTable1.FieldByName('Hari') .AsString:= edit1.Text;
ADOTable1.FieldByName('Nama MK').AsString:= edit2.Text;
ADOTable1.FieldByName('SKS') .AsString:= edit3.Text;
ADOTable1.FieldByName('Jam') .AsString:= edit4.Text;
ADOTable1.FieldByName('Kelas') .AsString:= edit5.Text;
ADOTable1.FieldByName('Dosen') .AsString:= edit6.Text;
ADOTable1.Post;
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
edit1.Text := ' ';
edit2.Text := ' ';
edit3.Text := ' ';
edit4.Text := ' ';
edit5.Text := ' ';
edit6.Text := ' ';
end;
procedure TForm1.BitBtn4Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.BitBtn3Click(Sender: TObject);
begin
fm.show;
end;
end.
Selamat Mencoba ....
0 komentar:
Posting Komentar