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

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

计算机毕业设计前台功能介绍:

①员工信息管理包括:员工代码、姓名、性别、入职时间、学历、联系电话等信息。在这一功能中,管理员可以根据新进员工的实际情况,把新进员工信息添加进数据库;

以下是引用片段:

员工信息设置核心代码:
procedure TfrmYgxx.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(edit1.Text ) + ' ';
self.ADOCommand1.Parameters.ParamByName('V姓名').Value:=trim(edit2.Text ) + ' ';
self.ADOCommand1.Parameters.ParamByName('V性别').Value:=trim(self.ComboBox1.Text  ) + ' ';
self.ADOCommand1.Parameters.ParamByName('V入职时间').Value:=datetostr(self.DateTimePicker1.Date ) + ' ';
self.ADOCommand1.Parameters.ParamByName('V学历').Value:=trim(edit6.Text ) + ' ';
self.ADOCommand1.Parameters.ParamByName('V联系电话').Value:=trim(edit8.Text ) + ' ';
self.ADOCommand1.Execute ;
showmessage('员工信息修改完成!');
SpeedButton1Click(Sender);
end;

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

第6页为计算机毕业论文客户信息维护功能介绍......

【联系方式】

【本站信誉】

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