📄 u_xtsz.pas
字号:
unit U_xtsz;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Buttons, ComCtrls, ShellCtrls;
type
Tfrm_xtsz = class(TForm)
Panel1: TPanel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Panel2: TPanel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
scb_cg: TShellComboBox;
scb_sy: TShellComboBox;
scb_xg: TShellComboBox;
scb_qd: TShellComboBox;
ShellComboBox5: TShellComboBox;
scb_hsz: TShellComboBox;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure editvalue;
procedure scbrt();
procedure FormShow(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_xtsz: Tfrm_xtsz;
implementation
uses U_Data, U_Public, U_login, U_htgl;
{$R *.dfm}
procedure Tfrm_xtsz.editvalue;
begin
scb_cg.Path:=data1.xtsz.fieldbyname('cglj').Value;
scb_sy.Path:=data1.xtsz.fieldbyname('sylj').Value;
scb_xg.Path:=data1.xtsz.fieldbyname('xglj').Value;
scb_qd.Path:=data1.xtsz.fieldbyname('qdlj').Value;
scb_hsz.Path:=data1.xtsz.fieldbyname('hsz').Value;
end;
procedure Tfrm_xtsz.scbrt();
begin
scb_cg.Root:=data1.ADOPublic.fieldbyname('netpath').Value;
scb_sy.Root:=data1.ADOPublic.fieldbyname('netpath').Value;
scb_xg.Root:=data1.ADOPublic.fieldbyname('netpath').Value;
scb_qd.Root:=data1.ADOPublic.fieldbyname('netpath').Value;
scb_hsz.Root:=data1.ADOPublic.fieldbyname('netpath').Value;
end;
procedure Tfrm_xtsz.BitBtn1Click(Sender: TObject);
begin
with data1.xtsz do
begin
close;
sql.Clear;
sql.Add('select * from 系统路径 ');
open;
end;
if data1.xtsz.RecordCount>0 then
application.MessageBox('路径已经存在,不能重复设置!','提示',64)
else
begin
with data1.xtsz do
begin
close;
sql.Clear;
sql.Add('insert 系统路径 values (:a,:b,:c,:d,:e)');
parameters.ParamByName('a').Value:=scb_cg.Path;
parameters.ParamByName('b').Value:=scb_sy.Path;
parameters.ParamByName('c').Value:=scb_xg.Path;
parameters.ParamByName('d').Value:=scb_qd.Path;
parameters.ParamByName('e').Value:=scb_hsz.Path;
execsql;
end;
application.MessageBox('保存成功!','提示',64);
frm_main.loaddata;
Rz_Gl(czy,formatdatetime('yyyy年mm月dd日 hh:mm:ss',now),'保存路径');
end;
end;
procedure Tfrm_xtsz.BitBtn2Click(Sender: TObject);
begin
with data1.xtsz do
begin
edit;
//fieldbyname('yblj').Value:=trim(edit1.Text);
fieldbyname('cglj').Value:=scb_cg.Path;
fieldbyname('sylj').Value:=scb_sy.Path;
fieldbyname('xglj').Value:=scb_xg.Path;
fieldbyname('qdlj').Value:=scb_qd.Path;
fieldbyname('hsz').Value:=scb_hsz.Path;
post;
end;
application.MessageBox('修改成功!','提示',64);
Rz_Gl(czy,formatdatetime('yyyy年mm月dd日 hh:mm:ss',now),'修改路径');
end;
procedure Tfrm_xtsz.FormShow(Sender: TObject);
begin
with data1.ADOPublic do
begin
close;
sql.Clear;
sql.Add('select * from 网络路径');
open;
end;
scbrt();
with data1.xtsz do
begin
close;
sql.Clear;
sql.Add('select * from 系统路径');
open;
end;
if data1.xtsz.RecordCount>0 then
begin
scb_cg.Path:=data1.xtsz.fieldbyname('cglj').Value;
scb_sy.Path:=data1.xtsz.fieldbyname('sylj').Value;
scb_xg.Path:=data1.xtsz.fieldbyname('xglj').Value;
scb_qd.Path:=data1.xtsz.fieldbyname('qdlj').Value;
scb_hsz.Path:=data1.xtsz.fieldbyname('hsz').Value;
//editvalue;
end;
end;
procedure Tfrm_xtsz.BitBtn3Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_xtsz.FormClose(Sender: TObject; var Action: TCloseAction);
begin
xt_path;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -