📄 mc_zxddy.pas
字号:
unit MC_ZXDDY;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Db, DBTables, Grids, DBGrids, Buttons, QuickRpt, Qrctrls,
ExtCtrls;
type
TZXDDY = class(TForm)
GroupBox1: TGroupBox;
DBGrid1: TDBGrid;
Query1: TQuery;
DataSource1: TDataSource;
GroupBox2: TGroupBox;
ComboBox1: TComboBox;
Label1: TLabel;
ComboBox2: TComboBox;
Query1BDEDesigner: TStringField;
Query1BDEDesigner2: TStringField;
Query1BDEDesigner3: TStringField;
Query1BDEDesigner4: TStringField;
Query1BDEDesigner5: TStringField;
Query1BDEDesigner6: TStringField;
Query1BDEDesigner7: TMemoField;
Edit1: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
QuickRep1: TQuickRep;
PageHeaderBand1: TQRBand;
QRLabel1: TQRLabel;
QRShape1: TQRShape;
DetailBand1: TQRBand;
TitleBand1: TQRBand;
QRShape2: TQRShape;
QRLabel2: TQRLabel;
QRLabel3: TQRLabel;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
QRShape3: TQRShape;
QRShape4: TQRShape;
QRShape5: TQRShape;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRShape8: TQRShape;
QRShape9: TQRShape;
QRShape10: TQRShape;
QRShape11: TQRShape;
QRShape12: TQRShape;
QRShape13: TQRShape;
QRDBText1: TQRDBText;
QRDBText2: TQRDBText;
QRDBText3: TQRDBText;
QRDBText4: TQRDBText;
QRDBText5: TQRDBText;
QRDBText6: TQRDBText;
SummaryBand1: TQRBand;
QRShape14: TQRShape;
QRLabel8: TQRLabel;
QRExpr1: TQRExpr;
procedure BitBtn3Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure QuickRep1Preview(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
ZXDDY: TZXDDY;
implementation
uses MC_DYYLBrose;
{$R *.DFM}
procedure TZXDDY.BitBtn3Click(Sender: TObject);
begin
Close;
end;
procedure TZXDDY.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ZXDDY.Release;
ZXDDY:=Nil;
end;
procedure TZXDDY.FormShow(Sender: TObject);
begin
ComboBox1.ItemIndex:=0;
ComboBox2.ItemIndex:=0;
end;
procedure TZXDDY.BitBtn1Click(Sender: TObject);
begin
if ComboBox2.Text='Like' then
if Edit1.Text='*' then
begin
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.Add('Select * From 装修队');
Query1.Open;
end
else
begin
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.Add('Select * From 装修队');
Query1.SQL.Add('Where '+Combobox1.Items[ComboBox1.ItemIndex]+' Like '''+Edit1.Text+'%''');
Query1.Open;
end;
if comboBox2.Text='=' then
with Query1 do begin
close;
SQL.Clear;
Query1.SQL.Add('Select * From 装修队');
SQL.Add('Where '+ComboBox1.Items[ComboBox1.ItemIndex]+' = '''
+Edit1.Text+'''');
Open; end;
if ComboBox2.Text='>' then
With Query1 do begin
Close;
SQL.Clear;
Query1.SQL.Add('Select * From 装修队');
SQL.Add('Where '+comboBox1.Items[ComboBox1.ItemIndex]+' > '''
+Edit1.Text+'''');
Open; end;
if ComboBox2.Text='<' then
with Query1 do Begin
Close;
SQL.Clear;
Query1.SQL.Add('Select * From 装修队');
SQL.Add('Where '+ComboBox1.Items[ComboBox1.ItemIndex]+' < '''
+Edit1.Text+'''');
Open; end;
end;
procedure TZXDDY.QuickRep1Preview(Sender: TObject);
begin
DYYLBrose.QRPreview1.QRPrinter:=QuickRep1.QRPrinter;
end;
procedure TZXDDY.BitBtn2Click(Sender: TObject);
begin
if Query1.Active then
if Query1.RecordCount<>0 then
begin
DYYLBrose.Show;
QUickRep1.Preview;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -