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

📄 laterleaveearlydailyreport.pas

📁 用户名:SYSTEM 密码:空 第一次运行请先恢复数据库 DATABASE 到SQL服务器
💻 PAS
字号:
unit LaterLeaveEarlyDailyReport;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, BaseChildForm, StdCtrls, Buttons, ExtCtrls,DataMod, ComCtrls,
  DB, ppDB, ppDBPipe, ppComm, ppRelatv, ppProd, ppClass, ppReport, ppCtrls,
  ppBands, ppPrnabl, ppCache, ADODB, ppVar,DateUtils;

type
  TfLaterLeaveEarlyDailyReport = class(TfBaseChildForm)
    Panel1: TPanel;
    Label2: TLabel;
    DateTimePicker1: TDateTimePicker;
    CheckBox1: TCheckBox;
    cobDepartMent: TComboBox;
    BitBtn1: TBitBtn;
    ppReport1: TppReport;
    ppDBPipeline1: TppDBPipeline;
    DataSource1: TDataSource;
    ADOQuery1: TADOQuery;
    ppHeaderBand1: TppHeaderBand;
    ppDetailBand1: TppDetailBand;
    ppFooterBand1: TppFooterBand;
    ppLabel1: TppLabel;
    ppLabel2: TppLabel;
    ppDBText1: TppDBText;
    ppGroup1: TppGroup;
    ppGroupHeaderBand1: TppGroupHeaderBand;
    ppGroupFooterBand1: TppGroupFooterBand;
    ppLine1: TppLine;
    ppLabel3: TppLabel;
    ppLabel4: TppLabel;
    ppLabel5: TppLabel;
    ppLabel6: TppLabel;
    ppLabel7: TppLabel;
    ppLabel8: TppLabel;
    ppLabel9: TppLabel;
    ppLabel10: TppLabel;
    ppLabel13: TppLabel;
    ppLabel14: TppLabel;
    ppLabel15: TppLabel;
    ppLabel16: TppLabel;
    ppLabel17: TppLabel;
    ppLabel18: TppLabel;
    ppLine2: TppLine;
    ppLabel19: TppLabel;
    ppLine3: TppLine;
    ppLine4: TppLine;
    ppLine5: TppLine;
    ppLine6: TppLine;
    ppLine7: TppLine;
    ppLine8: TppLine;
    ppLine9: TppLine;
    ppDBText2: TppDBText;
    ppDBText3: TppDBText;
    ppLabel11: TppLabel;
    ppDBText4: TppDBText;
    ppLine10: TppLine;
    ppLine11: TppLine;
    ppLine12: TppLine;
    ppLine13: TppLine;
    ppLine14: TppLine;
    ppLine15: TppLine;
    ppLine16: TppLine;
    ppLine17: TppLine;
    ppDBText5: TppDBText;
    ppLine18: TppLine;
    ppLine19: TppLine;
    ppLine20: TppLine;
    ppLine21: TppLine;
    ppLine22: TppLine;
    ppDBText6: TppDBText;
    ppDBText7: TppDBText;
    ppDBText8: TppDBText;
    ppDBText9: TppDBText;
    ppLine23: TppLine;
    ppLine24: TppLine;
    ppLine25: TppLine;
    ppLine26: TppLine;
    ppLine27: TppLine;
    ppLine28: TppLine;
    ppLine29: TppLine;
    ppLine30: TppLine;
    ppDBText10: TppDBText;
    ppDBText11: TppDBText;
    ppDBText12: TppDBText;
    ppDBText13: TppDBText;
    ppLabel12: TppLabel;
    ppLabel20: TppLabel;
    ppLabel21: TppLabel;
    ppSystemVariable1: TppSystemVariable;
    ppLabel22: TppLabel;
    ppDBCalc1: TppDBCalc;
    ppLabel23: TppLabel;
    ppSummaryBand1: TppSummaryBand;
    ppLabel24: TppLabel;
    ppDBCalc2: TppDBCalc;
    ppLabel25: TppLabel;
    ppLine31: TppLine;
    ppLabel26: TppLabel;
    ppLabel27: TppLabel;
    ppLabel28: TppLabel;
    ppLine32: TppLine;
    ppDBText14: TppDBText;
    ppLine33: TppLine;
    ppDBText15: TppDBText;
    ppLine34: TppLine;
    ppLine35: TppLine;
    procedure FormCreate(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure ppReport1PreviewFormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fLaterLeaveEarlyDailyReport: TfLaterLeaveEarlyDailyReport;

implementation

{$R *.dfm}

procedure TfLaterLeaveEarlyDailyReport.FormCreate(Sender: TObject);
begin
  inherited;
  dateTimepicker1.Date:=IncDay(date(),-1);
  fdatamod.ListDepartMent(cobDepartMent.items);
  if cobDepartMent.Items.Count >0 then
     cobDepartMent.ItemIndex :=0;
end;

procedure TfLaterLeaveEarlyDailyReport.BitBtn1Click(Sender: TObject);
begin
  With AdoQuery1 do
  Begin
      Close;
      Sql.Clear ;
      Sql.Add('Select * From V_DailyCard Where Convert(varchar(10),dDate,111)='''+formatdateTime('yyyy/mm/dd',dateTimepicker1.date)+'''');
      Sql.add('And (iLaterTime>0 or iLeaveEarlyTime>0)');
      if Checkbox1.Checked And (cobDepartMent.ItemIndex>=0)then
         Sql.Add('And cDepartMentNo='''+TItem(cobDepartMent.Items.Objects[cobDepartMent.ItemIndex]).ItemID +'''');
      Sql.Add('Order by cDepartMentNo,cWorkerNo');
      Open;
      if IsEmpty then begin
         application.MessageBox('⊿Τ祇瞷

⌨️ 快捷键说明

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