fillvaluelocate.pas
来自「1. 纯粹的合同管理,不涉及其它业务,独立成系统2. 简单明了,流程清析3. 合」· PAS 代码 · 共 73 行
PAS
73 行
unit FillValueLocate;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TEMPLETFORM, HemisphereButton, ComCtrls, StdCtrls, ExtCtrls,
Menus, ToolWin, ModalForm, MoveImageButton, LabelButton;
type
TFillValueLocateForm = class(TMyModalForm)
rg: TRadioGroup;
rb1: TGroupBox;
Edit1: TEdit;
rb3: TGroupBox;
Label1: TLabel;
Label2: TLabel;
dtpStart: TDateTimePicker;
dtpEnd: TDateTimePicker;
procedure rgClick(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure MIBtnOKClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FillValueLocateForm: TFillValueLocateForm;
implementation
uses data;
{$R *.dfm}
procedure TFillValueLocateForm.rgClick(Sender: TObject);
begin
inherited;
rb3.Visible :=rg.ItemIndex=1;
end;
procedure TFillValueLocateForm.Edit1KeyPress(Sender: TObject;
var Key: Char);
begin
inherited;
if Key=#13 then
MIBtnOKClick(MIBtnOK);
end;
procedure TFillValueLocateForm.MIBtnOKClick(Sender: TObject);
var
strWhere:string;
begin
inherited;
case rg.ItemIndex of
0: strWhere:='Where stuNo='+''''+trim(Edit1.Text)+'''';
1: strWhere:='Where fillDate between #'+DateToStr(dtpStart.Date)
+'# and #'+DateToStr(dtpEnd.Date)+'#';
2: strWhere:='Where orderlyMan='+''''+Trim(Edit1.Text)+'''';
end;
with DM.ADOQFillValue do
begin
Active:=false;
SQL.Strings[1]:=strWhere;
Active:=true;
ModalResult:=mrOK;
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?