📄 unit6.~pas
字号:
unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
Tfrmduixiaodengji = class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Label3: TLabel;
Edit2: TEdit;
Label4: TLabel;
Edit3: TEdit;
Label5: TLabel;
Edit4: TEdit;
Label6: TLabel;
DateTimePicker1: TDateTimePicker;
Label7: TLabel;
Edit5: TEdit;
Button1: TButton;
Edit6: TEdit;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function IsEmpty(const Scr:string): boolean;
end;
var
frmduixiaodengji: Tfrmduixiaodengji;
implementation
{$R *.dfm}
function TFrmduixiaodengji.IsEmpty(const Scr:string): boolean;
begin
if trim(Scr)='' then
Result := True
else
Result := False;
end;
procedure Tfrmduixiaodengji.FormCreate(Sender: TObject);
begin
datetimepicker1.DateTime := date;
end;
procedure Tfrmduixiaodengji.Button1Click(Sender: TObject);
begin
if IsEmpty(Edit6.Text)=True then
begin
application.MessageBox('材料名称不能为空!','提示',MB_OK OR MB_ICONERROR);
exit;
end;
if IsEmpty(Edit6.Text)=True then
begin
application.MessageBox('材料名称不能为空!','提示',MB_OK OR MB_ICONERROR);
exit;
end;
if IsEmpty(Edit1.Text)=True then
begin
application.MessageBox('材料名称不能为空!','提示',MB_OK OR MB_ICONERROR);
exit;
end;
if IsEmpty(Edit2.Text)=True then
begin
application.MessageBox('材料名称不能为空!','提示',MB_OK OR MB_ICONERROR);
exit;
end;
if IsEmpty(Edit3.Text)=True then
begin
application.MessageBox('数量不能为空!','提示',MB_OK OR MB_ICONERROR);
exit;
end;
if IsEmpty(Edit4.Text)=True then
// begin
// application.MessageBox('材料名称不能为空!','提示',MB_OK OR MB_ICONERROR);
// exit;
// end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -