unit u_info_price_release; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, dxExEdtr, DB, ADODB, DBCtrls, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb, bsSkinCtrls, wwdblook, RxLookup, dxDBTLCl, dxGrClms, dxDBCtrl, dxDBGrid, dxTL, dxCntner, ExtCtrls; type Tfrm_info_price_release = class(TForm) Panel1: TPanel; bsSkinButton7: TbsSkinButton; bsSkinButton6: TbsSkinButton; bsSkinButton1: TbsSkinButton; bsSkinButton2: TbsSkinButton; bsSkinButton3: TbsSkinButton; bsSkinButton4: TbsSkinButton; bsSkinButton8: TbsSkinButton; bsSkinButton9: TbsSkinButton; bsSkinButton11: TbsSkinButton; bsSkinButton5: TbsSkinButton; bsSkinButton10: TbsSkinButton; Notebook1: TNotebook; bsSkinGroupBox1: TbsSkinGroupBox; dxDBGrid2: TdxDBGrid; dxDBGridMaskColumn1: TdxDBGridMaskColumn; dxDBGridMaskColumn2: TdxDBGridMaskColumn; dxDBGridMaskColumn3: TdxDBGridMaskColumn; dxDBGridMaskColumn4: TdxDBGridMaskColumn; dxDBGridMaskColumn5: TdxDBGridMaskColumn; dxDBGridMaskColumn6: TdxDBGridMaskColumn; dxDBGridMaskColumn7: TdxDBGridMaskColumn; dxDBGridMaskColumn8: TdxDBGridMaskColumn; dxDBGridMaskColumn9: TdxDBGridMaskColumn; dxDBGridMaskColumn10: TdxDBGridMaskColumn; dxDBGridMaskColumn11: TdxDBGridMaskColumn; dxDBGrid1Column12: TdxDBGridMaskColumn; dxDBGrid1Column13: TdxDBGridMaskColumn; dxDBGrid1Column14: TdxDBGridMaskColumn; dxDBGrid1Column15: TdxDBGridMaskColumn; dxDBGrid1Column16: TdxDBGridMaskColumn; dxDBGrid1Column17: TdxDBGridMaskColumn; dxDBGrid1Column18: TdxDBGridMaskColumn; dxDBGrid1Column19: TdxDBGridMaskColumn; dxDBGridMaskColumn12: TdxDBGridMaskColumn; dxDBGridMaskColumn13: TdxDBGridMaskColumn; dxDBGridMaskColumn14: TdxDBGridMaskColumn; dxDBGrid1Column23: TdxDBGridMaskColumn; dxDBGrid1Column24: TdxDBGridMaskColumn; dxDBGrid1Column25: TdxDBGridMaskColumn; dxDBGrid1Column26: TdxDBGridMaskColumn; dxDBGrid1Column27: TdxDBGridMaskColumn; dxDBGrid1Column28: TdxDBGridMaskColumn; dxDBGrid1Column29: TdxDBGridMaskColumn; dxDBGrid1Column30: TdxDBGridMaskColumn; dxDBGrid1Column31: TdxDBGridMaskColumn; dxDBGrid1Column32: TdxDBGridMaskColumn; dxDBGrid1Column33: TdxDBGridMaskColumn; dxDBGrid1Column34: TdxDBGridMaskColumn; dxDBGrid1Column35: TdxDBGridMaskColumn; dxDBGridMaskColumn15: TdxDBGridMaskColumn; dxDBGridMaskColumn16: TdxDBGridMaskColumn; dxDBGridMaskColumn17: TdxDBGridMaskColumn; dxDBGridMaskColumn18: TdxDBGridMaskColumn; dxDBGrid1Column40: TdxDBGridMaskColumn; dxDBGridDateColumn1: TdxDBGridDateColumn; dxDBGridDateColumn2: TdxDBGridDateColumn; dxDBGridMaskColumn19: TdxDBGridMaskColumn; dxDBGridDateColumn3: TdxDBGridDateColumn; dxDBGrid1Column45: TdxDBGridColumn; dxDBGrid1Column46: TdxDBGridColumn; dxDBGrid1Column47: TdxDBGridColumn; dxDBGrid1Column48: TdxDBGridColumn; dxDBGrid1Column49: TdxDBGridColumn; dxDBGrid1Column50: TdxDBGridColumn; dxDBGrid1Column51: TdxDBGridColumn; dxDBGrid1Column52: TdxDBGridColumn; dxDBGrid1Column53: TdxDBGridColumn; dxDBGrid1Column54: TdxDBGridColumn; bsSkinPanel1: TbsSkinPanel; Label8: TLabel; Label10: TLabel; RxDBLookupCombo3: TRxDBLookupCombo; wwDBLookupCombo2: TwwDBLookupCombo; bsSkinButton12: TbsSkinButton; bsSkinButton13: TbsSkinButton; wwDBComboBox3: TwwDBComboBox; bsSkinGroupBox2: TbsSkinGroupBox; Label14: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; DBEdit31: TDBEdit; DBEdit1: TDBEdit; DBEdit2: TDBEdit; DBEdit3: TDBEdit; t_price_release: TADOQuery; t_price_release1: TDataSource; t_price_ship: TADOQuery; t_price_ship1: TDataSource; t_price_release_port: TADOQuery; t_price_release_port1: TDataSource; Label1: TLabel; DBEdit11: TDBEdit; bsSkinGroupBox3: TbsSkinGroupBox; dxDBGrid1: TdxDBGrid; dxDBGrid1Column4: TdxDBGridColumn; dxDBGrid1Column3: TdxDBGridColumn; dxDBGrid1Column2: TdxDBGridColumn; dxDBGrid1Column5: TdxDBGridColumn; dxDBGrid120GP: TdxDBGridColumn; dxDBGrid140GP: TdxDBGridColumn; dxDBGrid140HQ: TdxDBGridColumn; dxDBGrid140RF: TdxDBGridColumn; dxDBGrid140RH: TdxDBGridColumn; dxDBGrid145HQ: TdxDBGridColumn; dxDBGrid1Column20: TdxDBGridColumn; dxDBGrid1Column21: TdxDBGridColumn; dxDBGrid1Column37: TdxDBGridColumn; dxDBGrid1Column38: TdxDBGridColumn; dxDBGrid1Column39: TdxDBGridColumn; Label2: TLabel; dxDBGrid1Column22: TdxDBGridColumn; bsSkinButton14: TbsSkinButton; bsSkinButton15: TbsSkinButton; dxDBGrid3: TdxDBGrid; dxDBGrid3Column1: TdxDBGridMaskColumn; dxDBGrid3Column2: TdxDBGridMaskColumn; dxDBGrid3Column3: TdxDBGridDateColumn; dxDBGrid3Column4: TdxDBGridMaskColumn; dxDBGrid3Column5: TdxDBGridMaskColumn; bsSkinButton16: TbsSkinButton; procedure bsSkinButton9Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure bsSkinButton7Click(Sender: TObject); procedure bsSkinButton6Click(Sender: TObject); procedure bsSkinButton11Click(Sender: TObject); procedure bsSkinButton8Click(Sender: TObject); procedure bsSkinButton4Click(Sender: TObject); procedure bsSkinButton10Click(Sender: TObject); procedure bsSkinButton2Click(Sender: TObject); procedure bsSkinButton3Click(Sender: TObject); procedure bsSkinButton5Click(Sender: TObject); procedure t_price_releaseAfterInsert(DataSet: TDataSet); procedure FormShow(Sender: TObject); procedure Panel1Resize(Sender: TObject); procedure t_price_releaseBeforeEdit(DataSet: TDataSet); procedure bsSkinButton12Click(Sender: TObject); procedure bsSkinButton13Click(Sender: TObject); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure bsSkinButton14Click(Sender: TObject); procedure bsSkinButton15Click(Sender: TObject); procedure t_price_release_portAfterInsert(DataSet: TDataSet); procedure bsSkinButton16Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure DBEdit31KeyPress(Sender: TObject; var Key: Char); procedure DBEdit11KeyPress(Sender: TObject; var Key: Char); procedure DBEdit1KeyPress(Sender: TObject; var Key: Char); procedure DBEdit2KeyPress(Sender: TObject; var Key: Char); procedure dxDBGrid3ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); private { Private declarations } public { Public declarations } end; var frm_info_price_release: Tfrm_info_price_release; implementation uses u_main, u_data_share, my_sys_function, u_info_price_release_query; {$R *.dfm} procedure Tfrm_info_price_release.bsSkinButton9Click(Sender: TObject); begin close; end; procedure Tfrm_info_price_release.FormClose(Sender: TObject; var Action: TCloseAction); begin frm_info_price_release.Hide; frm_info_price_release.ManualFloat(frm_info_price_release.BoundsRect ); frm_main.freeTabs('frm_info_price_release'); action:=cafree; frm_info_price_release:=nil; end; procedure Tfrm_info_price_release.bsSkinButton7Click(Sender: TObject); begin table_Prior(t_price_release); end; procedure Tfrm_info_price_release.bsSkinButton6Click(Sender: TObject); begin table_next(t_price_release); end; procedure Tfrm_info_price_release.bsSkinButton11Click(Sender: TObject); begin table_post(t_price_release); end; procedure Tfrm_info_price_release.bsSkinButton8Click(Sender: TObject); begin table_cancel(t_price_release); end; procedure Tfrm_info_price_release.bsSkinButton4Click(Sender: TObject); begin table_delete(t_price_release); end; procedure Tfrm_info_price_release.bsSkinButton10Click(Sender: TObject); var answer:TModalResult; begin if bsSkinButton10.Caption='编辑修改' then begin Notebook1.PageIndex:=1; bsSkinButton10.Caption:='返回列表'; end else begin if (t_price_release.State=dsinsert)or(t_price_release.State=dsedit) then BEGIN answer:=messagedlg( '数据已经修改,是否保存?',mtWarning,mbYesNoCancel,0); if answer=mrYes then begin t_price_release.post; end; if answer=mrNo then begin t_price_release.cancel; end; if answer=mrCancel then begin exit; end; END; Notebook1.PageIndex:=0; bsSkinButton10.Caption:='编辑修改'; end; end; procedure Tfrm_info_price_release.bsSkinButton2Click(Sender: TObject); begin t_price_release.insert; Notebook1.PageIndex:=1; bsSkinButton10.Caption:='返回列表'; end; procedure Tfrm_info_price_release.bsSkinButton3Click(Sender: TObject); var afield : variant; i: Integer; begin if t_price_release.IsEmpty then exit; afield := vararraycreate([0,t_price_release.fieldcount-1],varvariant); for i := 0 to (t_price_release.fieldcount-1) do begin afield[i] :=t_price_release.fields[i].value ; end; t_price_release.append; for i := 1 to (t_price_release.fieldcount-1) do begin if t_price_release.fields[i].FieldName<>'发布编号' then t_price_release.fields[i].value := afield[i] ; end; t_price_release['发布人']:=employee; t_price_release['发布日期']:=date; Notebook1.PageIndex:=1; bsSkinButton10.Caption:='返回列表'; showmessage('复制添加成功!!'); end; procedure Tfrm_info_price_release.bsSkinButton5Click(Sender: TObject); begin sys_print('运价发布打印',2,t_price_release1,frm_data_share.t_code_price_ctn1,nil,nil,t_price_release_port1,nil,nil,nil,nil,nil,nil); end; procedure Tfrm_info_price_release.t_price_releaseAfterInsert( DataSet: TDataSet); begin t_price_release['发布人']:=employee; t_price_release['发布日期']:=date; end; procedure Tfrm_info_price_release.FormShow(Sender: TObject); begin t_price_release.sql.Clear; t_price_release.sql.add('SELECT top 100 * FROM t_price_release '); t_price_release.sql.add('where '+open_data('3007','发布人','no','no','no','no')); t_price_release.sql.add(' order by 发布日期'); t_price_release.open; t_price_release_port.open; frm_data_share.t_code_price_ctn.requery; if frm_data_share.t_code_price_ctn.IsEmpty then exit; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型1').asstring)<>'' then begin dxDBGrid120GP.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型1').asstring); dxDBGrid120GP.Visible:=true; end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型2').asstring)<>'' then begin dxDBGrid140GP.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型2').asstring); dxDBGrid140GP.Visible:=true; end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型3').asstring)<>'' then begin dxDBGrid140HQ.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型3').asstring); dxDBGrid140HQ.Visible:=true; end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型4').asstring)<>'' then begin dxDBGrid140RF.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型4').asstring); dxDBGrid140RF.Visible:=true; end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型5').asstring)<>'' then begin dxDBGrid140RH.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型5').asstring); dxDBGrid140RH.Visible:=true; end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型6').asstring)<>'' then begin dxDBGrid145HQ.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型6').asstring); dxDBGrid145HQ.Visible:=true; end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型7').asstring)<>'' then begin dxDBGrid1Column20.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型7').asstring); dxDBGrid1Column20.Visible:=true; end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型8').asstring)<>'' then begin dxDBGrid1Column21.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型8').asstring); dxDBGrid1Column21.Visible:=true; end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型1').asstring)<>'' then begin dxDBGrid2.Bands[1].Visible:=true; dxDBGrid2.Bands[1].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型1').asstring); end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型2').asstring)<>'' then begin dxDBGrid2.Bands[2].Visible:=true; dxDBGrid2.Bands[2].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型2').asstring); end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型3').asstring)<>'' then begin dxDBGrid2.Bands[3].Visible:=true; dxDBGrid2.Bands[3].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型3').asstring); end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型4').asstring)<>'' then begin dxDBGrid2.Bands[4].Visible:=true; dxDBGrid2.Bands[4].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型4').asstring); end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型5').asstring)<>'' then begin dxDBGrid2.Bands[5].Visible:=true; dxDBGrid2.Bands[5].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型5').asstring); end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型6').asstring)<>'' then begin dxDBGrid2.Bands[6].Visible:=true; dxDBGrid2.Bands[6].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型6').asstring); end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型7').asstring)<>'' then begin dxDBGrid2.Bands[7].Visible:=true; dxDBGrid2.Bands[7].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型7').asstring); end; if trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型8').asstring)<>'' then begin dxDBGrid2.Bands[8].Visible:=true; dxDBGrid2.Bands[8].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('运价箱型8').asstring); end; wwDBComboBox3.Items.Clear; frm_data_share.t_sys_code_data.Filtered:=false; frm_data_share.t_sys_code_data.Filter:='属性='+''''+'3006'+''''; frm_data_share.t_sys_code_data.Filtered:=true; if frm_data_share.t_sys_code_data.IsEmpty then exit; if frm_data_share.t_sys_code_data.Locate('职员','全包底价',[])then begin if frm_data_share.t_sys_code_data.fieldbyname('是否可视').asboolean then begin dxDBGridMaskColumn6.Visible:=true; dxDBGridMaskColumn7.Visible:=true; dxDBGridMaskColumn8.Visible:=true; dxDBGridMaskColumn9.Visible:=true; dxDBGridMaskColumn10.Visible:=true; dxDBGridMaskColumn11.Visible:=true; dxDBGrid1Column45.Visible:=true; dxDBGrid1Column50.Visible:=true; end; end; if frm_data_share.t_sys_code_data.Locate('职员','底价构成',[])then begin if frm_data_share.t_sys_code_data.fieldbyname('是否可视').asboolean then begin dxDBGrid1Column12.Visible:=true; dxDBGrid1Column13.Visible:=true; dxDBGrid1Column14.Visible:=true; dxDBGrid1Column15.Visible:=true; dxDBGrid1Column16.Visible:=true; dxDBGrid1Column17.Visible:=true; dxDBGrid1Column46.Visible:=true; dxDBGrid1Column51.Visible:=true; end; end; if frm_data_share.t_sys_code_data.Locate('职员','一级售价',[])then begin if frm_data_share.t_sys_code_data.fieldbyname('是否可视').asboolean then begin dxDBGrid1Column18.Visible:=true; dxDBGrid1Column19.Visible:=true; dxDBGridMaskColumn12.Visible:=true; dxDBGridMaskColumn13.Visible:=true; dxDBGridMaskColumn14.Visible:=true; dxDBGrid1Column23.Visible:=true; dxDBGrid1Column47.Visible:=true; dxDBGrid1Column52.Visible:=true; wwDBComboBox3.Items.Add('一级售价'); end; end; if frm_data_share.t_sys_code_data.Locate('职员','二级售价',[])then begin if frm_data_share.t_sys_code_data.fieldbyname('是否可视').asboolean then begin dxDBGrid1Column24.Visible:=true; dxDBGrid1Column25.Visible:=true; dxDBGrid1Column26.Visible:=true; dxDBGrid1Column27.Visible:=true; dxDBGrid1Column28.Visible:=true; dxDBGrid1Column29.Visible:=true; dxDBGrid1Column48.Visible:=true; dxDBGrid1Column53.Visible:=true; wwDBComboBox3.Items.Add('二级售价'); end; end; if frm_data_share.t_sys_code_data.Locate('职员','三级售价',[])then begin if frm_data_share.t_sys_code_data.fieldbyname('是否可视').asboolean then begin dxDBGrid1Column30.Visible:=true; dxDBGrid1Column31.Visible:=true; dxDBGrid1Column32.Visible:=true; dxDBGrid1Column33.Visible:=true; dxDBGrid1Column34.Visible:=true; dxDBGrid1Column35.Visible:=true; dxDBGrid1Column49.Visible:=true; dxDBGrid1Column54.Visible:=true; wwDBComboBox3.Items.Add('三级售价'); end; end; end; procedure Tfrm_info_price_release.Panel1Resize(Sender: TObject); var i:integer; begin i:=round(Panel1.Width/11); bsSkinButton5.Width:=i; bsSkinButton7.Width:=i; bsSkinButton6.Width:=i; bsSkinButton2.Width:=i; bsSkinButton3.Width:=i; bsSkinButton10.Width:=i; bsSkinButton11.Width:=i; bsSkinButton4.Width:=i; bsSkinButton8.Width:=i; bsSkinButton1.Width:=i; end; procedure Tfrm_info_price_release.t_price_releaseBeforeEdit( DataSet: TDataSet); begin if do_data('3007',t_price_release.fieldbyname('发布人').asstring,'','','','','')=false then begin showmessage('对不起你无权修改此数据!!'); abort; end; end; procedure Tfrm_info_price_release.bsSkinButton12Click(Sender: TObject); begin t_price_ship.close; t_price_ship.sql.clear; t_price_ship.sql.add('SELECT * FROM t_price_ship where 有效日期>=getdate()'); if wwDBLookupCombo2.text<>''then t_price_ship.sql.add(' and 目的港 like '+''''+'%'+wwDBLookupCombo2.text+'%'+''''); if RxDBLookupCombo3.DisplayValue<>''then t_price_ship.sql.add(' and 船公司='+''''+RxDBLookupCombo3.DisplayValue+''''); t_price_ship.sql.add('order by 运价编号'); t_price_ship.open; end; procedure Tfrm_info_price_release.bsSkinButton13Click(Sender: TObject); var i:integer; begin if wwDBComboBox3.ItemIndex=-1 then begin showmessage('请选择要公布的售价级别!!'); exit; end; if t_price_ship.Active=false then exit; if t_price_ship.IsEmpty then exit; if t_price_release.IsEmpty then exit; if t_price_release.state=dsinsert then t_price_release.post; if dxDBGrid2.SelectedCount>=1 then begin for i:=0 to dxDBGrid2.SelectedCount-1 do begin t_price_ship.GotoBookmark(pointer(dxDBGrid2.selectedrows[i])); t_price_release_port.insert; t_price_release_port['箱型1']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'1').asstring; t_price_release_port['箱型2']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'2').asstring; t_price_release_port['箱型3']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'3').asstring; t_price_release_port['箱型4']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'4').asstring; t_price_release_port['箱型5']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'5').asstring; t_price_release_port['箱型6']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'6').asstring; t_price_release_port['箱型7']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'7').asstring; t_price_release_port['箱型8']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'8').asstring; t_price_release_port['船公司']:=t_price_ship.fieldbyname('船公司').asstring; t_price_release_port['启运港']:=t_price_ship.fieldbyname('启运港').asstring; t_price_release_port['目的港']:=t_price_ship.fieldbyname('目的港').asstring; t_price_release_port['航线']:=t_price_ship.fieldbyname('航线').asstring; t_price_release_port['结关时间']:=t_price_ship.fieldbyname('结关时间').asstring; t_price_release_port['开航时间']:=t_price_ship.fieldbyname('开航时间').asstring; t_price_release_port['航行天数']:=t_price_ship.fieldbyname('航行天数').asstring; t_price_release_port.post; end; exit; end; t_price_release_port.insert; t_price_release_port['箱型1']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'1').asstring; t_price_release_port['箱型2']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'2').asstring; t_price_release_port['箱型3']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'3').asstring; t_price_release_port['箱型4']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'4').asstring; t_price_release_port['箱型5']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'5').asstring; t_price_release_port['箱型6']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'6').asstring; t_price_release_port['箱型7']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'7').asstring; t_price_release_port['箱型8']:=t_price_ship.fieldbyname(wwDBComboBox3.text+'8').asstring; t_price_release_port['船公司']:=t_price_ship.fieldbyname('船公司').asstring; t_price_release_port['启运港']:=t_price_ship.fieldbyname('启运港').asstring; t_price_release_port['目的港']:=t_price_ship.fieldbyname('目的港').asstring; t_price_release_port['航线']:=t_price_ship.fieldbyname('航线').asstring; t_price_release_port['结关时间']:=t_price_ship.fieldbyname('结关时间').asstring; t_price_release_port['开航时间']:=t_price_ship.fieldbyname('开航时间').asstring; t_price_release_port['航行天数']:=t_price_ship.fieldbyname('航行天数').asstring; t_price_release_port.post; end; procedure Tfrm_info_price_release.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin CanClose:=frm_close_query(t_price_release); end; procedure Tfrm_info_price_release.bsSkinButton14Click(Sender: TObject); begin if t_price_release_port.state=dsedit then t_price_release_port.post; end; procedure Tfrm_info_price_release.bsSkinButton15Click(Sender: TObject); begin table_delete(t_price_release_port); end; procedure Tfrm_info_price_release.t_price_release_portAfterInsert( DataSet: TDataSet); begin t_price_release_port['发布编号']:=t_price_release['发布编号']; end; procedure Tfrm_info_price_release.bsSkinButton16Click(Sender: TObject); begin table_cancel(t_price_release_port); end; procedure Tfrm_info_price_release.bsSkinButton1Click(Sender: TObject); begin try frm_info_price_release_query:=tfrm_info_price_release_query.Create (self); frm_info_price_release_query.ShowModal; finally frm_info_price_release_query.Free; end; end; procedure Tfrm_info_price_release.DBEdit31KeyPress(Sender: TObject; var Key: Char); begin key_DBEdit(Key,DBEdit11); end; procedure Tfrm_info_price_release.DBEdit11KeyPress(Sender: TObject; var Key: Char); begin key_DBEdit(Key,DBEdit1); end; procedure Tfrm_info_price_release.DBEdit1KeyPress(Sender: TObject; var Key: Char); begin key_DBEdit(Key,DBEdit2); end; procedure Tfrm_info_price_release.DBEdit2KeyPress(Sender: TObject; var Key: Char); begin key_DBEdit(Key,DBEdit3); end; procedure Tfrm_info_price_release.dxDBGrid3ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort(Column,t_price_release,'发布编号'); end; end.