📄 uparticular.pas
字号:
unit UParticular;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Buttons, Grids, DBGrids, Db, DBTables;
type
TParticular = class(TForm)
DataSource1: TDataSource;
ParticularQuery: TQuery;
DBGrid1: TDBGrid;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
procedure FormCreate(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Particular: TParticular;
implementation
uses main, UPurchaseRecord, UDepartment, UManufacturer;
procedure AlignGrid(dbgrid:Tdbgrid);stdcall;external 'AlignGriddll.dll';
{$R *.DFM}
procedure TParticular.FormCreate(Sender: TObject);
var
receive,tmp,tmpsql:string;
begin
if sflag=1 then
begin
tmp:=mainfm.Dbgrid4.Fields[0].AsString;
receive:='品名';
end;
if sflag=2 then
begin
tmp:=Department.Dbgrid1.Fields[0].AsString;
receive:='销售部门';
end;
if sflag=3 then
begin
tmp:=Manufacturer.Dbgrid1.Fields[0].AsString;
receive:='供货商';
end;
ParticularQuery.Close;
ParticularQuery.SQL.Clear;
tmpsql:='select * from goodsbase where '+receive+'='''+tmp+'''';
ParticularQuery.SQL.Add(tmpsql);
ParticularQuery.Open;
AlignGrid(dbgrid1);
end;
procedure TParticular.SpeedButton3Click(Sender: TObject);
begin
ParticularQuery.Close;
Particular.Release;
Particular.Close;
end;
procedure TParticular.SpeedButton1Click(Sender: TObject);
begin
mainfm.flag1:=4;
Application.CreateForm(TPurchaseRecord,PurchaseRecord);
PurchaseRecord.ShowModal;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -