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

📄 ybb.pas

📁 仓库的进销存,及查询,供应商的管理.和库存的查询及管理.
💻 PAS
字号:
unit ybb;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls, ComCtrls, ExtCtrls, DB, ADODB, QuickRpt,
  QRCtrls, Grids, DBGrids;

type
  Trkybbfm = class(TForm)
    Panel1: TPanel;
    ADOQuery: TADOQuery;
    QuickRep1: TQuickRep;
    TitleBand1: TQRBand;
    DetailBand1: TQRBand;
    PageHeaderBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRLabel2: TQRLabel;
    QRLabel3: TQRLabel;
    QRLabel4: TQRLabel;
    QRLabel5: TQRLabel;
    QRLabel6: TQRLabel;
    QRLabel7: TQRLabel;
    QRLabel8: TQRLabel;
    QRLabel9: TQRLabel;
    clbh: TQRMemo;
    clmc: TQRMemo;
    pl: TQRMemo;
    sl: TQRMemo;
    zje: TQRMemo;
    rq: TQRMemo;
    jhr: TQRMemo;
    QRLabel10: TQRLabel;
    zbrq: TQRLabel;
    zsl: TQRLabel;
    zgje: TQRLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  rkybbfm: Trkybbfm;

implementation

uses mainut;

{$R *.dfm}

procedure Trkybbfm.FormCreate(Sender: TObject);
var
mypath:string;
str:string;
  Present,Present1: TDateTime;
  Year, Month, Day,year1, Month1, Day1: Word;
  sumje,sumsl:integer;
begin
sumje:=0;
sumsl:=0;
mypath:=extractfilepath(paramstr(0));
ADOquery.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+mypath+'data\kcgl.mdb;Persist Security Info=False';
ADOquery.active:=true;
zbrq.Caption:=datetostr(date());
with adoquery do
begin
close;
sql.Clear;
sql.Add('select * from rkb');
//Parameters.ParamByName('rq').Value:=datetostr(date());
open;
present:=fieldbyname('入库日期').AsDateTime;
DecodeDate(Present, Year, Month, Day);
present1:=now;
DecodeDate(Present1, Year1, Month1, Day1);
first;
while not eof do
begin
if (month=month1) and (year1=year) then
begin
clbh.Lines.Add(fieldbyname('材料编号').AsString);
clmc.Lines.Add(fieldbyname('材料名称').AsString);
pl.Lines.Add(fieldbyname('品类').AsString);
sl.Lines.Add(fieldbyname('数量').AsString);
zje.Lines.Add(fieldbyname('总金额').AsString);
rq.Lines.Add(fieldbyname('入库日期').AsString);
jhr.Lines.Add(fieldbyname('进货人').AsString);
sumje:=sumje+fieldbyname('总金额').AsInteger;
sumsl:=sumsl+fieldbyname('数量').AsInteger;
end;
next;
end;
zsl.Caption:='总数量:'+inttostr(sumsl);
zgje.Caption:='总金额:'+inttostr(sumje);
end;
end;

end.

⌨️ 快捷键说明

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