f_kqrl.pas
上传用户:lcqxtx
上传日期:2013-02-15
资源大小:530k
文件大小:2k
- unit f_kqrl;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, Buttons, ExtCtrls, DBCtrls, StdCtrls, Mask, DB, ADODB;
- type
- Tw_kqrl = class(TForm)
- data_kaoqin: TDataSource;
- ado_kaoqin: TADOQuery;
- Label1: TLabel;
- ado_kaoqinrs_id: TStringField;
- ado_kaoqinrs_name: TStringField;
- ado_kaoqins_time: TDateTimeField;
- ado_kaoqinx_time: TDateTimeField;
- ado_kaoqinc_sh: TStringField;
- GroupBox1: TGroupBox;
- Label2: TLabel;
- DBEdit1: TDBEdit;
- Label3: TLabel;
- DBEdit2: TDBEdit;
- Label4: TLabel;
- DBEdit3: TDBEdit;
- Label5: TLabel;
- DBEdit4: TDBEdit;
- Label6: TLabel;
- Panel1: TPanel;
- DBNavigator1: TDBNavigator;
- DBComboBox1: TDBComboBox;
- procedure DBComboBox1Change(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- w_kqrl: Tw_kqrl;
- implementation
- uses f_main;
- {$R *.dfm}
- procedure Tw_kqrl.DBComboBox1Change(Sender: TObject);
- begin
- if dbcombobox1.Text='旷工'then
- begin
- DBedit3.Enabled :=false;
- dbedit4.Enabled:=false ;
- end
- else if dbcombobox1.Text='请假' then
- begin
- DBedit3.Enabled :=false;
- dbedit4.Enabled:=false ;
- end
- else
- DBedit3.Enabled :=true;
- dbedit4.Enabled:=true;
- end;
- procedure Tw_kqrl.FormCreate(Sender: TObject);
- begin
- ado_kaoqin.Close;
- ado_kaoqin.SQL.Clear;
- ado_kaoqin.SQL.Add('select * from kaoqin');
- ado_kaoqin.Open;
- w_main.Enabled:=false;
- end;
- procedure Tw_kqrl.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- w_main.Enabled:=true;
- end;
- end.