This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-09-28 15:29:56 +08:00
parent f8325c5744
commit ba2679a21e
3 changed files with 28 additions and 16 deletions

View File

@ -1,6 +1,6 @@
object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
Left = 104
Top = 78
Left = 593
Top = 187
Width = 1414
Height = 724
Caption = #26631#31614#25171#21360
@ -19,7 +19,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1398
Width = 1406
AutoSize = True
ButtonHeight = 30
ButtonWidth = 83
@ -89,7 +89,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
object Panel1: TPanel
Left = 0
Top = 32
Width = 1398
Width = 1406
Height = 40
Align = alTop
BevelInner = bvRaised
@ -259,7 +259,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
Left = 689
Top = 72
Width = 231
Height = 613
Height = 621
Align = alLeft
BevelInner = bvRaised
BevelOuter = bvLowered
@ -427,7 +427,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
Left = 0
Top = 72
Width = 689
Height = 613
Height = 621
Align = alLeft
PopupMenu = PopupMenu1
TabOrder = 2
@ -601,8 +601,8 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai
object cxGrid2: TcxGrid
Left = 920
Top = 72
Width = 478
Height = 613
Width = 486
Height = 621
Align = alClient
TabOrder = 4
object Tv2: TcxGridDBTableView

View File

@ -291,11 +291,13 @@ var
FFDS: Integer;
FGYCarNo: string;
begin
Button2.Enabled := False;
if ClientDataSet3.IsEmpty then
Exit;
if ClientDataSet3.Locate('SSel', True, []) = False then
begin
Application.MessageBox('没有选择数据!', '提示', 0);
Button2.Enabled := True;
Exit;
end
else
@ -341,11 +343,13 @@ begin
if Trim(PS.Text) = '' then
begin
Application.MessageBox('匹数不能为空!', '提示', 0);
Button2.Enabled := True;
Exit;
end;
if TryStrToInt(Trim(PS.Text), FFDS) = False then
begin
Application.MessageBox('匹数非法', '提示', 0);
Button2.Enabled := True;
Exit;
end;
// if Trim(JXPerson.Text) = '' then
@ -378,9 +382,10 @@ begin
if FFDS * strtoint(PS.Text) + strtoint(APPS.Text) > StrToInt(PSSX.Text) then
begin
Application.MessageBox('安排匹数过多,不允许保存!', '提示', 0);
Button2.Enabled := True;
Exit;
end;
Button2.Enabled := False;
if SaveDataAP() then
begin
InitGrid();
@ -1095,6 +1100,7 @@ begin
if Key = #13 then
begin
Button2.Click;
Button2.Enabled := False;
end;
end;

View File

@ -69,18 +69,24 @@ begin
SetLength(dtbase, 255);
SetLength(user, 255);
SetLength(pswd, 255);
user := 'longfengsa';
dtbase := 'xianghengdata';
server := '116.62.5.81,7781';
pswd := 'rightsoft@81';
if Trim(DataBaseStr) = '' then
begin
user := 'longfengsa';
dtbase := 'xianghengdata';
server := '116.62.5.81,7781';
pswd := 'rightsoft@81';
// dtbase := 'maishuodata';
// dtbase := 'guanyuandata';
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
DConString := DataBaseStr;
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
// DName := 'Ì·Ã÷½­';
// DParameters1 := 'BS';
//DParameters3:='1';
end
else
begin
DConString := DataBaseStr;
end;
if not ConnData() then
begin
result := 0;