officemanage.pas
来自「大型分布式销售管理系统,DELPHI编写,商业源代码,现在已经商用,下载者严禁出」· PAS 代码 · 共 77 行
PAS
77 行
unit officemanage;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Buttons, CheckLst, Grids, DBGrids, DB, ADODB;
type
TForm_officemanage = class(TForm)
Panel1: TPanel;
Label1: TLabel;
GroupBox4: TGroupBox;
CkLBox1: TCheckListBox;
Panel2: TPanel;
Label2: TLabel;
DBGrid1: TDBGrid;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
Panel3: TPanel;
Button1: TButton;
Button2: TButton;
procedure FormCreate(Sender: TObject);
procedure CkLBox1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form_officemanage: TForm_officemanage;
implementation
uses wxp_dm, Unit_wxp;
{$R *.dfm}
procedure TForm_officemanage.FormCreate(Sender: TObject);
begin
if unit_wxp.myOffice ='总部' then
begin
dm_wxp.ADOQuery1.Active :=false;
dm_wxp.ADOQuery1.SQL.Clear ;
dm_wxp.ADOQuery1.SQL.Add('select * from pub_z_office');
dm_wxp.ADOQuery1.Active :=true;
while not dm_wxp.ADOQuery1.Eof do
begin
cklbox1.Items.Add(dm_wxp.ADOQuery1.Fields.Fields[1].AsString );
dm_wxp.ADOQuery1.Next ;
end;
end
else
cklbox1.Items.Add (unit_wxp.myOffice );
end;
procedure TForm_officemanage.CkLBox1Click(Sender: TObject);
begin
self.ADOQuery1.Active :=false;
self.ADOQuery1.SQL.Clear ;
if (unit_wxp.myOffice ='总部') and (CkLBox1.Items.Strings[cklbox1.itemindex]<>'总部')
then
self.ADOQuery1.SQL.Add('select * from partleft where 办事处='''+
CkLBox1.Items.Strings[cklbox1.itemindex]+'''')
else
self.ADOQuery1.SQL.Add('select 编号,名称,库存量,最小库存 from pub_z_part');
self.ADOQuery1.Active :=true;
if adoquery1.RecordCount =0 then
showmessage('办事处的库存信息可能还没有上报');
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?