📄 mrp_qry_calendar.pas
字号:
unit Mrp_Qry_Calendar;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Outer, Menus, ExtPrintReport, Db, ActnList, AdODB, Grids, DBGridEh,
StdCtrls, ExtCtrls, ComCtrls, ToolWin, DBCtrls;
Type
TFrm_Mrp_Qry_Calendar = Class(TFrm_Base_Outer)
AdoQry_MainSDate: TDateTimeField;
AdoQry_MainWorkDay: TIntegerField;
AdoQry_MainDayOfWeek: TStringField;
Lbl_IsNo: TLabel;
Label3: TLabel;
DBText2: TDBText;
Label2: TLabel;
DBText1: TDBText;
Label1: TLabel;
procedure FormDestroy(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Act_LookExecute(Sender: TObject);
procedure DataSourceDataChange(Sender: TObject; Field: TField);
private
{ Private declarations }
public
procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
{ Public declarations }
end;
var
Frm_Mrp_Qry_Calendar: TFrm_Mrp_Qry_Calendar;
implementation
uses Mrp_Enter_Calendar_D;
{$R *.DFM}
procedure TFrm_Mrp_Qry_Calendar.InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);
begin
Application.ProcessMessages;
Inherited;
SelectFromSql:='select * '
+'from Calendar ';
Condition:='((getdate()<=sdate) and (sdate<getdate()+360))';
OrderbyFields:='Sdate';
GetData;
Frm_Sys_Detail:=TFrm_Mrp_Enter_Calendar_D.Create(Application);
end;
procedure TFrm_Mrp_Qry_Calendar.FormDestroy(Sender: TObject);
begin
inherited;
Frm_Mrp_Qry_Calendar:=Nil;
end;
procedure TFrm_Mrp_Qry_Calendar.FormCreate(Sender: TObject);
begin
inherited;
// toolBar.Buttons[13].Action:=ActionList.Actions[1];
end;
procedure TFrm_Mrp_Qry_Calendar.Act_LookExecute(Sender: TObject);
var
I:Integer;
begin
For I:=0 To Frm_Sys_Detail.ComponentCount -1 Do
begin
If Frm_Sys_Detail.Components[i] Is TCheckBox Then
TCheckBox(Frm_Sys_Detail.Components[i]).Enabled:=False;
end;
inherited;
end;
procedure TFrm_Mrp_Qry_Calendar.DataSourceDataChange(Sender: TObject;
Field: TField);
begin
inherited;
Case AdoQry_Main.fieldbyname('WorkDay').AsInteger of
0: Lbl_IsNo.Caption:='否';
1: Lbl_IsNo.Caption:='是';
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -