箱體類零件工藝分析及知識庫研究(減速機(jī))
箱體類零件工藝分析及知識庫研究(減速機(jī)),箱體,零件,工藝,分析,知識庫,研究,減速
unit xjgy;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, Grids, DBGrids, StdCtrls, OleCtrls, VOLOVIEWXLib_TLB,
Buttons, ExtCtrls,shellapi, Menus, DB, ADODB;
type
Tl_xjgy = class(TForm)
StatusBar1: TStatusBar;
Splitter2: TSplitter;
Splitter1: TSplitter;
SaveDialog1: TSaveDialog;
ADOQuery8: TADOQuery;
ADOQuery7: TADOQuery;
ADOQuery6: TADOQuery;
ADOQuery5: TADOQuery;
ADOQuery4: TADOQuery;
ADOQuery3: TADOQuery;
DataSource1: TDataSource;
ADOQuery2: TADOQuery;
ADOQuery1: TADOQuery;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
Panel3: TPanel;
Splitter3: TSplitter;
Splitter4: TSplitter;
Panel4: TPanel;
Panel7: TPanel;
SpeedButton2: TSpeedButton;
SpeedButton1: TSpeedButton;
SpeedButton5: TSpeedButton;
SpeedButton4: TSpeedButton;
SpeedButton6: TSpeedButton;
SpeedButton3: TSpeedButton;
Panel8: TPanel;
AvViewX1: TAvViewX;
Panel5: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Panel6: TPanel;
DBGrid1: TDBGrid;
Panel2: TPanel;
Panel9: TPanel;
Label6: TLabel;
Panel10: TPanel;
Panel11: TPanel;
Label7: TLabel;
Label8: TLabel;
Edit7: TEdit;
Edit8: TEdit;
Panel12: TPanel;
Label4: TLabel;
Label5: TLabel;
Edit4: TEdit;
Edit5: TEdit;
Panel1: TPanel;
TreeView1: TTreeView;
TreeView2: TTreeView;
TreeView3: TTreeView;
TreeView4: TTreeView;
TreeView5: TTreeView;
TreeView6: TTreeView;
OpenDialog1: TOpenDialog;
N3: TMenuItem;
N4: TMenuItem;
ADOQuery9: TADOQuery;
ADOQuery10: TADOQuery;
Label9: TLabel;
Label10: TLabel;
Edit6: TEdit;
Edit9: TEdit;
ADOQuery8DSDesigner: TIntegerField;
ADOQuery8DSDesigner2: TIntegerField;
ADOQuery8DSDesigner3: TStringField;
ADOQuery8DSDesigner4: TStringField;
ADOQuery8DSDesigner5: TStringField;
ADOQuery8DSDesigner6: TStringField;
ADOQuery8DSDesigner7: TStringField;
ADOQuery8DSDesigner8: TStringField;
ADOQuery8DSDesigner9: TStringField;
ADOQuery8DSDesigner10: TStringField;
ADOQuery8DSDesigner11: TFloatField;
ADOQuery8DSDesigner12: TStringField;
ADOQuery8DSDesigner13: TStringField;
ADOQuery8DSDesigner14: TStringField;
ADOQuery8DSDesigner15: TStringField;
ADOQuery8DSDesigner16: TStringField;
ADOQuery8DSDesigner17: TStringField;
ADOQuery8DSDesigner18: TStringField;
ADOQuery8DSDesigner19: TStringField;
ADOQuery8DSDesigner20: TStringField;
tuxing2: TBlobField;
ADOQuery2DSDesigner: TIntegerField;
ADOQuery2DSDesigner2: TIntegerField;
ADOQuery2DSDesigner3: TStringField;
ADOQuery2DSDesigner4: TStringField;
ADOQuery2DSDesigner5: TStringField;
ADOQuery2DSDesigner6: TStringField;
ADOQuery2DSDesigner7: TStringField;
ADOQuery2DSDesigner8: TStringField;
ADOQuery2DSDesigner9: TStringField;
ADOQuery2DSDesigner10: TStringField;
ADOQuery2DSDesigner11: TFloatField;
ADOQuery2DSDesigner12: TStringField;
ADOQuery2DSDesigner13: TStringField;
ADOQuery2DSDesigner14: TStringField;
ADOQuery2DSDesigner15: TStringField;
ADOQuery2DSDesigner16: TStringField;
ADOQuery2DSDesigner17: TStringField;
ADOQuery2DSDesigner18: TStringField;
ADOQuery2DSDesigner19: TStringField;
ADOQuery2DSDesigner20: TStringField;
tuxing: TBlobField;
procedure FormCreate(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
procedure DBGrid1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure TreeView1Change(Sender: TObject; Node: TTreeNode);
procedure TreeView2Change(Sender: TObject; Node: TTreeNode);
procedure TreeView3Change(Sender: TObject; Node: TTreeNode);
procedure TreeView4Change(Sender: TObject; Node: TTreeNode);
procedure TreeView5Change(Sender: TObject; Node: TTreeNode);
procedure TreeView6Change(Sender: TObject; Node: TTreeNode);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure SpeedButton6Click(Sender: TObject);
procedure SpeedButton4Click(Sender: TObject);
procedure SpeedButton5Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure LoadgcmcTREE;
procedure LoadgcnrTREE;
procedure LoadjckTREE;
procedure LoadjjkTREE;
procedure LoaddjkTREE;
procedure LoadljkTREE;
end;
var
l_xjgy: Tl_xjgy;
tup,wjj:string;
implementation
uses unit1;
{$R *.dfm}
procedure Tl_xjgy.FormCreate(Sender: TObject);
var
i,ss:integer;
serveString: string;
begin
wjj:=GetCurrentDir;
//下面一部分是動(dòng)態(tài)連接數(shù)據(jù)庫
adoquery1.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select * from 工序名稱庫') ;
adoquery1.open;
adoquery2.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery2.SQL.Clear;
adoquery2.SQL.Add('select * from 機(jī)械加工工藝過程卡片') ;
adoquery2.open;
adoquery3.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery3.SQL.Clear;
adoquery3.SQL.Add('select * from 工序內(nèi)容') ;
adoquery3.open;
adoquery4.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery4.SQL.Clear;
adoquery4.SQL.Add('select * from 機(jī)床庫') ;
adoquery4.open;
adoquery5.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery5.SQL.Clear;
adoquery5.SQL.Add('select * from 夾具庫') ;
adoquery5.open;
adoquery6.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery6.SQL.Clear;
adoquery6.SQL.Add('select * from 刀具庫') ;
adoquery6.open;
adoquery7.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery7.SQL.Clear;
adoquery7.SQL.Add('select * from 量具庫') ;
adoquery7.open;
adoquery8.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery8.SQL.Clear;
adoquery8.SQL.Add('select * from 機(jī)械加工工藝過程卡片2') ;
adoquery8.open;
adoquery9.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery9.SQL.Clear;
adoquery9.SQL.Add('select * from 零件名稱匯總') ;
adoquery9.open;
adoquery10.ConnectionString:='Provider=SQLOLEDB.1;Password='+trim(form1.Edit4.Text)+';Persist Security Info=True;User ID=sa;Initial Catalog=bysjcapp;Data Source='+trim(form1.Edit3.Text)+'';
adoquery10.SQL.Clear;
adoquery10.SQL.Add('select * from 零件工藝匯總') ;
adoquery10.open;
LoadgcnrTREE;
LoadjckTREE;
LoadjjkTREE;
LoaddjkTREE;
LoadljkTREE;
LoadgcmcTREE;
treeview1.Visible:=true;
treeview2.Visible:=false;
treeview3.Visible:=false;
treeview4.Visible:=false;
treeview5.Visible:=false;
treeview6.Visible:=false;
adoquery2.First;
while not adoquery2.Eof do
begin
adoquery2.Delete;
end;
ss:=10;
for i:=1 to 15 do
begin
adoquery2.Append;
adoquery2['工序標(biāo)志']:=ss;
adoquery2.Post;
ss:=ss+10;
end;
adoquery2.Active:=false;
adoquery2.Active:=true;
//改變網(wǎng)格大小
dbgrid1.Columns[0].Width:=50;
dbgrid1.Columns[1].Width:=100;
dbgrid1.Columns[2].Width:=100;
dbgrid1.Columns[3].Width:=60;
dbgrid1.Columns[4].Width:=60;
dbgrid1.Columns[5].Width:=70;
dbgrid1.Columns[6].Width:=70;
dbgrid1.Columns[7].Width:=70;
dbgrid1.Columns[8].Width:=70;
dbgrid1.Columns[9].Width:=60;
end;
procedure Tl_xjgy.LoadgcmcTREE;
var
RootNode, CatNode : TTreeNode;
Category : string;
begin
treeview1.Items.Clear;
RootNode := treeview1.Items.Add( nil, '工序名稱' );
RootNode.ImageIndex := 0; { Specify which bitmap to use }
RootNode.SelectedIndex := 0;
adoquery1.First;
while not adoquery1.Eof do
begin
Category := adoquery1.fieldbyname('工序名稱').AsString;
CatNode := treeview1.Items.AddChild( RootNode, Category );
CatNode.ImageIndex := 5;
CatNode.SelectedIndex := 2;
adoquery1.Next;
end;
end;
procedure Tl_xjgy.LoadgcnrTREE;
var
RootNode, CatNode : TTreeNode;
Category : string;
begin
treeview2.Items.Clear;
RootNode := treeview2.Items.Add( nil, '工序內(nèi)容' );
RootNode.ImageIndex := 0; { Specify which bitmap to use }
RootNode.SelectedIndex := 0;
adoquery3.First;
while not adoquery3.Eof do
begin
Category := adoquery3.fieldbyname('工序內(nèi)容').AsString;
CatNode := treeview2.Items.AddChild( RootNode, Category );
CatNode.ImageIndex := 5;
CatNode.SelectedIndex := 2;
adoquery3.Next;
end;
end;
procedure Tl_xjgy.LoadjckTREE;
var
RootNode, TipNode, CatNode : TTreeNode;
ss,Category,jidian : string;
begin
treeview3.Items.Clear;
adoquery4.First;
while not adoquery4.Eof do
begin
if (adoquery4['機(jī)床標(biāo)志1']=0) and (adoquery4['機(jī)床標(biāo)志2']=0) and (adoquery4['機(jī)床標(biāo)志3']=0)then
begin
ss:=adoquery4['機(jī)床名稱'];
RootNode := treeview3.Items.Add( nil, ss );
RootNode.ImageIndex := 0; { Specify which bitmap to use }
RootNode.SelectedIndex := 0;
end;
if (adoquery4['機(jī)床標(biāo)志1']=0) and (adoquery4['機(jī)床標(biāo)志2']=0) and (adoquery4['機(jī)床標(biāo)志3']=1)then
begin
Category := adoquery4.fieldbyname('機(jī)床分類').AsString;
CatNode := treeview3.Items.AddChild( RootNode, Category );
CatNode.ImageIndex := 5;
CatNode.SelectedIndex := 2;
end;
if (adoquery4['機(jī)床標(biāo)志1']=1) and (adoquery4['機(jī)床標(biāo)志2']=1) and (adoquery4['機(jī)床標(biāo)志3']=1)then
begin
jidian := adoquery4.fieldbyname('機(jī)床型號').AsString;
tipNode := treeview3.Items.addchild( catnode,jidian );
tipNode.ImageIndex := 5;
tipNode.SelectedIndex := 2;
end;
adoquery4.Next;
end;
end;
procedure Tl_xjgy.LoadjjkTREE;
var
RootNode, TipNode, CatNode : TTreeNode;
ss,Category,jidian : string;
begin
treeview4.Items.Clear;
adoquery5.First;
while not adoquery5.Eof do
begin
if (adoquery5['夾具標(biāo)志1']=0) and (adoquery5['夾具標(biāo)志2']=0) and (adoquery5['夾具標(biāo)志3']=0)then
begin
ss:=adoquery5['夾具總稱'];
RootNode := treeview4.Items.Add( nil, ss );
RootNode.ImageIndex := 0; { Specify which bitmap to use }
RootNode.SelectedIndex := 0;
end;
if (adoquery5['夾具標(biāo)志1']=0) and (adoquery5['夾具標(biāo)志2']=0) and (adoquery5['夾具標(biāo)志3']=1)then
begin
Category := adoquery5.fieldbyname('夾具分類').AsString;
CatNode := treeview4.Items.AddChild( RootNode, Category );
CatNode.ImageIndex := 5;
CatNode.SelectedIndex := 2;
end;
if (adoquery5['夾具標(biāo)志1']=1) and (adoquery5['夾具標(biāo)志2']=1) and (adoquery5['夾具標(biāo)志3']=1)then
begin
jidian := adoquery5.fieldbyname('夾具名稱').AsString;
tipNode := treeview4.Items.addchild( catnode,jidian );
tipNode.ImageIndex := 5;
tipNode.SelectedIndex := 2;
end;
adoquery5.Next;
end;
end;
procedure Tl_xjgy.LoaddjkTREE;
var
RootNode,CatNode : TTreeNode;
ss,Category : string;
begin
treeview5.Items.Clear;
adoquery6.First;
while not adoquery6.Eof do
begin
if (adoquery6['刀具標(biāo)志1']=0) and (adoquery6['刀具標(biāo)志2']=1) then
begin
ss:=adoquery6['刀具名稱'];
RootNode := treeview5.Items.Add( nil, ss );
RootNode.ImageIndex := 0; { Specify which bitmap to use }
RootNode.SelectedIndex := 0;
end;
if (adoquery6['刀具標(biāo)志1']=1) and (adoquery6['刀具標(biāo)志2']=0) then
begin
Category := adoquery6.fieldbyname('刀具規(guī)格').AsString;
CatNode := treeview5.Items.AddChild( RootNode, Category );
CatNode.ImageIndex := 5;
CatNode.SelectedIndex := 2;
end;
adoquery6.Next;
end;
end;
procedure Tl_xjgy.LoadljkTREE;
var
RootNode, CatNode : TTreeNode;
ss,Category : string;
begin
treeview6.Items.Clear;
adoquery7.First;
while not adoquery7.Eof do
begin
if (adoquery7['量具標(biāo)志1']=0) and (adoquery7['量具標(biāo)志2']=1) then
begin
ss:=adoquery7['量具名稱'];
RootNode := treeview6.Items.Add( nil, ss );
RootNode.ImageIndex := 0; { Specify which bitmap to use }
RootNode.SelectedIndex := 0;
end;
if (adoquery7['量具標(biāo)志1']=1) and (adoquery7['量具標(biāo)志2']=0) then
begin
Category := adoquery7.fieldbyname('量具規(guī)格').AsString;
CatNode := treeview6.Items.AddChild( RootNode, Category );
CatNode.ImageIndex := 5;
CatNode.SelectedIndex := 2;
end;
adoquery7.Next;
end;
end;
procedure Tl_xjgy.SpeedButton3Click(Sender: TObject);
begin
close;
end;
procedure Tl_xjgy.DBGrid1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if (DBGrid1.SelectedIndex = 1) then
begin
//調(diào)用相應(yīng)樹形結(jié)構(gòu)
treeview1.Visible:=true;
treeview2.Visible:=false;
treeview3.Visible:=false;
treeview4.Visible:=false;
treeview5.Visible:=false;
treeview6.Visible:=false;
end;
if (DBGrid1.SelectedIndex = 2) then
begin
treeview2.Visible:=true;
treeview1.Visible:=false;
treeview3.Visible:=false;
treeview4.Visible:=false;
treeview5.Visible:=false;
treeview6.Visible:=false;
end;
if (DBGrid1.SelectedIndex = 5) then
begin
treeview3.Visible:=true;
treeview2.Visible:=false;
treeview1.Visible:=false;
treeview4.Visible:=false;
treeview5.Visible:=false;
treeview6.Visible:=false;
end;
if (DBGrid1.SelectedIndex = 6) then
begin
treeview4.Visible:=true;
treeview2.Visible:=false;
treeview3.Visible:=false;
treeview1.Visible:=false;
treeview5.Visible:=false;
treeview6.Visible:=false;
end;
if (DBGrid1.SelectedIndex = 7) then
begin
treeview5.Visible:=true;
treeview2.Visible:=false;
treeview3.Visible:=false;
treeview4.Visible:=false;
treeview1.Visible:=false;
treeview6.Visible:=false;
end;
if (DBGrid1.SelectedIndex = 8) then
begin
treeview6.Visible:=true;
treeview2.Visible:=false;
treeview3.Visible:=false;
treeview4.Visible:=false;
treeview5.Visible:=false;
treeview1.Visible:=false;
end;
end;
procedure Tl_xjgy.TreeView1Change(Sender: TObject; Node: TTreeNode);
begin
if (DBGrid1.SelectedIndex = 1) then
begin
adoquery2.Edit;
adoquery2['工序名稱']:=TreeView1.Selected.Text;
adoquery2.Post;
end;
end;
procedure Tl_xjgy.TreeView2Change(Sender: TObject; Node: TTreeNode);
begin
if (DBGrid1.SelectedIndex = 2) then
begin
adoquery2.Edit;
adoquery2['工序內(nèi)容']:=TreeView2.Selected.Text;
adoquery2.Post;
end;
end;
procedure Tl_xjgy.TreeView3Change(Sender: TObject; Node: TTreeNode);
begin
if (DBGrid1.SelectedIndex = 5) then
begin
adoquery2.Edit;
adoquery2['機(jī)床設(shè)備']:=TreeView3.Selected.Text;
adoquery2.Post;
end;
end;
procedure Tl_xjgy.TreeView4Change(Sender: TObject; Node: TTreeNode);
begin
if (DBGrid1.SelectedIndex = 6) then
begin
adoquery2.Edit;
adoquery2['夾具設(shè)備']:=TreeView4.Selected.Text;
adoquery2.Post;
end;
end;
procedure Tl_xjgy.TreeView5Change(Sender: TObject; Node: TTreeNode);
begin
if (DBGrid1.SelectedIndex = 7) then
begin
adoquery2.Edit;
adoquery2['刀具設(shè)備']:=TreeView5.Selected.Text;
adoquery2.Post;
end;
end;
procedure Tl_xjgy.TreeView6Change(Sender: TObject; Node: TTreeNode);
begin
if (DBGrid1.SelectedIndex = 8) then
begin
adoquery2.Edit;
adoquery2['量具設(shè)備']:=TreeView6.Selected.Text;
adoquery2.Post;
end;
end;
procedure Tl_xjgy.N1Click(Sender: TObject);
begin
avviewx1.ClearMarkup ;
if opendialog1.Execute then
begin
tup:=opendialog1.filename;
end;
avviewx1.src :=tup ;
if tup<>'' then
begin
avviewx1.Visible:=true;
end
else begin end;
end;
procedure Tl_xjgy.N2Click(Sender: TObject);
begin
avviewx1.ClearMarkup;
avviewx1.Visible:=false;
end;
procedure Tl_xjgy.SpeedButton6Click(Sender: TObject);
var
s:integer;
begin
adoquery2.Last;
s:=adoquery2['工序標(biāo)志'];
adoquery2.Append;
s:=s+10;
adoquery2['工序標(biāo)志']:=s;
end;
procedure Tl_xjgy.SpeedButton4Click(Sender: TObject);
var
aa,bb:integer;
begin
try
begin
aa:=adoquery2['工序標(biāo)志'];
aa:=aa-1;
adoquery2.Prior;
bb:=adoquery2['工序標(biāo)志'];
adoquery2.Insert;
if aa=bb then
begin
bb:=bb-1;
adoquery2['工序標(biāo)志']:=bb;
end else adoquery2['工序標(biāo)志']:=aa;
adoquery2.Post;
end
except showmessage('請將指針上移,謝謝');
end;
adoquery2.Active:=false;
adoquery2.Active:=true;
end;
procedure Tl_xjgy.SpeedButton5Click(Sender: TObject);
begin
adoquery2.delete;
adoquery2.Refresh;
end;
procedure Tl_xjgy.SpeedButton1Click(Sender: TObject);
begin
if (edit4.Text<>'')and (edit8.Text<>'') then
begin
if MessageDlg('是否要提交?',mtConfirmation, [mbYes, mbNo], 0 )=mryes then
begin
adoquery2.Refresh;
adoquery2.First;
adoquery2.Edit;
adoquery2['產(chǎn)品名稱']:=edit4.Text;
adoquery2['產(chǎn)品型號']:=edit7.Text;
adoquery2['零件圖號']:=edit5.Text;
adoquery2['零件名稱']:=edit8.Text;
adoquery2['編制日期']:=edit1.Text;
adoquery2['校對日期']:=edit2.Text;
adoquery2['審核日期']:=edit3.Text;
adoquery2['材料牌號']:=edit6.Text;
adoquery2['毛坯種類']:=edit9.Text;
tuxing.LoadFromFile(tup) ;
adoquery2.Post;
adoquery9.Append;
adoquery9['零件名稱']:=edit8.Text;
adoquery9.Post;
adoquery2.First;
repeat
begin
adoquery10.Append;
adoquery10['零件名稱']:=edit8.Text;
adoquery10['產(chǎn)品名稱']:=adoquery2['產(chǎn)品名稱'];
adoquery10['產(chǎn)品型號']:=adoquery2['產(chǎn)品型號'];
adoquery10['零件圖號']:=adoquery2['零件圖號'];
adoquery10['編制日期']:=adoquery2['編制日期'];
adoquery10['校對日期']:=adoquery2['校對日期'];
adoquery10['審核日期']:=adoquery2['審核日期'];
adoquery10['材料牌號']:=adoquery2['材料牌號'];
adoquery10['毛坯種類']:=adoquery2['毛坯種類'];
adoquery10['圖形']:=adoquery2['圖形'];
adoquery10['工序號']:=adoquery2['工序號'];
adoquery10.fieldbyname('工序名稱').AsString:=adoquery2.fieldbyname('工序名稱').AsString;
adoquery10.fieldbyname('工序內(nèi)容').AsString:=adoquery2.fieldbyname('工序內(nèi)容').AsString;
adoquery10.fieldbyname('車間').AsString:=adoquery2.fieldbyname('車間').AsString;
adoquery10.fieldbyname('工段').AsString:=adoquery2.fieldbyname('工段').AsString;
adoquery10.fieldbyname('機(jī)床設(shè)備').AsString:=adoquery2.fieldbyname('機(jī)床設(shè)備').AsString;
adoquery10.fieldbyname('夾具設(shè)備').AsString:=adoquery2.fieldbyname('夾具設(shè)備').AsString;
adoquery10.fieldbyname('刀具設(shè)備').AsString:=adoquery2.fieldbyname('刀具設(shè)備').AsString;
adoquery10.fieldbyname('量具設(shè)備').AsString:=adoquery2.fieldbyname('量具設(shè)備').AsString;
adoquery10.fieldbyname('單件工時(shí)').AsString:=adoquery2.fieldbyname('單件工時(shí)').AsString;
adoquery10.Post;
adoquery2.Next;
end;
until adoquery2.Eof;
showmessage('提交成功!');
speedbutton1.Enabled:=false;
end;
end else showmessage('請輸入產(chǎn)品和零件名稱!');
end;
procedure Tl_xjgy.SpeedButton2Click(Sender: TObject);
var
filename:string;
begin
adoq
收藏