АИС отдел кадров. АИС отдела кадров. 1. анализ предметной области и разработка требований к информационной системе 4
Скачать 6.55 Mb.
|
PereTableDSDesigner9: TIntegerField; PereTableDSDesigner10: TWideStringField; PereTableDSDesigner11: TWideStringField; PereTable_3: TWideStringField; Button3: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form9: TForm9; implementation uses Unit1, Unit2,unit3, Unit4, unit5,unit6, unit7, unit10, Unit12, Unit8; {$R *.dfm} procedure TForm9.Button1Click(Sender: TObject); begin if PereTable.Modified then PereTable.Post; end; procedure TForm9.Button2Click(Sender: TObject); begin Form10.Show; Form9.Hide; end; procedure TForm9.Button3Click(Sender: TObject); begin if Application.MessageBox(Pchar('Действительно хотите удалить ?'),'Внимание!',MB_OKCANCEL)=id_Ok then PereTable.Delete; end; end. unit Unit10; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Mask, DBCtrls, ExtCtrls; type TForm10 = class(TForm) Panel1: TPanel; Label1: TLabel; Label2: TLabel; Label3: TLabel; DBLookupComboBox1: TDBLookupComboBox; DBEdit1: TDBEdit; DBEdit2: TDBEdit; Button1: TButton; Label4: TLabel; Button2: TButton; Button3: TButton; procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form10: TForm10; implementation uses Unit1, Unit2,unit3, Unit4, unit5,unit6, unit7, unit9, Unit8, Unit12; {$R *.dfm} procedure TForm10.Button2Click(Sender: TObject); begin Form9.Show; Form10.Hide; end; procedure TForm10.Button3Click(Sender: TObject); begin Form8.Show; Form10.Hide; end; procedure TForm10.Button1Click(Sender: TObject); begin Form12.Show; Form10.Hide; end; end. unit Unit12; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, ADODB, StdCtrls, Grids, DBGrids, ExtCtrls; type TForm12 = class(TForm) Panel2: TPanel; DBGrid2: TDBGrid; Button1: TButton; Button2: TButton; ADOConnection1: TADOConnection; BookTable: TADOTable; DataSource1: TDataSource; ADOConnection2: TADOConnection; PereTable: TADOTable; DataSource2: TDataSource; FindSource: TDataSource; Button3: TButton; BookTable_: TAutoIncField; BookTable_2: TDateTimeField; BookTableDSDesigner: TWideStringField; BookTableDSDesigner2: TWideStringField; BookTableDSDesigner3: TWideStringField; BookTableDSDesigner4: TDateTimeField; BookTableDSDesigner5: TWideStringField; BookTableDSDesigner6: TWideStringField; BookTableDSDesigner7: TWideStringField; BookTableDSDesigner8: TWideStringField; BookTableDSDesigner9: TIntegerField; BookTableDSDesigner10: TWideStringField; BookTableDSDesigner11: TWideStringField; BookTable_3: TWideStringField; PereTable_: TAutoIncField; PereTable_2: TDateTimeField; PereTableDSDesigner: TWideStringField; PereTableDSDesigner2: TWideStringField; PereTableDSDesigner3: TWideStringField; PereTableDSDesigner4: TDateTimeField; PereTableDSDesigner5: TWideStringField; PereTableDSDesigner6: TWideStringField; PereTableDSDesigner7: TWideStringField; PereTableDSDesigner8: TWideStringField; PereTableDSDesigner9: TIntegerField; PereTableDSDesigner10: TWideStringField; PereTableDSDesigner11: TWideStringField; PereTable_3: TWideStringField; BookTable_4: TIntegerField; procedure Button2Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button3Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form12: TForm12; implementation uses Unit10; {$R *.dfm} procedure TForm12.Button2Click(Sender: TObject); begin Form10.Show; Form12.Hide; end; procedure TForm12.Button1Click(Sender: TObject); begin PereTable.Insert; DBGrid2.SetFocus; end; procedure TForm12.Button3Click(Sender: TObject); begin if PereTable.Modified then if dbgrid2.Columns.Items[5]=nil then showmessage('Введите данные'); PereTable.Post; end; end. |