epr_namebookfield.pas

来自「公交行业的管理系统」· PAS 代码 · 共 105 行

PAS
105
字号
unit Epr_NameBookField;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, ADODB, StdCtrls, DBCtrls, Mask, Buttons, ExtCtrls;

type
  TGP1Form = class(TForm)
    DataSource1: TDataSource;
    ADOQuery1: TADOQuery;
    Label1: TLabel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    Panel1: TPanel;
    DBCheckBox1: TDBCheckBox;
    DBCheckBox2: TDBCheckBox;
    DBCheckBox3: TDBCheckBox;
    DBCheckBox4: TDBCheckBox;
    DBCheckBox5: TDBCheckBox;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    DBEdit3: TDBEdit;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label5: TLabel;
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
        confirm : integer;
        procedure  showfield();
    { Public declarations }
  end;

var
  GP1Form: TGP1Form;

implementation

uses BusTradeDataModuleUnit, Epr_NameBookEditUnit, Epr_NameBookUnit;

{$R *.dfm}
procedure TGP1Form.showfield();
var
        field :string;
begin
       {field := '';
       if (DbCheckBox1.Checked = true)
       then
                field := field + '公共汽车、电车*;';
       if (DbCheckBox2.Checked = true)
       then
                field := field + '出租汽车业*;';
        if (DbCheckBox3.Checked = true)
       then
                field := field + '地铁*;';
        if (DbCheckBox4.Checked = true)
       then
                field := field + '轻轨*;';
        if (DbCheckBox5.Checked = true)
       then
                field := field + '轮渡*;';
       EprNameBookEdit.ComboBox1.Items.Clear;
       EprNameBookEdit.ComboBox1.Text := field;}
end;


procedure TGP1Form.BitBtn1Click(Sender: TObject);
begin
        //AdoQuery1.Post;
        showfield();
        GP1Form.Close;
end;

procedure TGP1Form.BitBtn2Click(Sender: TObject);
begin
        AdoQuery1.Cancel;
        showfield();
        GP1Form.Close;
end;

procedure TGP1Form.FormCreate(Sender: TObject);
begin
        DbCheckBox1.AllowGrayed := False;
        DbCheckBox1.State := cbChecked;
        DbCheckBox2.AllowGrayed := False;
        DbCheckBox2.State := cbChecked;
        DbCheckBox3.AllowGrayed := False;
        DbCheckBox3.State := cbChecked;
        DbCheckBox4.AllowGrayed := False;
        DbCheckBox4.State := cbChecked;
        DbCheckBox5.AllowGrayed := False;
        DbCheckBox5.State := cbChecked;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?