rycxsz.pas

来自「一个仓库管理中的子系统--采购子系统」· PAS 代码 · 共 91 行

PAS
91
字号
unit rycxsz;

interface

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

type
  TrycxszForm = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    RadioGroup1: TRadioGroup;
    ComboBox1: TComboBox;
    Label2: TLabel;
    BitBtn2: TBitBtn;
    BitBtn1: TBitBtn;
    procedure FormActivate(Sender: TObject);
    procedure RadioGroup1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  rycxszForm: TrycxszForm;

implementation

uses Datamodule;

{$R *.DFM}

procedure TrycxszForm.FormActivate(Sender: TObject);
begin
    with datamodule1.PublicQuery1 do
    begin
    close;
    sql.Clear;
    sql.add('Select jhyid from dbo.p_jhyb');
    prepare;
    open;
    ComboBox1.Items.Clear;
    while not eof do
    begin
    combobox1.Items.Add(FieldByName('jhyid').asstring);
    next;
    end;
    close;
    end;
end;

procedure TrycxszForm.RadioGroup1Click(Sender: TObject);
begin
   if RadioGroup1.ItemIndex=0 then
   with datamodule1.PublicQuery1 do
    begin
    close;
    sql.Clear;
    sql.add('Select jhyid from dbo.p_jhyb');
    prepare;
    open;
    ComboBox1.Items.Clear;
    while not eof do
    begin
    combobox1.Items.Add(FieldByName('jhyid').asstring);
    next;
    end;
    close;
    end
    else
    with datamodule1.PublicQuery1 do
    begin
    close;
    sql.Clear;
    sql.add('Select bmfzr from dbo.e_bmmcb');
    prepare;
    open;
    ComboBox1.Items.Clear;
    while not eof do
    begin
    combobox1.Items.Add(FieldByName('bmfzr').asstring);
    next;
    end;
    close;
    end;
end;

end.

⌨️ 快捷键说明

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