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

📄 productorinfosearch.pas

📁 企业客户关系管理系统
💻 PAS
字号:
unit productorinfosearch;

interface

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

type
  TF_productorinfosearch = class(TForm)
    GroupBox1: TGroupBox;
    ComboBox1: TComboBox;
    Edit1: TEdit;
    btn_Search: TBitBtn;
    btn_Out: TBitBtn;
    Panel1: TPanel;
    tbl_salesrecord: TTable;
    DBGrid1: TDBGrid;
    tbl_customersresponse: TTable;
    ds_salesrecord: TDataSource;
    ds_customersresponse: TDataSource;
    Panel2: TPanel;
    DBGrid2: TDBGrid;
    Panel3: TPanel;
    Panel5: TPanel;
    DBText1: TDBText;
    DBText2: TDBText;
    DBText3: TDBText;
    DBText4: TDBText;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Panel6: TPanel;
    DBMemo2: TDBMemo;
    procedure btn_SearchClick(Sender: TObject);
    procedure btn_OutClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  F_productorinfosearch: TF_productorinfosearch;

implementation
uses datamodule;
{$R *.dfm}

procedure TF_productorinfosearch.btn_SearchClick(Sender: TObject);
begin
with DM_datamodule do
begin
if crmDB.Connected then
begin
if trim(edit1.Text)<>'' then
begin
with qry_ProductorInfo do
begin
tbl_customersresponse.Active:=true;
tbl_salesrecord.Active:=true;
//create(nil);
if combobox1.Text='产品编号' then
sql.Text:='select * from ProductorInfo where 产品编号=:f1'
else
sql.Text:='select * from ProductorInfo where 名称=:f1';
Parambyname('f1').AsString:=edit1.Text;
//prepare;
open;
if recordcount=0 then
begin
showmessage('没有查到匹配记录!');
close;
sql.Text:='select * from ProductorInfo';
open;
end;
end;
end;
end
else
messagedlg('请先登陆!',mtinformation,[mbok],0);
end;
end;

procedure TF_productorinfosearch.btn_OutClick(Sender: TObject);
begin
edit1.Clear;
tbl_customersresponse.Active:=false;
tbl_salesrecord.Active:=false;
DM_datamodule.qry_ProductorInfo.Active:=false;
Close;
end;

end.

⌨️ 快捷键说明

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