You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1449 lines
41 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, bsSkinData, BusinessSkinForm, DB, ADODB, StdCtrls,
CheckLst,ShellApi, Menus, ComCtrls, bsSkinTabs, ExtCtrls, DBCtrls,
dxExEdtr, dxTL, dxDBCtrl, dxDBGrid, dxCntner, Mask, bsdbctrls, RxLookup,
wwdbedit, Wwdotdot, Wwdbcomb, Grids, DBGrids, wwdblook;
type
TForm1 = class(TForm)
bsSkinPanel1: TbsSkinPanel;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinData1: TbsSkinData;
bsStoredSkin1: TbsStoredSkin;
old_db: TADOConnection;
new_db: TADOConnection;
bsSkinPanel2: TbsSkinPanel;
bsSkinPanel5: TbsSkinPanel;
bsSkinButton11: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
CheckListBox1: TCheckListBox;
CheckListBox2: TCheckListBox;
bsSkinButton2: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
PopupMenu2: TPopupMenu;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
new_table: TADOQuery;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinTabSheet3: TbsSkinTabSheet;
bsSkinButton4: TbsSkinButton;
db: TADOConnection;
t_fangan: TADOQuery;
t_fangan1: TDataSource;
t_main: TADOQuery;
t_main1: TDataSource;
t_fen: TADOQuery;
t_fen1: TDataSource;
bsSkinButton5: TbsSkinButton;
bsSkinPanel3: TbsSkinPanel;
bsSkinPanel6: TbsSkinPanel;
bsSkinPanel4: TbsSkinPanel;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridColumn;
dxDBGrid2Column2: TdxDBGridColumn;
DBNavigator2: TDBNavigator;
bsSkinPanel7: TbsSkinPanel;
DBNavigator1: TDBNavigator;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridColumn;
dxDBGrid1Column2: TdxDBGridColumn;
bsSkinPanel8: TbsSkinPanel;
bsSkinButton14: TbsSkinButton;
new_field: TADOQuery;
old_field: TADOQuery;
bsSkinGauge1: TbsSkinGauge;
Panel1: TPanel;
Panel2: TPanel;
CheckListBox3: TCheckListBox;
CheckListBox4: TCheckListBox;
Panel3: TPanel;
bsSkinButton13: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
DBEdit4: TDBEdit;
Label4: TLabel;
Label3: TLabel;
DBEdit3: TDBEdit;
DBEdit2: TDBEdit;
Label2: TLabel;
DBEdit1: TDBEdit;
Label1: TLabel;
DBNavigator3: TDBNavigator;
dxDBGrid3: TdxDBGrid;
dxDBGrid3Column2: TdxDBGridColumn;
dxDBGrid3Column1: TdxDBGridColumn;
dxDBGrid3Column3: TdxDBGridColumn;
dxDBGrid3Column4: TdxDBGridColumn;
PopupMenu3: TPopupMenu;
N3: TMenuItem;
PopupMenu4: TPopupMenu;
MenuItem3: TMenuItem;
bsSkinGroupBox1: TbsSkinGroupBox;
bsSkinButton15: TbsSkinButton;
old_field1: TDataSource;
new_field1: TDataSource;
CheckListBox5: TCheckListBox;
dxDBGrid4: TdxDBGrid;
dxDBGrid4Column1: TdxDBGridMaskColumn;
old_update: TADOCommand;
new_update: TADOCommand;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
PopupMenu5: TPopupMenu;
N4: TMenuItem;
bsSkinGroupBox2: TbsSkinGroupBox;
bsSkinButton20: TbsSkinButton;
bsSkinButton21: TbsSkinButton;
bsSkinButton22: TbsSkinButton;
bsSkinGroupBox3: TbsSkinGroupBox;
bsSkinButton23: TbsSkinButton;
bsSkinButton24: TbsSkinButton;
bsSkinButton25: TbsSkinButton;
bsSkinButton26: TbsSkinButton;
t_crm_client1: TDataSource;
t_crm_client: TADOQuery;
Label5: TLabel;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
Label6: TLabel;
Label7: TLabel;
DBEdit7: TDBEdit;
Label8: TLabel;
DBEdit8: TDBEdit;
Label9: TLabel;
DBEdit9: TDBEdit;
Label10: TLabel;
DBEdit10: TDBEdit;
Label11: TLabel;
DBEdit11: TDBEdit;
Label12: TLabel;
DBEdit12: TDBEdit;
Label13: TLabel;
RxDBLookupCombo14: TRxDBLookupCombo;
bsSkinDBCheckRadioBox9: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox10: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox12: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox11: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox8: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
Label14: TLabel;
DBMemo1: TDBMemo;
Label15: TLabel;
DBMemo2: TDBMemo;
dxDBGrid5: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
t_sys_employee1: TDataSource;
t_sys_employee: TADOQuery;
bsSkinButton27: TbsSkinButton;
DBNavigator4: TDBNavigator;
DBEdit13: TDBEdit;
Label16: TLabel;
Label17: TLabel;
DBEdit14: TDBEdit;
wwDBComboBox1: TwwDBComboBox;
Label18: TLabel;
bsSkinTabSheet4: TbsSkinTabSheet;
bsSkinButton28: TbsSkinButton;
DBGrid1: TDBGrid;
bsSkinButton29: TbsSkinButton;
bsSkinButton30: TbsSkinButton;
bsSkinButton31: TbsSkinButton;
bsSkinButton32: TbsSkinButton;
bsSkinButton33: TbsSkinButton;
bsSkinButton34: TbsSkinButton;
bsSkinButton35: TbsSkinButton;
bsSkinButton36: TbsSkinButton;
p_update: TADOStoredProc;
Edit1: TEdit;
Label19: TLabel;
Edit2: TEdit;
Label20: TLabel;
bsSkinButton37: TbsSkinButton;
bsSkinTabSheet5: TbsSkinTabSheet;
CheckListBox6: TCheckListBox;
Panel4: TPanel;
bsSkinButton38: TbsSkinButton;
Panel5: TPanel;
DBGrid2: TDBGrid;
Panel6: TPanel;
DBGrid3: TDBGrid;
t_sys_report1: TDataSource;
t_sys_report: TADOQuery;
t_sys_report_lei: TADOQuery;
t_sys_report_lei1: TDataSource;
wwDBLookupCombo1: TwwDBLookupCombo;
Label21: TLabel;
Button1: TButton;
DBNavigator5: TDBNavigator;
Label22: TLabel;
Edit3: TEdit;
Label23: TLabel;
Edit4: TEdit;
Button2: TButton;
Button3: TButton;
bsSkinButton39: TbsSkinButton;
bsSkinButton40: TbsSkinButton;
DBNavigator6: TDBNavigator;
procedure old_dbBeforeConnect(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure new_dbBeforeConnect(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure MenuItem2Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure dbBeforeConnect(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure CheckListBox1DblClick(Sender: TObject);
procedure CheckListBox2DblClick(Sender: TObject);
procedure CheckListBox3DblClick(Sender: TObject);
procedure CheckListBox4DblClick(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure MenuItem3Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure bsSkinButton22Click(Sender: TObject);
procedure bsSkinButton23Click(Sender: TObject);
procedure bsSkinButton24Click(Sender: TObject);
procedure bsSkinButton25Click(Sender: TObject);
procedure bsSkinButton26Click(Sender: TObject);
procedure bsSkinButton27Click(Sender: TObject);
procedure bsSkinButton28Click(Sender: TObject);
procedure bsSkinButton29Click(Sender: TObject);
procedure bsSkinButton30Click(Sender: TObject);
procedure bsSkinButton31Click(Sender: TObject);
procedure bsSkinButton32Click(Sender: TObject);
procedure bsSkinButton33Click(Sender: TObject);
procedure bsSkinButton34Click(Sender: TObject);
procedure bsSkinButton35Click(Sender: TObject);
procedure bsSkinButton36Click(Sender: TObject);
procedure bsSkinButton37Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure bsSkinButton39Click(Sender: TObject);
procedure bsSkinButton40Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.old_dbBeforeConnect(Sender: TObject);
begin
old_db.ConnectionString:='FILE NAME='+ExtractFilePath(ParamStr(0))+'old.udl';
end;
procedure TForm1.bsSkinButton11Click(Sender: TObject);
begin
try
old_db.Connected:=true;
except
showmessage('<27><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
old_db.GetTableNames(CheckListBox1.Items);
try
new_db.Connected:=true;
except
showmessage('<27><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
new_db.GetTableNames(CheckListBox2.Items);
end;
procedure TForm1.bsSkinButton2Click(Sender: TObject);
begin
ShellExecute(Application.Handle,nil,PChar(ExtractFilePath(Application.ExeName)+'\old.udl'),nil,nil,SW_NORMAL);
end;
procedure TForm1.bsSkinButton3Click(Sender: TObject);
begin
ShellExecute(Application.Handle,nil,PChar(ExtractFilePath(Application.ExeName)+'\new.udl'),nil,nil,SW_NORMAL);
end;
procedure TForm1.new_dbBeforeConnect(Sender: TObject);
begin
new_db.ConnectionString:='FILE NAME='+ExtractFilePath(ParamStr(0))+'new.udl';
end;
procedure TForm1.N1Click(Sender: TObject);
var
i:integer;
begin
for i:=0 to CheckListBox1.Items.Count-1 do
begin
CheckListBox1.Checked[i]:=true;
end;
end;
procedure TForm1.N2Click(Sender: TObject);
var
i:integer;
begin
for i:=0 to CheckListBox1.Items.Count-1 do
begin
CheckListBox1.Checked[i]:=false;
end;
end;
procedure TForm1.MenuItem1Click(Sender: TObject);
var
i:integer;
begin
for i:=0 to CheckListBox2.Items.Count-1 do
begin
CheckListBox2.Checked[i]:=true;
end;
end;
procedure TForm1.MenuItem2Click(Sender: TObject);
var
i:integer;
begin
for i:=0 to CheckListBox2.Items.Count-1 do
begin
CheckListBox2.Checked[i]:=false;
end;
end;
procedure TForm1.bsSkinButton1Click(Sender: TObject);
var
i:integer;
begin
for i:=0 to CheckListBox2.Items.Count-1 do
begin
if CheckListBox2.Checked[i] then
begin
new_table.close;
new_table.sql.Clear;
new_table.sql.add('select * from '+CheckListBox2.Items[i]);
new_table.open;
while not new_table.eof do
new_table.delete;
end;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton4Click(Sender: TObject);
begin
ShellExecute(Application.Handle,nil,PChar(ExtractFilePath(Application.ExeName)+'\design.udl'),nil,nil,SW_NORMAL);
end;
procedure TForm1.dbBeforeConnect(Sender: TObject);
begin
db.ConnectionString:='FILE NAME='+ExtractFilePath(ParamStr(0))+'design.udl';
end;
procedure TForm1.bsSkinButton5Click(Sender: TObject);
begin
t_fangan.Open;
t_main.open;
t_fen.open;
end;
procedure TForm1.CheckListBox1DblClick(Sender: TObject);
begin
if t_main.IsEmpty then
exit;
if not t_fen.IsEmpty then
exit;
t_main.edit;
t_main['<27>ɱ<EFBFBD><C9B1><EFBFBD>']:=CheckListBox1.Items[CheckListBox1.ItemIndex];
t_main.post;
end;
procedure TForm1.CheckListBox2DblClick(Sender: TObject);
begin
if t_main.IsEmpty then
exit;
if not t_fen.IsEmpty then
exit;
t_main.edit;
t_main['<27>±<EFBFBD><C2B1><EFBFBD>']:=CheckListBox2.Items[CheckListBox2.ItemIndex];
t_main.post;
end;
procedure TForm1.CheckListBox3DblClick(Sender: TObject);
begin
if t_fen.IsEmpty then
exit;
t_fen.edit;
t_fen['<27><><EFBFBD>ֶ<EFBFBD>']:=CheckListBox3.Items[CheckListBox3.ItemIndex];
t_fen.post;
end;
procedure TForm1.CheckListBox4DblClick(Sender: TObject);
begin
if t_fen.IsEmpty then
exit;
t_fen.edit;
t_fen['<27><><EFBFBD>ֶ<EFBFBD>']:=CheckListBox4.Items[CheckListBox4.ItemIndex];
t_fen.post;
end;
procedure TForm1.bsSkinButton13Click(Sender: TObject);
var
i:integer;
begin
if t_main.IsEmpty then
exit;
old_field.close;
old_field.sql.clear;
old_field.sql.add('select top 0 * from '+t_main.fieldbyname('<27>ɱ<EFBFBD><C9B1><EFBFBD>').asstring);
old_field.open;
CheckListBox4.Items.Clear;
for i:=0 to old_field.Fields.Count-1 do
begin
CheckListBox4.Items.Add(old_field.Fields[i].FieldName);
end;
new_field.close;
new_field.sql.clear;
new_field.sql.add('select top 0 * from '+t_main.fieldbyname('<27>±<EFBFBD><C2B1><EFBFBD>').asstring);
new_field.open;
CheckListBox3.Items.Clear;
for i:=0 to new_field.Fields.Count-1 do
begin
if not t_fen.Locate('<27><><EFBFBD>ֶ<EFBFBD>',new_field.Fields[i].FieldName,[])then
CheckListBox3.Items.Add(new_field.Fields[i].FieldName);
end;
end;
procedure TForm1.bsSkinButton6Click(Sender: TObject);
begin
if t_fen.IsEmpty then
exit;
t_fen.edit;
t_fen['<27><><EFBFBD>ֶ<EFBFBD>']:='Ĭ<><C4AC>';
t_fen.post;
end;
procedure TForm1.bsSkinButton7Click(Sender: TObject);
begin
if t_fen.IsEmpty then
exit;
if t_fen['<27><><EFBFBD>ֶ<EFBFBD>']<>'Ĭ<><C4AC>'then
exit;
t_fen.edit;
t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27>ı<EFBFBD>';
t_fen.post;
end;
procedure TForm1.bsSkinButton9Click(Sender: TObject);
begin
if t_fen.IsEmpty then
exit;
if t_fen['<27><><EFBFBD>ֶ<EFBFBD>']<>'Ĭ<><C4AC>'then
exit;
t_fen.edit;
t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='С<><D0A1>';
t_fen.post;
end;
procedure TForm1.bsSkinButton8Click(Sender: TObject);
begin
if t_fen.IsEmpty then
exit;
if t_fen['<27><><EFBFBD>ֶ<EFBFBD>']<>'Ĭ<><C4AC>'then
exit;
t_fen.edit;
t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
t_fen.post;
end;
procedure TForm1.bsSkinButton10Click(Sender: TObject);
begin
if t_fen.IsEmpty then
exit;
if t_fen['<27><><EFBFBD>ֶ<EFBFBD>']<>'Ĭ<><C4AC>'then
exit;
t_fen.edit;
t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27>Ƿ<EFBFBD>';
t_fen.post;
end;
procedure TForm1.bsSkinButton12Click(Sender: TObject);
begin
if t_fen.IsEmpty then
exit;
if t_fen['<27><><EFBFBD>ֶ<EFBFBD>']<>'Ĭ<><C4AC>'then
exit;
t_fen.edit;
t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
t_fen.post;
end;
procedure TForm1.bsSkinButton14Click(Sender: TObject);
begin
if t_main.IsEmpty then
exit;
t_main.first;
while not t_main.eof do
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from '+t_main.fieldbyname('<27>ɱ<EFBFBD><C9B1><EFBFBD>').asstring);
old_field.open;
new_field.close;
new_field.sql.clear;
new_field.sql.add('select * from '+t_main.fieldbyname('<27>±<EFBFBD><C2B1><EFBFBD>').asstring);
new_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
t_fen.DisableControls;
old_field.first;
while not old_field.eof do
begin
//IF NOT new_field.LOCATE('<27><><EFBFBD><EFBFBD>',old_field.FieldByName('<27>˱<EFBFBD><CBB1><EFBFBD>').ASSTRING,[]) THEN
BEGIN
new_field.insert;
t_fen.first;
while not t_fen.eof do
begin
if t_fen['<27><><EFBFBD>ֶ<EFBFBD>']<>'Ĭ<><C4AC>'then
begin
new_field[t_fen['<27><><EFBFBD>ֶ<EFBFBD>']]:=old_field[t_fen['<27><><EFBFBD>ֶ<EFBFBD>']];
end
else
begin
if t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27>ı<EFBFBD>' then
new_field[t_fen['<27><><EFBFBD>ֶ<EFBFBD>']]:=t_fen['<27><><EFBFBD><EFBFBD>ֵ'];
if t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='С<><D0A1>' then
new_field[t_fen['<27><><EFBFBD>ֶ<EFBFBD>']]:=strtofloat(t_fen['<27><><EFBFBD><EFBFBD>ֵ']);
if t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD>' then
new_field[t_fen['<27><><EFBFBD>ֶ<EFBFBD>']]:=strtofloat(t_fen['<27><><EFBFBD><EFBFBD>ֵ']);
if t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27>Ƿ<EFBFBD>' then
new_field[t_fen['<27><><EFBFBD>ֶ<EFBFBD>']]:=strtobool(t_fen['<27><><EFBFBD><EFBFBD>ֵ']);
if t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']='<27><><EFBFBD><EFBFBD>' then
new_field[t_fen['<27><><EFBFBD>ֶ<EFBFBD>']]:=strtodatetime(t_fen['<27><><EFBFBD><EFBFBD>ֵ']);
end;
t_fen.next;
end;
new_field.post;
END;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
t_fen.EnableControls;
t_main.next;
end;
showmessage('ok');
end;
procedure TForm1.N3Click(Sender: TObject);
var
i:integer;
begin
if t_main.IsEmpty then
exit;
for i:=0 to CheckListBox3.Items.Count-1 do
begin
if not t_fen.Locate('<27><><EFBFBD>ֶ<EFBFBD>',CheckListBox3.Items[i],[])then
begin
t_fen.insert;
t_fen['<27><><EFBFBD>ֶ<EFBFBD>']:=CheckListBox3.Items[i];
t_fen.Post;
end;
end;
end;
procedure TForm1.MenuItem3Click(Sender: TObject);
var
i:integer;
begin
if t_main.IsEmpty then
exit;
for i:=0 to CheckListBox4.Items.Count-1 do
begin
if t_fen.Locate('<27><><EFBFBD>ֶ<EFBFBD>',CheckListBox4.Items[i],[])then
begin
t_fen.edit;
t_fen['<27><><EFBFBD>ֶ<EFBFBD>']:=CheckListBox4.Items[i];
t_fen.Post;
end;
end;
end;
procedure TForm1.bsSkinButton15Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select distinct <20><><EFBFBD><EFBFBD> from t_e_ctn');
old_field.open;
new_field.close;
new_field.sql.clear;
new_field.sql.add('select <20><><EFBFBD><EFBFBD> from t_code_ctn_kind');
new_field.open;
CheckListBox5.Clear;
old_field.first;
while not old_field.eof do
begin
if not new_field.Locate('<27><><EFBFBD><EFBFBD>',old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
CheckListBox5.Items.Add(old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
old_field.next;
end;
old_field.close;
old_field.sql.clear;
old_field.sql.add('select distinct <20><><EFBFBD><EFBFBD> from t_i_ctn');
old_field.open;
old_field.first;
while not old_field.eof do
begin
if not new_field.Locate('<27><><EFBFBD><EFBFBD>',old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
CheckListBox5.Items.Add(old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
old_field.next;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton16Click(Sender: TObject);
begin
old_update.CommandText:='update t_e_ctn set <20><><EFBFBD><EFBFBD>='+''''+new_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''''
+' where <20><><EFBFBD><EFBFBD>='+''''+CheckListBox5.Items[CheckListBox5.ItemIndex]+'''';
old_update.Execute;
old_update.CommandText:='update t_i_ctn set <20><><EFBFBD><EFBFBD>='+''''+new_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''''
+' where <20><><EFBFBD><EFBFBD>='+''''+CheckListBox5.Items[CheckListBox5.ItemIndex]+'''';
old_update.Execute;
showmessage('ok');
end;
procedure TForm1.bsSkinButton17Click(Sender: TObject);
var
i:integer;
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select distinct <20><><EFBFBD><EFBFBD>,<2C>ߴ<EFBFBD> from t_e_ctn');
old_field.open;
new_field.close;
new_field.sql.clear;
new_field.sql.add('select * from t_code_ctn');
new_field.open;
i:=1;
old_field.First;
while not old_field.eof do
begin
new_field.Filtered:=false;
new_field.Filter:='<27><><EFBFBD><EFBFBD>='+''''+old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''''
+' and <20>ߴ<EFBFBD>='+''''+old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring;
new_field.Filtered:=true;
if new_field.IsEmpty then
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD>']:=inttostr(i);
new_field['<27><><EFBFBD><EFBFBD>']:=old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
new_field['<27>ߴ<EFBFBD>']:=copy(old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring,1,2);
new_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring+old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
new_field.post;
i:=i+1;
end;
old_field.next;
end;
old_field.close;
old_field.sql.clear;
old_field.sql.add('select distinct <20><><EFBFBD><EFBFBD>,<2C>ߴ<EFBFBD> from t_i_ctn');
old_field.open;
old_field.First;
while not old_field.eof do
begin
new_field.Filtered:=false;
new_field.Filter:='<27><><EFBFBD><EFBFBD>='+''''+old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''''
+' and <20>ߴ<EFBFBD>='+''''+old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring;
new_field.Filtered:=true;
if new_field.IsEmpty then
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD>']:=inttostr(i);
new_field['<27><><EFBFBD><EFBFBD>']:=old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
new_field['<27>ߴ<EFBFBD>']:=copy(old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring,1,2);
new_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring+old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
new_field.post;
i:=i+1;
end;
old_field.next;
end;
new_field.Filtered:=false;
new_field.Filter:='';
showmessage('ok');
end;
procedure TForm1.bsSkinButton18Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_e_ctn');
old_field.open;
new_field.close;
new_field.sql.clear;
new_field.sql.add('select * from t_op_ctn');
new_field.open;
new_table.close;
new_table.sql.clear;
new_table.sql.add('select * from t_code_ctn');
new_table.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD>']:=old_field.fieldbyname('<27>˱<EFBFBD><CBB1><EFBFBD>').asstring;
if new_table.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring+old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
new_field['<27><><EFBFBD><EFBFBD>']:=new_table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
new_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=new_table.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
new_field['<27>ߴ<EFBFBD>']:=new_table.fieldbyname('<27>ߴ<EFBFBD>').asstring;
new_field['<27><><EFBFBD><EFBFBD>']:=new_table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
new_field['<27><><EFBFBD><EFBFBD>']:=old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
new_field['TEU']:=strtoint(copy(old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring,1,1))/2*old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
new_field.post;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_i_ctn');
old_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD>']:=old_field.fieldbyname('<27>˱<EFBFBD><CBB1><EFBFBD>').asstring;
if new_table.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring+old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
new_field['<27><><EFBFBD><EFBFBD>']:=new_table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
new_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=new_table.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
new_field['<27>ߴ<EFBFBD>']:=new_table.fieldbyname('<27>ߴ<EFBFBD>').asstring;
new_field['<27><><EFBFBD><EFBFBD>']:=new_table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
new_field['<27><><EFBFBD><EFBFBD>']:=old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
new_field['TEU']:=strtoint(copy(old_field.fieldbyname('<27>ߴ<EFBFBD>').asstring,1,1))/2*old_field.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
new_field.post;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
showmessage('ok');
end;
procedure TForm1.N4Click(Sender: TObject);
var
i:integer;
begin
if t_main.IsEmpty then
exit;
if CheckListBox2.Items.Count=0 then
exit;
t_main.first;
while not t_main.eof do
begin
for i:=0 to CheckListBox2.Items.Count-1 do
begin
if CheckListBox2.Items[i]=t_main.fieldbyname('<27>±<EFBFBD><C2B1><EFBFBD>').asstring then
CheckListBox2.Checked[i]:=true;
end;
t_main.next;
end;
end;
procedure TForm1.bsSkinButton20Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_accept ');
old_field.open;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select top 0 * from t_ch_fee');
new_table.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
new_table.insert;
new_table['<27><><EFBFBD><EFBFBD>']:='<27><>';
new_table['<27><><EFBFBD><EFBFBD>״̬']:=old_field['<27><><EFBFBD><EFBFBD>״̬'];
new_table['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=old_field['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27>˱<EFBFBD><CBB1><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD>㵥λ']:=old_field['<27><><EFBFBD>㵥λ'];
new_table['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><>׼']:=old_field['<27><>׼'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_table['<27>ұ<EFBFBD>']:=old_field['<27>ұ<EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_table['<27><>ע']:=old_field['<27><><EFBFBD>ñ<EFBFBD>ע'];
new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
new_table['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
new_table['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['¼<><C2BC><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
new_table['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
new_table['<27><>id']:=old_field['id'];
new_table['<27><>״̬']:=old_field['<27><><EFBFBD><EFBFBD>״̬'];
new_table.post;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_pay ');
old_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
new_table.insert;
new_table['<27><><EFBFBD><EFBFBD>']:='<27><>';
new_table['<27><><EFBFBD><EFBFBD>״̬']:=old_field['<27><><EFBFBD><EFBFBD>״̬'];
new_table['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:=old_field['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27>˱<EFBFBD><CBB1><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD>㵥λ']:=old_field['<27><><EFBFBD>㵥λ'];
new_table['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><>׼']:=old_field['<27><>׼'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_table['<27>ұ<EFBFBD>']:=old_field['<27>ұ<EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_table['<27><>ע']:=old_field['<27><><EFBFBD>ñ<EFBFBD>ע'];
new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
new_table['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
new_table['<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['¼<><C2BC><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
new_table['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
new_table['<27><>id']:=old_field['id'];
new_table['<27><>״̬']:=old_field['<27><><EFBFBD><EFBFBD>״̬'];
new_table.post;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton21Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_balance_fee where <20>ո<EFBFBD>='+''''+'<27><>'+'''');
old_field.open;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''');
new_table.open;
new_field.close;
new_field.SQL.clear;
new_field.sql.add('select top 0 * from t_ch_fee_do');
new_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
if new_table.Locate('<27><>id',old_field['<27><><EFBFBD>ñ<EFBFBD>ʾ'],[]) then
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><E3B5A5>'];
new_field['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27>˱<EFBFBD><CBB1><EFBFBD>'];
new_field['CH_ID']:=new_table['CH_ID'];
new_field['<27>ұ<EFBFBD>']:=old_field['<27>ұ<EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_field['ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:='3';
new_field.post;
end;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton22Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_balance_fee where <20>ո<EFBFBD>='+''''+'<27><>'+'''');
old_field.open;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''');
new_table.open;
new_field.close;
new_field.SQL.clear;
new_field.sql.add('select top 0 * from t_ch_fee_do');
new_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
if new_table.Locate('<27><>id',old_field['<27><><EFBFBD>ñ<EFBFBD>ʾ'],[]) then
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><E3B5A5>'];
new_field['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27>˱<EFBFBD><CBB1><EFBFBD>'];
new_field['CH_ID']:=new_table['CH_ID'];
new_field['<27>ұ<EFBFBD>']:=old_field['<27>ұ<EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_field['ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:='4';
new_field.post;
end;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton23Click(Sender: TObject);
begin
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_op_seae');
new_table.open;
new_field.close;
new_field.SQL.clear;
new_field.sql.add('select top 0 * from t_sys_no');
new_field.open;
bsSkinGauge1.MaxValue:=new_table.RecordCount+1;
bsSkinGauge1.Value:=0;
new_table.first;
while not new_table.eof do
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD>']:=new_table['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_field['<27>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>']:=1;
new_field.post;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
new_table.next;
end;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_op_seai');
new_table.open;
bsSkinGauge1.MaxValue:=new_table.RecordCount+1;
bsSkinGauge1.Value:=0;
new_table.first;
while not new_table.eof do
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD>']:=new_table['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_field['<27>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>']:=1;
new_field.post;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
new_table.next;
end;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_ch_balance');
new_table.open;
bsSkinGauge1.MaxValue:=new_table.RecordCount+1;
bsSkinGauge1.Value:=0;
new_table.first;
while not new_table.eof do
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD>']:=new_table['<27>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>'];
new_field['<27>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>']:=1;
new_field.post;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
new_table.next;
end;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_ch_check');
new_table.open;
bsSkinGauge1.MaxValue:=new_table.RecordCount+1;
bsSkinGauge1.Value:=0;
new_table.first;
while not new_table.eof do
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD>']:=new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_field['<27>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>']:=1;
new_field.post;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
new_table.next;
end;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_ch_invoice_shen');
new_table.open;
bsSkinGauge1.MaxValue:=new_table.RecordCount+1;
bsSkinGauge1.Value:=0;
new_table.first;
while not new_table.eof do
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD>']:=new_table['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_field['<27>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>']:=1;
new_field.post;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
new_table.next;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton24Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_accept where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>=1');
old_field.open;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''');
new_table.open;
new_field.close;
new_field.SQL.clear;
new_field.sql.add('select top 0 * from t_ch_fee_do');
new_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
if new_table.Locate('<27><>id',old_field['id'],[]) then
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_field['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27>˱<EFBFBD><CBB1><EFBFBD>'];
new_field['CH_ID']:=new_table['CH_ID'];
new_field['<27>ұ<EFBFBD>']:=old_field['<27>ұ<EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_field['ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:='1';
new_field.post;
end;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton25Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_invoice_shen_fee');
old_field.open;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''');
new_table.open;
new_field.close;
new_field.SQL.clear;
new_field.sql.add('select top 0 * from t_ch_fee_do');
new_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
if new_table.Locate('<27><>id',old_field['accept_id'],[]) then
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['in_shen_id'];
new_field['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27>˱<EFBFBD><CBB1><EFBFBD>'];
new_field['CH_ID']:=new_table['CH_ID'];
new_field['<27>ұ<EFBFBD>']:=new_table['<27>ұ<EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_field['ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>']:=old_field['ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:='1';
new_field.post;
end;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton26Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_check_fee');
old_field.open;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''');
new_table.open;
new_field.close;
new_field.SQL.clear;
new_field.sql.add('select top 0 * from t_ch_fee_do');
new_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
if new_table.Locate('<27><>id',old_field['id'],[]) then
begin
new_field.insert;
new_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['check_id'];
new_field['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field['<27>˱<EFBFBD><CBB1><EFBFBD>'];
new_field['CH_ID']:=new_table['CH_ID'];
new_field['<27>ұ<EFBFBD>']:=new_table['<27>ұ<EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:=old_field['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_field['ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>']:=old_field['ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>'];
new_field['<27><><EFBFBD><EFBFBD>']:='2';
new_field.post;
end;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton27Click(Sender: TObject);
begin
t_sys_employee.open;
t_crm_client.open;
end;
procedure TForm1.bsSkinButton28Click(Sender: TObject);
begin
new_field.close;
new_field.sql.clear;
new_field.sql.add('select distinct ί<>е<EFBFBD>λ as <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_op_seae where ί<>е<EFBFBD>λ not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client)');
new_field.open;
end;
procedure TForm1.bsSkinButton29Click(Sender: TObject);
begin
new_field.close;
new_field.sql.clear;
new_field.sql.add('select distinct ί<>е<EFBFBD>λ as <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_op_seai where ί<>е<EFBFBD>λ not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client)');
new_field.open;
end;
procedure TForm1.bsSkinButton30Click(Sender: TObject);
begin
new_field.close;
new_field.sql.clear;
new_field.sql.add('select distinct ί<>е<EFBFBD>λ as <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_op_aire where ί<>е<EFBFBD>λ not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client)');
new_field.open;
end;
procedure TForm1.bsSkinButton31Click(Sender: TObject);
begin
new_field.close;
new_field.sql.clear;
new_field.sql.add('select distinct ί<>е<EFBFBD>λ as <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_op_airi where ί<>е<EFBFBD>λ not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client)');
new_field.open;
end;
procedure TForm1.bsSkinButton32Click(Sender: TObject);
begin
new_field.close;
new_field.sql.clear;
new_field.sql.add('select distinct <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> as <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_ch_balance where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client)');
new_field.open;
end;
procedure TForm1.bsSkinButton33Click(Sender: TObject);
begin
new_field.close;
new_field.sql.clear;
new_field.sql.add('select distinct <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> as <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client)');
new_field.open;
end;
procedure TForm1.bsSkinButton34Click(Sender: TObject);
begin
new_field.close;
new_field.sql.clear;
new_field.sql.add('select distinct <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> as <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_ch_check where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client)');
new_field.open;
end;
procedure TForm1.bsSkinButton35Click(Sender: TObject);
begin
new_field.close;
new_field.sql.clear;
new_field.sql.add('select distinct <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> as <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_ch_invoice_shen where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client)');
new_field.open;
end;
procedure TForm1.bsSkinButton36Click(Sender: TObject);
begin
new_field.close;
new_field.sql.clear;
new_field.sql.add('select distinct <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> as <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_ch_invoice where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> not in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client)');
new_field.open;
end;
procedure TForm1.bsSkinButton37Click(Sender: TObject);
begin
p_update.Parameters.ParamByName('SQLStr').value:=
' update t_op_seae set ί<>е<EFBFBD>λ='+''''+Edit2.text+''''+' where ί<>е<EFBFBD>λ='+''''+Edit1.text+''''
+' update t_op_seai set ί<>е<EFBFBD>λ='+''''+Edit2.text+''''+' where ί<>е<EFBFBD>λ='+''''+Edit1.text+''''
+' update t_op_aire set ί<>е<EFBFBD>λ='+''''+Edit2.text+''''+' where ί<>е<EFBFBD>λ='+''''+Edit1.text+''''
+' update t_op_airi set ί<>е<EFBFBD>λ='+''''+Edit2.text+''''+' where ί<>е<EFBFBD>λ='+''''+Edit1.text+''''
+' update t_ch_balance set <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit2.text+''''+' where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit1.text+''''
+' update t_ch_fee set <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit2.text+''''+' where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit1.text+''''
+' update t_ch_check set <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit2.text+''''+' where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit1.text+''''
+' update t_ch_t_ch_invoice_shen set <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit2.text+''''+' where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit1.text+''''
+' update t_ch_t_ch_invoice set <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit2.text+''''+' where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+Edit1.text+'''';
p_update.ExecProc;
showmessage('ok');
end;
procedure TForm1.bsSkinButton38Click(Sender: TObject);
begin
old_db.GetTableNames(CheckListBox6.Items);
t_sys_report_lei.open;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if wwDBLookupCombo1.text='' then
exit;
t_sys_report.close;
t_sys_report.Parameters[0].value:=wwDBLookupCombo1.text;
t_sys_report.open;
if CheckListBox6.Items.Count<1 then
exit;
old_field.Close;
old_field.SQL.text:='select * from '+CheckListBox6.Items[CheckListBox6.ItemIndex];
old_field.open;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if old_field.IsEmpty then
exit;
t_sys_report.insert;
t_sys_report['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=wwDBLookupCombo1.text;
t_sys_report['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field[Edit3.text];
t_sys_report['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field[Edit4.text];
t_sys_report['<27>Ƿ<EFBFBD>Ĭ<EFBFBD><C4AC>']:=0;
t_sys_report.post;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
if old_field.IsEmpty then
exit;
old_field.first;
while not old_field.eof do
begin
t_sys_report.insert;
t_sys_report['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=wwDBLookupCombo1.text;
t_sys_report['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field[Edit3.text];
t_sys_report['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=old_field[Edit4.text];
t_sys_report['<27>Ƿ<EFBFBD>Ĭ<EFBFBD><C4AC>']:=0;
t_sys_report.post;
old_field.next;
end;
showmessage('ok');
end;
procedure TForm1.bsSkinButton39Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_accept where <20>˱<EFBFBD><CBB1><EFBFBD> not in (select <20>˱<EFBFBD><CBB1><EFBFBD> from v_bill)');
old_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
old_field.Delete;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
end;
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_pay where <20>˱<EFBFBD><CBB1><EFBFBD> not in (select <20>˱<EFBFBD><CBB1><EFBFBD> from v_bill)');
old_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
old_field.Delete;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
end;
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_balance_fee where <20>ո<EFBFBD>='+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD><E3B5A5> not in (select <20><><EFBFBD><EFBFBD><E3B5A5> from t_ch_balance_accept)');
old_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
old_field.Delete;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
end;
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_ch_balance_fee where <20>ո<EFBFBD>='+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD><E3B5A5> not in (select <20><><EFBFBD><EFBFBD><E3B5A5> from t_ch_balance_pay)');
old_field.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
old_field.Delete;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
end;
end;
procedure TForm1.bsSkinButton40Click(Sender: TObject);
begin
old_field.close;
old_field.sql.clear;
old_field.sql.add('select * from t_export where ƴ<><C6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in ('
+''''+'ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ'+''''+','+''''+'ƴ<>䵥Ʊ'+''''
+','+''''+'ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ'+''''+')');
old_field.open;
new_table.close;
new_table.SQL.clear;
new_table.sql.add('select * from t_op_seae');
new_table.open;
bsSkinGauge1.MaxValue:=old_field.RecordCount+1;
bsSkinGauge1.Value:=0;
old_field.first;
while not old_field.eof do
begin
if new_table.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',old_field.fieldbyname('<27>˱<EFBFBD><CBB1><EFBFBD>').asstring,[])then
begin
new_table.edit;
new_table['װ<>˷<EFBFBD>ʽ']:=old_field['ƴ<><C6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
new_table.post;
end;
bsSkinGauge1.Value:=bsSkinGauge1.Value+1;
old_field.next;
end;
end;
end.