canshuformunit.pas

来自「DELPHI计算机科学系教务管理系统,带论文设计,不错的参考」· PAS 代码 · 共 66 行

PAS
66
字号
unit canshuFormUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics,ADODB, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  TcanshuForm = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label12: TLabel;
    Button1: TButton;
    edttrjbren: TEdit;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    str1,str2,str3:string;
    { Public declarations }
  end;

var
  canshuForm: TcanshuForm;

implementation

uses DataModul;

{$R *.dfm}

procedure TcanshuForm.Button1Click(Sender: TObject);
begin
  str1:=combobox2.Text;
  str2:=edttrjbren.Text;
  str3:=combobox1.Text;
  close;
end;

procedure TcanshuForm.FormCreate(Sender: TObject);
var
  adoqry: TADOQuery;
begin
  adoqry:= TADOQuery.Create(self);
  with adoqry do
  begin
    connection:=dm.ADOConnection1;
    sql.Text:='select * from TDataParam where DTypeId=003';
    Open;
    while not eof do
    begin
      combobox2.Items.Add(fieldByname('DName').AsString);
      next;
    end;
    free;
  end;
end;

end.

⌨️ 快捷键说明

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