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

📄 mc_wxdy.pas

📁 1、系统环境要求:所有程序均在Windows98/XP操作系统下测试运行。 2、建议用户在系统上安装DELPHI7.0企业版。 3、如果数据库为SQL Server数据库
💻 PAS
字号:
unit MC_WXDY;

interface

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

type
  TWXDY = class(TForm)
    Label1: TLabel;
    DBGrid1: TDBGrid;
    BitBtn4: TBitBtn;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    Edit1: TEdit;
    Query1: TQuery;
    DataSource1: TDataSource;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    QuickRep1: TQuickRep;
    PageHeaderBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRShape1: TQRShape;
    SummaryBand1: TQRBand;
    Query1BDEDesigner: TStringField;
    Query1BDEDesigner2: TStringField;
    Query1BDEDesigner3: TStringField;
    Query1BDEDesigner4: TStringField;
    Query1BDEDesigner5: TStringField;
    Query1BDEDesigner6: TStringField;
    Query1BDEDesigner7: TStringField;
    Query1BDEDesigner8: TFloatField;
    Query1BDEDesigner9: TStringField;
    Query1BDEDesigner10: TDateTimeField;
    Query1BDEDesigner11: TDateTimeField;
    Query1BDEDesigner12: TStringField;
    Query1BDEDesigner13: TMemoField;
    DetailBand1: TQRBand;
    QRLabel2: TQRLabel;
    QRLabel3: TQRLabel;
    QRLabel4: TQRLabel;
    QRLabel5: TQRLabel;
    QRLabel6: TQRLabel;
    QRLabel7: TQRLabel;
    QRLabel8: TQRLabel;
    QRLabel9: TQRLabel;
    QRLabel10: TQRLabel;
    QRLabel11: TQRLabel;
    QRLabel12: TQRLabel;
    QRLabel13: TQRLabel;
    QRLabel14: TQRLabel;
    QRShape2: TQRShape;
    QRShape3: TQRShape;
    QRShape4: TQRShape;
    QRShape5: TQRShape;
    QRShape6: TQRShape;
    QRShape7: TQRShape;
    QRShape8: TQRShape;
    QRShape9: TQRShape;
    QRShape10: TQRShape;
    QRShape11: TQRShape;
    QRShape12: TQRShape;
    QRLabel15: TQRLabel;
    QRExpr1: TQRExpr;
    QRDBText1: TQRDBText;
    QRDBText2: TQRDBText;
    QRDBText3: TQRDBText;
    QRDBText4: TQRDBText;
    QRDBText5: TQRDBText;
    QRDBText6: TQRDBText;
    QRDBText7: TQRDBText;
    QRDBText8: TQRDBText;
    QRDBText9: TQRDBText;
    QRDBText10: TQRDBText;
    QRDBText11: TQRDBText;
    QRDBText12: TQRDBText;
    QRDBText13: TQRDBText;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
    procedure QuickRep1Preview(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  WXDY: TWXDY;

implementation

uses MC_DYYLBrose;

{$R *.DFM}

procedure TWXDY.FormClose(Sender: TObject; var Action: TCloseAction);
begin
     WXDY.Release;
     WXDY:=Nil;
end;

procedure TWXDY.FormShow(Sender: TObject);
begin
     Combobox1.ItemIndex:=0;
     ComboBox2.ItemIndex:=0;
end;

procedure TWXDY.BitBtn2Click(Sender: TObject);
begin
     Close;
end;

procedure TWXDY.QuickRep1Preview(Sender: TObject);
begin
     DYYLBrose.QRPreview1.QRPrinter:=QuickRep1.QRPrinter;
end;

procedure TWXDY.BitBtn1Click(Sender: TObject);
begin
     if Query1.ACtive then
     if Query1.Recordcount<>0 then
        begin
             DYYLBrose.Show;
             QuickRep1.Preview;
        end;
end;

procedure TWXDY.BitBtn4Click(Sender: TObject);
begin
     if ComboBox2.Text='Like' then
     if Edit1.Text='*' then begin
        with Query1 do begin
             Close;
             SQL.Clear;
             SQl.Add('Select * From 维修信息');
             Open; end;
        end
     else begin
        with Query1 do begin
             Close;
             SQL.Clear;
             SQL.Add('Select * From 维修信息');
             SQL.Add('Where '+ComboBox1.Items[ComboBox1.ItemIndex]+' Like '''+Edit1.Text+'%''');
             Open; end;
        end;
//------------------------------------------------------------------------------
    if ComboBox2.Text='=' then begin
       with Query1 do begin
            Close;
            SQL.Clear;
            SQL.Add('Select * From 维修信息');
            SQL.Add('Where '+ComboBox1.Items[ComboBox1.ItemIndex]+' = '''+Edit1.Text+'%''');
            Open; end;
       end;
//------------------------------------------------------------------------------
    if ComboBox2.Text='>' then begin
       with Query1 do begin
            Close;
            SQL.Clear;
            SQL.Add('Select * From 维修信息');
            SQL.Add('Where '+ComboBox1.Items[ComboBox1.ItemIndex]+' > '''+Edit1.Text+'%''');
            Open; end;
       end;
//------------------------------------------------------------------------------
    if ComboBox2.Text='<' then begin
       with Query1 do begin
            Close;
            SQL.Clear;
            SQL.Add('Select * From 维修信息');
            SQL.Add('Where '+ComboBox1.Items[ComboBox1.ItemIndex]+' < '''+Edit1.Text+'%''');
            Open; end;
       end;
end;

end.

⌨️ 快捷键说明

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