?? overtimedailyreport.pas
字號:
unit OverTimeDailyReport;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BaseChildForm, StdCtrls, Buttons, ExtCtrls,DataMod, ppDB, DB,
ADODB, ppDBPipe, ppBands, ppClass, ppCtrls, ppVar, ppPrnabl, ppCache,
ppComm, ppRelatv, ppProd, ppReport, ComCtrls,DateUtils;
type
TfOverTimeDailyReport = class(TfBaseChildForm)
Panel1: TPanel;
Label2: TLabel;
DateTimePicker1: TDateTimePicker;
CheckBox1: TCheckBox;
cobDepartMent: TComboBox;
BitBtn1: TBitBtn;
ppReport1: TppReport;
ppHeaderBand1: TppHeaderBand;
ppLabel1: TppLabel;
ppLabel2: TppLabel;
ppDBText1: TppDBText;
ppLine1: TppLine;
ppLabel3: TppLabel;
ppLabel4: TppLabel;
ppLabel5: TppLabel;
ppLabel6: TppLabel;
ppLabel7: TppLabel;
ppLabel8: TppLabel;
ppLine2: TppLine;
ppLine3: TppLine;
ppLine4: TppLine;
ppLine5: TppLine;
ppLine6: TppLine;
ppLine9: TppLine;
ppLabel11: TppLabel;
ppLine12: TppLine;
ppLine13: TppLine;
ppLine14: TppLine;
ppLine25: TppLine;
ppLabel12: TppLabel;
ppLabel20: TppLabel;
ppDetailBand1: TppDetailBand;
ppDBText2: TppDBText;
ppDBText3: TppDBText;
ppDBText4: TppDBText;
ppLine10: TppLine;
ppLine11: TppLine;
ppLine15: TppLine;
ppLine16: TppLine;
ppLine17: TppLine;
ppDBText5: TppDBText;
ppLine18: TppLine;
ppLine19: TppLine;
ppLine22: TppLine;
ppDBText6: TppDBText;
ppDBText7: TppDBText;
ppLine23: TppLine;
ppFooterBand1: TppFooterBand;
ppLabel21: TppLabel;
ppSystemVariable1: TppSystemVariable;
ppSummaryBand1: TppSummaryBand;
ppLabel24: TppLabel;
ppDBCalc2: TppDBCalc;
ppLabel25: TppLabel;
ppLine31: TppLine;
ppGroup1: TppGroup;
ppGroupHeaderBand1: TppGroupHeaderBand;
ppGroupFooterBand1: TppGroupFooterBand;
ppLabel22: TppLabel;
ppDBCalc1: TppDBCalc;
ppLabel23: TppLabel;
ppDBPipeline1: TppDBPipeline;
DataSource1: TDataSource;
ADOQuery1: TADOQuery;
ppDBText8: TppDBText;
ppLabel9: TppLabel;
ppLabel10: TppLabel;
ppLine7: TppLine;
ppLine8: TppLine;
ppLabel13: TppLabel;
procedure FormCreate(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fOverTimeDailyReport: TfOverTimeDailyReport;
implementation
{$R *.dfm}
procedure TfOverTimeDailyReport.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 TfOverTimeDailyReport.CheckBox1Click(Sender: TObject);
begin
inherited;
cobDepartMent.Enabled :=checkbox1.Checked ;
end;
procedure TfOverTimeDailyReport.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 iOverTime>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 + -