⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tbcx.pas

📁 集成酒店桑拿食管管理的完整程序
💻 PAS
字号:
unit tbcx;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Db, DBTables, Grids, DBGrids, ExtCtrls, Buttons;

type
  TtbcxForm = class(TForm)
    Panel1: TPanel;
    DBGrid1: TDBGrid;
    DataSource1: TDataSource;
    Query1: TQuery;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    CheckBox3: TCheckBox;
    dh: TComboBox;
    yck: TComboBox;
    yckid: TComboBox;
    xck: TComboBox;
    xckid: TComboBox;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    procedure BitBtn3Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  tbcxForm: TtbcxForm;

implementation
uses dataproc;
{$R *.DFM}

procedure TtbcxForm.BitBtn3Click(Sender: TObject);
begin
  close;
end;

procedure TtbcxForm.CheckBox1Click(Sender: TObject);
begin
   dh.Enabled:=CheckBox1.Checked;
   yck.Enabled:=CheckBox2.Checked;
   xck.Enabled:=CheckBox3.Checked;
end;

procedure TtbcxForm.BitBtn1Click(Sender: TObject);
begin
  Query1.Active:=false;
  Query1.SQL.Clear;
  Query1.SQL.Add('select 商品编号,商品名称,(select 仓库名称 from 仓库 where id=调拨表.ykcode) as 调出库房,(select 仓库名称 from 仓库 where id=调拨表.xkcode) as 调入库房,num as 调拨数量,rq as 日期,dj as 单价 from 调拨表,商品表 where 调拨表.spcode=商品表.商品编号 ');
  if CheckBox1.Checked then
    Query1.SQL.Add(' and code='''+dh.Text+''' ');
  if CheckBox2.Checked then
    Query1.SQL.Add(' and ykcode='''+yckid.Items[yck.ItemIndex]+''' ');
  if CheckBox3.Checked then
    Query1.SQL.Add(' and xkcode='''+xckid.Items[xck.ItemIndex]+''' ');
  Query1.Open;
end;

procedure TtbcxForm.FormShow(Sender: TObject);
begin
   comadd(yckid,yck,2,'select id,仓库名称 from 仓库');
   yck.ItemIndex:=0;
   xckid.Items:=yckid.Items;
   xck.Items:=yck.Items;
   xck.ItemIndex:=0;
   addoldcom(dh,'code','调拨表');
end;

end.

⌨️ 快捷键说明

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