~
This commit is contained in:
parent
0c5126fd95
commit
356290bc80
|
|
@ -101,7 +101,7 @@ DebugSourceDirs=
|
|||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=D:\徐加艳项目代码\项目代码\凌丰\检验管理\testDll.exe
|
||||
HostApplication=D:\Dp7Repo\项目代码\D7DJlingfeng\检验管理\testDll.exe
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
|
|
|
|||
50
检验管理/TradeManage.skincfg
Normal file
50
检验管理/TradeManage.skincfg
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
[ExpressSkins]
|
||||
Default=1
|
||||
ShowNotifications=1
|
||||
Enabled=1
|
||||
dxSkinBlack=1
|
||||
dxSkinBlue=1
|
||||
dxSkinBlueprint=1
|
||||
dxSkinCaramel=1
|
||||
dxSkinCoffee=1
|
||||
dxSkinDarkRoom=1
|
||||
dxSkinDarkSide=1
|
||||
dxSkinDevExpressDarkStyle=1
|
||||
dxSkinDevExpressStyle=1
|
||||
dxSkinFoggy=1
|
||||
dxSkinGlassOceans=1
|
||||
dxSkinHighContrast=1
|
||||
dxSkiniMaginary=1
|
||||
dxSkinLilian=1
|
||||
dxSkinLiquidSky=1
|
||||
dxSkinLondonLiquidSky=1
|
||||
dxSkinMcSkin=1
|
||||
dxSkinMetropolis=1
|
||||
dxSkinMetropolisDark=1
|
||||
dxSkinMoneyTwins=1
|
||||
dxSkinOffice2007Black=1
|
||||
dxSkinOffice2007Blue=1
|
||||
dxSkinOffice2007Green=1
|
||||
dxSkinOffice2007Pink=1
|
||||
dxSkinOffice2007Silver=1
|
||||
dxSkinOffice2010Black=1
|
||||
dxSkinOffice2010Blue=1
|
||||
dxSkinOffice2010Silver=1
|
||||
dxSkinOffice2013DarkGray=1
|
||||
dxSkinOffice2013LightGray=1
|
||||
dxSkinOffice2013White=1
|
||||
dxSkinPumpkin=1
|
||||
dxSkinSeven=1
|
||||
dxSkinSevenClassic=1
|
||||
dxSkinSharp=1
|
||||
dxSkinSharpPlus=1
|
||||
dxSkinSilver=1
|
||||
dxSkinSpringTime=1
|
||||
dxSkinStardust=1
|
||||
dxSkinSummer2008=1
|
||||
dxSkinTheAsphaltWorld=1
|
||||
dxSkinsDefaultPainters=1
|
||||
dxSkinValentine=1
|
||||
dxSkinVS2010=1
|
||||
dxSkinWhiteprint=1
|
||||
dxSkinXmas2008Blue=1
|
||||
|
|
@ -4,7 +4,21 @@ interface
|
|||
|
||||
uses
|
||||
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
|
||||
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses;
|
||||
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses, dxSkinsCore,
|
||||
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
|
||||
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
|
||||
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
|
||||
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue;
|
||||
var
|
||||
DConString:String; {全局连接字符串}
|
||||
server, dtbase, user, pswd: String; {数据库连接参数}
|
||||
|
|
|
|||
|
|
@ -2450,10 +2450,18 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
ImageIndex = 72
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
object ToolButton1: TToolButton
|
||||
Left = 943
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #37325#36830
|
||||
ImageIndex = 80
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 1022
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
|
|
@ -2989,4 +2997,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Left = 896
|
||||
Top = 580
|
||||
end
|
||||
object QryCheckNet: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 92
|
||||
Top = 349
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,7 +10,21 @@ uses
|
|||
cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport,
|
||||
RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox,
|
||||
MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, ShellAPI;
|
||||
MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, ShellAPI,
|
||||
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
|
||||
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
||||
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans,
|
||||
dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
|
||||
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||
|
||||
type
|
||||
TfrmMJManageNewFDNewSF = class(TForm)
|
||||
|
|
@ -244,6 +258,8 @@ type
|
|||
ComboBox2: TComboBox;
|
||||
Label28: TLabel;
|
||||
Button5: TButton;
|
||||
ToolButton1: TToolButton;
|
||||
QryCheckNet: TADOQuery;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
@ -301,12 +317,13 @@ type
|
|||
procedure Edit12Click(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
procedure TBCDClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
|
||||
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID: string;
|
||||
FJZ, FJC, FDC: Double;
|
||||
fRollType, fRollType1, fbaotype, fbaosx,forderunit: string;
|
||||
fRollType, fRollType1, fbaotype, fbaosx, forderunit: string;
|
||||
isCommopen, IsJsMessage: boolean;
|
||||
MValue, FCDName, MggCDFalg: string;
|
||||
fxsws, fxsws1: string;
|
||||
|
|
@ -327,6 +344,7 @@ type
|
|||
procedure On1201(var Message: Tmessage); message 1201;
|
||||
procedure On1301(var Message: Tmessage); message 1301;
|
||||
function JsXj(str1: string): string;
|
||||
function SelfConnData(): Boolean;
|
||||
public
|
||||
fmanage: string;
|
||||
{ Public declarations }
|
||||
|
|
@ -344,6 +362,40 @@ uses
|
|||
U_SysLogOrder;
|
||||
|
||||
{$R *.dfm}
|
||||
function TfrmMJManageNewFDNewSF.SelfConnData(): Boolean;
|
||||
begin
|
||||
try
|
||||
with QryCheckNet do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
//查询一个小表检测网络
|
||||
SQL.Add('select getdate()');
|
||||
Open;
|
||||
end;
|
||||
Result := true;
|
||||
except
|
||||
// if Application.MessageBox('是否重新连接网络!','提示',32+4)<>IDYES then Exit;
|
||||
if not Assigned(DataLink_TradeManage) then
|
||||
DataLink_TradeManage := DataLink_TradeManage.Create(Application);
|
||||
try
|
||||
with DataLink_TradeManage.ADOLink do
|
||||
begin
|
||||
//if not Connected then
|
||||
begin
|
||||
Connected := false;
|
||||
ConnectionString := DConString;
|
||||
LoginPrompt := false;
|
||||
Connected := true;
|
||||
end;
|
||||
end;
|
||||
Result := true;
|
||||
except
|
||||
Result := false;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMJManageNewFDNewSF.PrtBaoData(FBaoid: string);
|
||||
var
|
||||
fPrintFile: string;
|
||||
|
|
@ -1048,7 +1100,7 @@ begin
|
|||
begin
|
||||
FieldByName('MJFK').Value := MJFK.Text;
|
||||
end;
|
||||
if (forderunit= 'KG') and (Trim(MJMaoZ.Text) <> '') then
|
||||
if (forderunit = 'KG') and (Trim(MJMaoZ.Text) <> '') then
|
||||
begin
|
||||
FieldByName('MJMaoZ').Value := StrToFloatdef(trim(MJMaoZ.Text), 0) + StrToFloatdef(trim(MJQty2.Text), 0) + fjc;
|
||||
end
|
||||
|
|
@ -2383,12 +2435,13 @@ begin
|
|||
FDC := StrToFloatDef(ADOTmp.fieldbyname('DC').asstring, 0);
|
||||
fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString);
|
||||
fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString);
|
||||
forderunit:= Trim(ADOTmp.fieldbyname('OrderUnit').AsString);
|
||||
if (Trim(ADOTmp.fieldbyname('OrderUnit').AsString)='M')or (Trim(ADOTmp.fieldbyname('OrderUnit').AsString)='m') then
|
||||
forderunit := Trim(ADOTmp.fieldbyname('OrderUnit').AsString);
|
||||
if (Trim(ADOTmp.fieldbyname('OrderUnit').AsString) = 'M') or (Trim(ADOTmp.fieldbyname('OrderUnit').AsString) = 'm') then
|
||||
begin
|
||||
Label9.Caption := 'M';
|
||||
end
|
||||
else begin
|
||||
else
|
||||
begin
|
||||
Label9.Caption := 'Y';
|
||||
end;
|
||||
|
||||
|
|
@ -2903,5 +2956,14 @@ begin
|
|||
|
||||
end;
|
||||
|
||||
procedure TfrmMJManageNewFDNewSF.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if SelfConnData() = false then
|
||||
begin
|
||||
Application.MessageBox('网络链接失败,请重新保存', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user