通过chkbox判断是否能打印
This commit is contained in:
parent
f7cbfd3267
commit
0148a8eeda
|
@ -151,7 +151,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
|
|||
end
|
||||
object Label5: TLabel
|
||||
Left = 826
|
||||
Top = 10
|
||||
Top = 11
|
||||
Width = 132
|
||||
Height = 21
|
||||
Caption = #8594#24050#23433#25490#21305#25968
|
||||
|
@ -164,7 +164,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
|
|||
end
|
||||
object Label8: TLabel
|
||||
Left = 1064
|
||||
Top = 10
|
||||
Top = 11
|
||||
Width = 88
|
||||
Height = 21
|
||||
Caption = #21305#25968#19978#38480
|
||||
|
@ -177,7 +177,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
|
|||
end
|
||||
object Label10: TLabel
|
||||
Left = 696
|
||||
Top = 10
|
||||
Top = 11
|
||||
Width = 66
|
||||
Height = 21
|
||||
Caption = #35746#21333#21495
|
||||
|
@ -228,7 +228,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
|
|||
end
|
||||
object APPS: TEdit
|
||||
Left = 958
|
||||
Top = 6
|
||||
Top = 7
|
||||
Width = 91
|
||||
Height = 29
|
||||
Font.Charset = GB2312_CHARSET
|
||||
|
@ -254,6 +254,16 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
|
|||
ReadOnly = True
|
||||
TabOrder = 1
|
||||
end
|
||||
object chksave: TCheckBox
|
||||
Left = 1272
|
||||
Top = 14
|
||||
Width = 49
|
||||
Height = 17
|
||||
Caption = 'save'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 6
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 689
|
||||
|
|
|
@ -111,6 +111,7 @@ type
|
|||
ADOQuery1: TADOQuery;
|
||||
Tv3Column1: TcxGridDBColumn;
|
||||
ToolButton4: TToolButton;
|
||||
chksave: TCheckBox;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
|
@ -216,7 +217,7 @@ begin
|
|||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
end;
|
||||
Button2.Enabled := true;
|
||||
chksave.Checked := true;
|
||||
cxGrid3.Enabled := true;
|
||||
|
||||
end;
|
||||
|
@ -291,13 +292,16 @@ var
|
|||
FFDS: Integer;
|
||||
FGYCarNo: string;
|
||||
begin
|
||||
Button2.Enabled := False;
|
||||
if not chksave.Checked then
|
||||
Exit;
|
||||
chksave.Checked := False;
|
||||
|
||||
if ClientDataSet3.IsEmpty then
|
||||
Exit;
|
||||
if ClientDataSet3.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Button2.Enabled := True;
|
||||
chksave.Checked := True;
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
|
@ -343,13 +347,13 @@ begin
|
|||
if Trim(PS.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('匹数不能为空!', '提示', 0);
|
||||
Button2.Enabled := True;
|
||||
chksave.Checked := True;
|
||||
Exit;
|
||||
end;
|
||||
if TryStrToInt(Trim(PS.Text), FFDS) = False then
|
||||
begin
|
||||
Application.MessageBox('匹数非法', '提示', 0);
|
||||
Button2.Enabled := True;
|
||||
chksave.Checked := True;
|
||||
Exit;
|
||||
end;
|
||||
// if Trim(JXPerson.Text) = '' then
|
||||
|
@ -382,7 +386,7 @@ begin
|
|||
if FFDS * strtoint(PS.Text) + strtoint(APPS.Text) > StrToInt(PSSX.Text) then
|
||||
begin
|
||||
Application.MessageBox('安排匹数过多,不允许保存!', '提示', 0);
|
||||
Button2.Enabled := True;
|
||||
chksave.Checked := True;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
|
@ -1099,7 +1103,6 @@ procedure TfrmClothSCDCGAnPai.PSKeyPress(Sender: TObject; var Key: Char);
|
|||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
Button2.Enabled := False;
|
||||
Button2.Click;
|
||||
end;
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue
Block a user