ข้อมูลทั้งหมดนะครับ
unit PersonnelListUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, Menus, StdCtrls,
cxButtons, ExtCtrls, cxControls, cxStyles, dxSkinsCore,
dxSkinsDefaultPainters, cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit,
DB, cxDBData, cxGridLevel, cxClasses, cxGridCustomView, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGrid, DBAccess, MyAccess, MemDS;
type
TPersonnelListForm = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
cxButton1: TcxButton;
cxGrid1DBTableView1: TcxGridDBTableView;
cxGrid1Level1: TcxGridLevel;
cxGrid1: TcxGrid;
MyQueryPersonnelList: TMyQuery;
MyDataSourcePersonnelList: TMyDataSource;
cxGrid1DBTableView1id: TcxGridDBColumn;
cxGrid1DBTableView1name: TcxGridDBColumn;
cxGrid1DBTableView1work_in: TcxGridDBColumn;
cxGrid1DBTableView1department_id: TcxGridDBColumn;
cxGrid1DBTableView1status_id: TcxGridDBColumn;
cxGrid1DBTableView1cid: TcxGridDBColumn;
cxGrid1DBTableView1hn: TcxGridDBColumn;
cxButton2: TcxButton;
cxButton3: TcxButton;
procedure cxButton1Click(Sender: TObject);
procedure cxButton2Click(Sender: TObject);
procedure cxButton3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
PersonnelListForm: TPersonnelListForm;
implementation
uses TchmDataModuleUnit, PersonnelAddUnit;
{$R *.dfm}
procedure TPersonnelListForm.cxButton1Click(Sender: TObject);
begin
Close;
end;
procedure TPersonnelListForm.cxButton2Click(Sender: TObject);
begin//Add
PersonnelAddForm:=TPersonnelAddForm.Create(application);
PersonnelAddForm.ShowModal;
PersonnelAddForm.free;
end;
procedure TPersonnelListForm.cxButton3Click(Sender: TObject);
begin//Edit
PersonnelAddForm:=TPersonnelAddForm.Create(application);
//PersonnelAddForm.AddrID:=MyQueryPersonnelList.fieldByName('id').AsInteger;
PersonnelAddForm.ShowModal;
PersonnelAddForm.free;
ShowMessage('แก้ไขรายชื่อสำเร็จ');
end;
end.