【delphi开源代码栏目提醒】:网学会员为广大网友收集整理了,main_sjwh_sjwh_hfform.pas,希望对大家有所帮助!
unit main_sjwh_sjwh_hfform;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
DBTables, Db, StdCtrls, ExtCtrls, Buttons, Gauges;
type
Tmain_sjwh_sjwh_hf = class(TForm)
Image1: TImage;
Label1: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
p1: TGauge;
Table1: TTable;
Table2: TTable;
Bevel1: TBevel;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
main_sjwh_sjwh_hf: Tmain_sjwh_sjwh_hf;
implementation
uses main_sjwh_sjwhform;
{$R *.DFM}
procedure Tmain_sjwh_sjwh_hf.BitBtn1Click(Sender: TObject);
var
i:integer;
begin
if main_sjwh_sjwh.CheckBox1.Checked then
begin
table1.close;
table2.close;
table1.TableName:='fybbak';
table1.TableType:=ttparadox;
table2.TableName:='fyb';
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:='xjbak';
table1.TableType:=ttparadox;
table2.TableName:='xj';
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:='zgbak';
table1.TableType:=ttparadox;
table2.TableName:='zg';
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_hf.Handle,'数据恢复完毕!!','提示',mb_iconasterisk);
close;
end;
end.
上一篇:
main_sjwh_sjwh_bfform.pas
下一篇:
学院规定:严禁元旦春节期间公款购买赠送土特产、烟酒等年货节礼