📄 bmkqunit.pas
字号:
unit BmkqUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ExtCtrls;
type
TBmkqForm = class(TForm)
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
ComboBox3: TComboBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure bmkqQxNewll;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure formcreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BmkqForm: TBmkqForm;
implementation
uses dm,bmkqmsUnit;
{$R *.dfm}
PROcedure TbmkqForm.bmkqQxNewll;
var
iacc_id,iyear:integer;
begin
combobox1.Items.Add('全部');
with dmdata.BmADOQuery do
begin
close;
sql.Clear;
sql.Add('select * from t_bm');
open;
first;
while not dmdata.BmADOQuery.eof do
begin
combobox1.Items.Add(fieldbyname('dwbm').AsString);
next;
end;
end;
combobox1.ItemIndex:=0;
iacc_id:=dmdata.qsjzADOQuery.fieldbyname('iacc_id').AsInteger;
iyear:=dmdata.qsjzADOQuery.fieldbyname('iyear').AsInteger;
with dmdata.rqADOQuery do
begin
close;
sql.Clear;
sql.Add('select * from g_period where (iacc_id=:a)and(iyear=:b)' );
parameters.ParamByName('a').Value := iacc_id;
parameters.ParamByName('b').Value:=iyear;
open;
First;
while not dmdata.rqADOQuery.eof do
begin
combobox2.Items.Add(datetostr(fieldbyname('dbegin').AsDateTime));
combobox3.Items.Add(datetostr(fieldbyname('dend').AsDateTime));
Next;
end;
end;
end;
procedure TBmkqForm.BitBtn1Click(Sender: TObject);
begin
if (combobox2.Text = '')and(combobox3.Text ='') then
exit;
try
bmkqMsform := TbmkqMsform.Create(Application); //动态创建关于窗体
bmkqMsform.ShowModal; //显示关于窗口
except
on e: exception do
Application.ShowException(e); //弹出异常对话框
end;
end;
procedure TBmkqForm.BitBtn2Click(Sender: TObject);
begin
close;
end;
procedure TBmkqForm.formcreate(Sender: TObject);
begin
bmkqQxNewll;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -