inputno.pas
来自「1. 纯粹的合同管理,不涉及其它业务,独立成系统2. 简单明了,流程清析3. 合」· PAS 代码 · 共 69 行
PAS
69 行
unit InputNo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ModalForm, StdCtrls, Menus, MoveImageButton, LabelButton,
ComCtrls, ToolWin, ExtCtrls;
type
TInputNoForm = class(TMyModalForm)
Label1: TLabel;
edtInputNo: TEdit;
procedure edtInputNoKeyPress(Sender: TObject; var Key: Char);
procedure MIBtnOKClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
InputNoForm: TInputNoForm;
implementation
uses data;
{$R *.dfm}
procedure TInputNoForm.edtInputNoKeyPress(Sender: TObject; var Key: Char);
begin
inherited;
if Key=#13 then
begin
Key:=#0;
MIBtnOKClick(MIBtnOK);
end;
end;
procedure TInputNoForm.MIBtnOKClick(Sender: TObject);
var
Upline:TUpline;
begin
inherited;
// 学生上机
Upline.FStuNo:=Trim(edtInputNo.Text);
if Upline.FStuNo<>'' then
begin
DM.UpLine(Upline);
if (Upline.FReturnInfo ='上机成功')and
(Upline.FPrepTime < DM.SysSetup.FMinTime) then
ShowMessage('你只剩下'+inttostr(Upline.FPrepTime)+'分钟机时,请注意充值!');
ShowMessage(Upline.FReturnInfo);
if Upline.FReturnInfo ='上机成功' then
ModalResult:=mrOK;
end;
end;
procedure TInputNoForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
inherited;
Action:=caFree;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?