diff --git a/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.dfm b/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.dfm index 8891b9c..86f561c 100644 --- a/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.dfm +++ b/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.dfm @@ -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 diff --git a/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.pas b/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.pas index 1f679ef..67d4915 100644 --- a/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.pas +++ b/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.pas @@ -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; diff --git a/坯布生产计划(WeavingSchedule)/U_GetDllForm.pas b/坯布生产计划(WeavingSchedule)/U_GetDllForm.pas index aac245a..7cbbed1 100644 --- a/坯布生产计划(WeavingSchedule)/U_GetDllForm.pas +++ b/坯布生产计划(WeavingSchedule)/U_GetDllForm.pas @@ -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;