Unit21.pas
上传用户:szyozho
上传日期:2013-04-13
资源大小:3688k
文件大小:2k
- unit Unit21;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, Buttons, ExtCtrls, jpeg, DB, DBTables;
- type
- Trightform = class(TForm)
- Panel1: TPanel;
- Image1: TImage;
- CheckBox1: TCheckBox;
- CheckBox2: TCheckBox;
- BitBtn1: TBitBtn;
- BitBtn2: TBitBtn;
- CheckBox3: TCheckBox;
- Bevel1: TBevel;
- CheckBox4: TCheckBox;
- CheckBox5: TCheckBox;
- CheckBox6: TCheckBox;
- CheckBox7: TCheckBox;
- BitBtn3: TBitBtn;
- Label1: TLabel;
- Query1: TQuery;
- Label2: TLabel;
- procedure BitBtn3Click(Sender: TObject);
- procedure BitBtn1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- rightform: Trightform;
- implementation
- uses Unit3, Unit1;
- {$R *.dfm}
- procedure Trightform.BitBtn3Click(Sender: TObject);
- begin
- CheckBox1.State:=cbChecked;
- CheckBox2.State:=cbChecked;
- // CheckBox3.State:=cbChecked;
- CheckBox4.State:=cbChecked;
- CheckBox5.State:=cbChecked;
- // CheckBox6.State:=cbChecked;
- CheckBox7.State:=cbChecked;
- end;
- procedure Trightform.BitBtn1Click(Sender: TObject);
- begin
- query1.Close;
- query1.SQL.Clear;
- query1.SQL.Add('select qx from u where ID='''+loginform.ComboBox1.Text+'''') ;
- query1.Open;
- if query1.FieldByName('qx').AsString='b' then
- begin
- if CheckBox1.State=cbChecked then
- mainform.N3.Enabled:=true else mainform.N3.Enabled:=false;
- if CheckBox2.State=cbChecked then
- mainform.N18.Enabled:=true else mainform.N18.Enabled:=false;
- if CheckBox4.State=cbChecked then
- mainform.N6.Enabled:=true else mainform.N6.Enabled:=false;
- if CheckBox5.State=cbChecked then
- mainform.N7.Enabled:=true else mainform.N7.Enabled:=false;
- if CheckBox7.State=cbChecked then
- mainform.N10.Enabled:=true else mainform.N10.Enabled:=false;
- end;
- //if query1.FieldByName('qx').AsString='a' then
- // BitBtn3.Click;
- end;
- end.