——此文章摘自《Delphi 数据库开发经典案例解析》定价¥特价¥购买>>http://tracklinktechcn/?m_id=dangdang&a_id=A&l=&l_type= width= height= border= nosave> else begin //插入新的销售单数据 adocommandCommandText:=insert into 销售单([编号][客户编号][销售日期][业务员] [制单人][税价合计][不含税价][税额])values(+inputnum+ +comboboxText++editText++comboboxText+ +editText++editText++editText++editText+); adocommandExecute; //根据销售单明细条目的数量插入销售单明细数据 for i:= to do if stringgridCells[i]<> then //重新组合编码 begin newnum:=newnum+; if length(inttostr(newnum))= then inputnum:=+inttostr(newnum); if length(inttostr(newnum))= then inputnum:=+inttostr(newnum); if length(inttostr(newnum))= then inputnum:=+inttostr(newnum); if length(inttostr(newnum))= then inputnum:=+inttostr(newnum); if length(inttostr(newnum))= then inputnum:=inttostr(newnum); adocommandCommandText:=insert into 销售单明细([编号][销售单号][货号] [销售数量][销售价][税价合计][税率][不含税价][税额][仓库]) values(+inputnum ++inputnum++stringgridCells[i]++stringgrid Cells[i]++stringgridCells[i]++stringgridCells[i]+ +stringgridCells[i]++stringgridCells[i]+ +stringgridCells[i]++stringgridCells[i]+); adocommandExecute; end; //通知用户操作成功 showmessage(销售单及明细保存成功); end; end; //提交销售单 //报表预览及打印功能与进货单完全一致 procedure ToutputButtonClick(Sender: TObject); var ij:integer; begin adocommandCommandText:=exec sf_销售单; adocommandExecute; showmessage(销售单处理成功); //清空前面的输入 for i:= to do for j:= to do stringgridCells[ij]:=; comboboxText:=; comboboxText:=; editClear; editClear; editClear; editClear; end; end; right>[http://developcsaicn/delphi/htm>] [http://developcsaicn/delphi/htm>] [http://developcsaicn/delphi/htm>] [] |