Delphi汽车销售系统(程序下载)(6)

来源:xiaoniu168.com 作者:本站原创 添加时间:2014-10-25 点击数:31342

计算机毕业设计客户信息维护功能介绍:

以下是引用片段:

客户信息维护核心代码:
procedure TfrmKh.SpeedButtonSaveClick(Sender: TObject);
begin
if (trim(self.Edit2.Text)='')  then

   begin
      showmessage('客户名称不能为空!');
      exit;

   end;
self.AdoTmp.Close;
self.AdoTmp.Connection :=frmmain.ADOConnection1 ;

self.AdoTmp.CommandText:='select * from 客户 where 客户代码='''+ trim(self.Edit1.Text)  +'''' ;
self.AdoTmp.Active:=true;
if self.AdoTmp.Recordset.RecordCount <=0 then
   begin
      showmessage('客户代码数据库中不存在,不能修改') ;
      exit;
   end;
self.ADOCommand1.Connection :=frmmain.ADOConnection1 ;
self.ADOCommand1.CommandType:= cmdText ;
self.ADOCommand1.CommandText:='update 客户 set 客户名称=:V客户名称,地址=:V地址,电话=:V电话,备注=:V备注,客户类别=:V客户类别 where 客户代码=:V客户代码';
self.ADOCommand1.Parameters.ParamByName('V客户代码').Value :=trim(self.Edit1.Text ) + ' ';
self.ADOCommand1.Parameters.ParamByName('V客户名称').Value :=trim(self.Edit2.Text ) + ' ';

self.ADOCommand1.Parameters.ParamByName('V地址').Value := trim(self.Edit3.Text) + ' ';
self.ADOCommand1.Parameters.ParamByName('V电话').Value :=trim(self.Edit5.Text ) + ' ';
self.ADOCommand1.Parameters.ParamByName('V备注').Value :=trim(self.Edit4.Text ) + ' ';
self.ADOCommand1.Parameters.ParamByName('V客户类别').Value :=self.ComboBox1.Text   ;
self.ADOCommand1.Execute ;
SpeedButton1Click(Sender);
end;

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第7页为计算机毕业论文汽车类别设置模块介绍......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网