?? monthsuma.pas
字號:
unit MonthSumA;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BaseChildForm, StdCtrls, Buttons, ExtCtrls,DataMod, DB, ADODB,
Grids, Wwdbigrd, Wwdbgrid, ppCtrls, ppPrnabl, ppClass, ppDB, ppBands,
ppCache, ppProd, ppReport, ppComm, ppRelatv, ppDBPipe, ppVar,DateUtils;
type
TfMonthSumA = class(TfBaseChildForm)
Panel1: TPanel;
wwDBGrid1: TwwDBGrid;
ADOQuery1: TADOQuery;
DataSource: TDataSource;
ADOQuery1cYear: TStringField;
ADOQuery1cMonth: TStringField;
ADOQuery1cWorkerNo: TStringField;
ADOQuery1cWorkerName: TStringField;
ADOQuery1cDepartMentNo: TStringField;
ADOQuery1cDepartMentName: TStringField;
ADOQuery1fDays: TFloatField;
ADOQuery1fNights: TFloatField;
ADOQuery1fOverTime: TFloatField;
ADOQuery1fUnOutDays: TFloatField;
ADOQuery1fLeaveDays: TFloatField;
ADOQuery1iLaterTimes: TIntegerField;
ADOQuery1iLaterTime: TIntegerField;
ADOQuery1iLeaveEarlyTimes: TIntegerField;
ADOQuery1iLeaveEarlyTime: TIntegerField;
ADOQuery1fTotalDays: TFloatField;
ADOQuery1cUser: TStringField;
ADOQuery1tUpdateTime: TDateTimeField;
ADOQuery1cAction: TStringField;
ADOQuery1YearMonth: TStringField;
CheckBox1: TCheckBox;
cobDepartMent: TComboBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
ppDBPipeline1: TppDBPipeline;
ppReport1: TppReport;
ppHeaderBand1: TppHeaderBand;
ppDetailBand1: TppDetailBand;
ppFooterBand1: TppFooterBand;
ppLabel1: TppLabel;
ppLabel2: TppLabel;
ppLabel3: TppLabel;
ppLabel4: TppLabel;
ppLine1: TppLine;
ppLine2: TppLine;
ppLine3: TppLine;
ppDBText1: TppDBText;
ppDBText2: TppDBText;
ppDBText3: TppDBText;
ppDBText4: TppDBText;
ppDBText5: TppDBText;
ppDBText6: TppDBText;
ppDBText7: TppDBText;
ppDBText8: TppDBText;
ppDBText9: TppDBText;
ppDBText10: TppDBText;
ppDBText11: TppDBText;
ppDBText12: TppDBText;
ppLine4: TppLine;
ppLine5: TppLine;
ppLine6: TppLine;
ppLine7: TppLine;
ppLine8: TppLine;
ppLine9: TppLine;
ppLine10: TppLine;
ppLabel5: TppLabel;
ppLabel6: TppLabel;
ppLabel7: TppLabel;
ppLine11: TppLine;
ppLine12: TppLine;
ppLine13: TppLine;
ppLine14: TppLine;
ppLine15: TppLine;
ppLine16: TppLine;
ppLine17: TppLine;
ppLabel8: TppLabel;
ppLabel9: TppLabel;
ppLabel10: TppLabel;
ppLabel11: TppLabel;
ppLabel12: TppLabel;
ppLabel13: TppLabel;
ppLabel14: TppLabel;
ppLabel15: TppLabel;
ppLabel16: TppLabel;
ppLabel17: TppLabel;
ppLine18: TppLine;
ppLine19: TppLine;
ppLine20: TppLine;
ppLine21: TppLine;
ppLine22: TppLine;
ppLine23: TppLine;
ppLine24: TppLine;
ppLine25: TppLine;
ppLine26: TppLine;
ppLine27: TppLine;
ppLine28: TppLine;
ppLine29: TppLine;
ADOQuery1fHolidays: TFloatField;
ppDBText13: TppDBText;
ppLine30: TppLine;
ppLine31: TppLine;
ppLine32: TppLine;
ppLine33: TppLine;
ppLine34: TppLine;
ppGroup1: TppGroup;
ppGroupHeaderBand1: TppGroupHeaderBand;
ppGroupFooterBand1: TppGroupFooterBand;
ppLabel18: TppLabel;
ppDBText14: TppDBText;
ppDBText15: TppDBText;
ppLine35: TppLine;
ppLine36: TppLine;
ppLabel19: TppLabel;
ppSystemVariable1: TppSystemVariable;
ADOQuery1fExtOverTime: TFloatField;
ADOQuery1TotalOverTime: TFloatField;
BitBtn4: TBitBtn;
procedure ADOQuery1CalcFields(DataSet: TDataSet);
procedure FormCreate(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure ppReport1PreviewFormCreate(Sender: TObject);
procedure wwDBGrid1CalcCellColors(Sender: TObject; Field: TField;
State: TGridDrawState; Highlight: Boolean; AFont: TFont;
ABrush: TBrush);
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
private
{ Private declarations }
function GetDayOverTime(const dDate:TDateTime;const WorkerNo:string):Integer;
function IsThrouNight(const dDate:TDateTime;const WorkerNo:string):Boolean;
public
{ Public declarations }
strYearMonth:string;
end;
var
fMonthSumA: TfMonthSumA;
implementation
uses Progress, MonthSum_Edit, MonthSum;
{$R *.dfm}
procedure TfMonthSumA.ADOQuery1CalcFields(DataSet: TDataSet);
begin
inherited;
AdoQuery1.FieldByName('Yearmonth').AsString:=AdoQuery1.fieldbyName('cYear').asString+'
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -