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

📄 customersinfosearch.pas

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

interface

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

type
  TF_customersinfosearch = class(TForm)
    Panel1: TPanel;
    DBGrid1: TDBGrid;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    GroupBox1: TGroupBox;
    ComboBox1: TComboBox;
    Edit1: TEdit;
    btn_Search: TBitBtn;
    DBGrid2: TDBGrid;
    DBText1: TDBText;
    DBText2: TDBText;
    DBText3: TDBText;
    DBText4: TDBText;
    DBText5: TDBText;
    DBText6: TDBText;
    DBText7: TDBText;
    DBText8: TDBText;
    DBText9: TDBText;
    DBText10: TDBText;
    DBText11: TDBText;
    DBText12: TDBText;
    DBText13: TDBText;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    Label16: TLabel;
    tbl_customersinfo: TTable;
    ds_customersinfo: TDataSource;
    tbl_customersrelationerinfo: TTable;
    ds_customersrelationerinfo: TDataSource;
    btn_Out: TBitBtn;
    procedure btn_SearchClick(Sender: TObject);
    procedure btn_OutClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  F_customersinfosearch: TF_customersinfosearch;

implementation
uses datamodule;
{$R *.dfm}

procedure TF_customersinfosearch.btn_SearchClick(Sender: TObject);
begin
with DM_datamodule do
begin
if crmDB.Connected then
begin
if trim(edit1.Text)<>'' then
begin
with qry_CustomersInfo do
begin
tbl_customersinfo.Active:=true;
tbl_customersrelationerinfo.Active:=true;
close;
if combobox1.Text='客户编号' then
sql.Text:='select * from CustomersInfo where 客户编号='+quotedstr(edit1.Text)
else
sql.Text:='select * from CustomersInfo where 客户名称='+quotedstr(edit1.Text);
open;
if recordcount=0 then
begin
showmessage('没有查到匹配记录!');
close;
sql.Text:='select * from CustomersInfo';
open;
end;
end;
end;
end
else
messagedlg('请先登陆!',mtinformation,[mbok],0);
end;
end;

procedure TF_customersinfosearch.btn_OutClick(Sender: TObject);
begin
tbl_customersinfo.Active:=false;
tbl_customersrelationerinfo.Active:=false;
DM_datamodule.qry_CustomersInfo.Active:=false;
edit1.Clear;
Close;
end;

end.

⌨️ 快捷键说明

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