📄 main_sjwh_sjwh_bfform.~pas
字号:
unit main_sjwh_sjwh_bfform;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls, Buttons, DBTables, Db, Gauges;
type
Tmain_sjwh_sjwh_bf = class(TForm)
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Image1: TImage;
Label1: TLabel;
Table1: TTable;
Table2: TTable;
p1: TGauge;
Bevel1: TBevel;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
main_sjwh_sjwh_bf: Tmain_sjwh_sjwh_bf;
implementation
uses main_sjwh_sjwhform;
{$R *.DFM}
procedure Tmain_sjwh_sjwh_bf.BitBtn1Click(Sender: TObject);
var
i:integer;
begin
if main_sjwh_sjwh.CheckBox1.Checked then
begin
table1.close;
table2.close;
table1.TableName:='fyb';
table1.TableType:=ttparadox;
table2.TableName:='fybbak';
table2.TableType:=ttparadox;
table1.Active:=true;
table2.Active:=false;
table2.EmptyTable;
table2.open;
p1.MaxValue:=table1.RecordCount;
for i:=1 to table1.RecordCount+1 do
begin
p1.Visible:=true;
p1.Progress:=i;
if p1.Progress=table1.RecordCount then
begin
p1.Progress:=0;
end;
table2.append;
table2.Fields[0].Value:=table1.Fields[0].Value;
table2.Fields[1].Value:=table1.Fields[1].Value;
table2.Fields[2].Value:=table1.Fields[2].Value;
table2.Fields[3].Value:=table1.Fields[3].Value;
table2.Fields[4].Value:=table1.Fields[4].Value;
table2.Fields[5].Value:=table1.Fields[5].Value;
table2.Fields[6].Value:=table1.Fields[6].Value;
table2.Fields[7].Value:=table1.Fields[7].Value;
table2.Fields[8].Value:=table1.Fields[8].Value;
table2.Fields[9].Value:=table1.Fields[9].Value;
table2.Fields[10].Value:=table1.Fields[10].Value;
table2.Fields[11].Value:=table1.Fields[11].Value;
table2.Fields[12].Value:=table1.Fields[12].Value;
table2.Fields[13].Value:=table1.Fields[13].Value;
table2.Fields[14].Value:=table1.Fields[14].Value;
table2.Fields[15].Value:=table1.Fields[15].Value;
table2.Fields[16].Value:=table1.Fields[16].Value;
table2.Fields[17].Value:=table1.Fields[17].Value;
table2.Fields[18].Value:=table1.Fields[18].Value;
table2.Fields[19].Value:=table1.Fields[19].Value;
table1.Next;
end;
end;
if main_sjwh_sjwh.CheckBox2.Checked then
begin
table1.close;
table2.close;
table1.TableName:='xj';
table1.TableType:=ttparadox;
table2.TableName:='xjbak';
table2.TableType:=ttparadox;
table1.Active:=true;
table2.Active:=false;
table2.EmptyTable;
table2.open;
p1.MaxValue:=table1.RecordCount;
for i:=1 to table1.RecordCount+1 do
begin
p1.Visible:=true;
p1.Progress:=i;
if p1.Progress=table1.RecordCount then
begin
p1.Progress:=0;
end;
table2.append;
table2.Fields[0].Value:=table1.Fields[0].Value;
table2.Fields[1].Value:=table1.Fields[1].Value;
table2.Fields[2].Value:=table1.Fields[2].Value;
table2.Fields[3].Value:=table1.Fields[3].Value;
table2.Fields[4].Value:=table1.Fields[4].Value;
table2.Fields[5].Value:=table1.Fields[5].Value;
table2.Fields[6].Value:=table1.Fields[6].Value;
table2.Fields[7].Value:=table1.Fields[7].Value;
table2.Fields[8].Value:=table1.Fields[8].Value;
table2.Fields[9].Value:=table1.Fields[9].Value;
table2.Fields[10].Value:=table1.Fields[10].Value;
table2.Fields[11].Value:=table1.Fields[11].Value;
table2.Fields[12].Value:=table1.Fields[12].Value;
table1.Next;
end;
end;
if main_sjwh_sjwh.CheckBox3.Checked then
begin
table1.close;
table2.close;
table1.TableName:='zg';
table1.TableType:=ttparadox;
table2.TableName:='zgbak';
table2.TableType:=ttparadox;
table1.Active:=true;
table2.Active:=false;
table2.EmptyTable;
table2.open;
p1.MaxValue:=table1.RecordCount;
for i:=1 to table1.RecordCount+1 do
begin
p1.Visible:=true;
p1.Progress:=i;
if p1.Progress=table1.RecordCount then
begin
p1.Progress:=0;
end;
table2.append;
table2.Fields[0].Value:=table1.Fields[0].Value;
table2.Fields[1].Value:=table1.Fields[1].Value;
table2.Fields[2].Value:=table1.Fields[2].Value;
table2.Fields[3].Value:=table1.Fields[3].Value;
table2.Fields[4].Value:=table1.Fields[4].Value;
table2.Fields[5].Value:=table1.Fields[5].Value;
table2.Fields[6].Value:=table1.Fields[6].Value;
table2.Fields[7].Value:=table1.Fields[7].Value;
table2.Fields[8].Value:=table1.Fields[8].Value;
table2.Fields[9].Value:=table1.Fields[9].Value;
table2.Fields[10].Value:=table1.Fields[10].Value;
table2.Fields[11].Value:=table1.Fields[11].Value;
table2.Fields[12].Value:=table1.Fields[12].Value;
table1.Next;
end;
end;
p1.Visible:=false;
table1.close;
table2.close;
messagebox(main_sjwh_sjwh_bf.Handle,'数据备份完毕!!','提示',mb_iconasterisk);
close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -