⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p_gl.pas

📁 超市系统超市系统超市系统超市系统超市系统超市系统超市系统超市系统超市系统超市系统超市系统超市系统超市系统超市系统
💻 PAS
📖 第 1 页 / 共 2 页
字号:
begin
{    t_user.Open;
    t_jrrz.Open;
    t_jrrz.Filter:='rz_id='''+inttostr(f_password.rz_id)+'''';
    t_jrrz.Filtered:=true;
    t_jrrz.Edit;
    t_jrrz['tcrq']:=now;
    t_jrrz.Post;
    t_jrrz.Filtered:=false;}
  dm.T_USER.Open;
  DM.CCTCRZ.Parameters[1].Value:=F_password.rz_id;
  DM.CCTCRZ.ExecProc;
  dm.T_JRRZ.Close;
  f_password.e_password.Text:='';
  f_gl.Hide;
  f_password.show;
  F_PASSWORD.e_user.SetFocus;
end;

procedure Tf_GL.m_quitExecute(Sender: TObject);
begin
 close;
end;

procedure Tf_GL.m_czyglExecute(Sender: TObject);
begin
  s:=f_gl.m_czygl.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_user,f_user);
end;

procedure Tf_GL.Button1Click(Sender: TObject);
var
 i:integer;
begin
 with dm do
 begin
   t_user.Open;
   t_menu.Open;
   t_user.Filter:='name<>''SYSTEM''';
   t_user.Filtered:=true;
   while not t_user.Eof do
   begin
     t_user.First;
     t_user.Edit;
     t_user.Delete;
   end;
   t_menu.Filtered:=false;
   while not t_menu.Eof do
   begin
     t_menu.First;
     t_menu.Edit;
     t_menu.Delete;
   end;
   for i:=0 to al.ActionCount-1 do
   begin
     t_menu.Edit;
     t_menu.Append;
     t_menu['id']:=i;
     t_menu['caption']:=trim(TAction(al.Actions[i]).Caption);
     t_menu.Post;
   end;
   t_user.Close;
   t_menu.Close;
 end;  //with .. end
 application.MessageBox('添加成功!','',mb_ok+mb_iconinformation);
end;

procedure Tf_GL.BitBtn1Click(Sender: TObject);
begin
 with dm do
 begin
   t_qx.Open;
   t_menu.Open;
   t_qx.Filtered:=false;
   while not t_qx.Eof do
   begin
     t_qx.First;
     t_qx.Edit;
     t_qx.Delete;
   end;
   t_menu.First;
   while not t_menu.Eof do
   begin
     t_qx.Edit;
     t_qx.Append;
     t_qx['menu_id']:=t_menu['id'];
     t_qx['menu_caption']:=t_menu['caption'];
     t_qx['user_name']:='SYSTEM';
     t_qx['menu_xz']:=true;
     t_qx.Post;
     t_menu.Next;
   end;
   t_qx.Close;
   t_menu.Close;
 end;
 application.MessageBox('添加成功!','',mb_ok+mb_iconinformation);
end;

procedure Tf_GL.m_aboutExecute(Sender: TObject);
begin
  Application.CreateForm(tf_about,f_about);
end;

procedure Tf_GL.FormCreate(Sender: TObject);
VAR
  S,SQL,PASS,user,SERVER,dataname:STRING;
  inifile:Tinifile;
begin
//SetWindowLong(Application,Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW);
//加入系统数据库初始化信息
  s:=extractfilepath(Application.ExeName);
  IniFile:=TIniFile.Create(s+'yzwsys.ini');
  server:=inifile.ReadString('windows','server','yzw');
  user:=inifile.ReadString('windows','user','sa');
//  edit2.Text:=datetimetostr(inifile.ReadDateTime('windows','datetime',now));
  s:=inifile.ReadString('windows','pass','000');
  pass:=f_gl.jiemi(s,123);
  dataname:=inifile.ReadString('information','dataname','dksf');
  inifile.Free;
  DM.ado.Connected:=false;
  sql:='Provider=SQLOLEDB.1;Password='+trim(pass)+
       ';Persist Security Info=True;User ID='+trim(user)+
       ';Initial Catalog='+dataname+';Data Source='+trim(server);
  dm.ado.ConnectionString:=sql;
  with dm do
    begin
       try
         //系统初始化信息
         ado.Connected:=true;
         { t_user.Open;
          t_menu.Open;
          t_qx.Open;
          t_dl.Open;
          t_jrrz.Open;  }
         //系统初始化完毕
       except
         application.MessageBox('请保证SQL Server2000连接成功或与系统管理员联系!','数据库连接错误',mb_ok+mb_iconstop);
         application.Terminate;
       end;//try_end
    end;   //with .. end
end;

procedure Tf_GL.m_xtrzExecute(Sender: TObject);
begin
  s:=m_xtrz.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_xtrz,f_xtrz);
end;

procedure Tf_GL.Button2Click(Sender: TObject);
begin
  Q.SQL.Clear;
  Q.SQL.Add('delete form jrrz_info where rz_id=:x');
  Q.Parameters[0].Value:=130000;
  q.ExecSQL;
end;

procedure Tf_GL.M_FFRYExecute(Sender: TObject);
begin
  s:=m_ffry.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_ffry,f_ffry);
  f_ffry.ShowModal;
end;

procedure Tf_GL.M_BMExecute(Sender: TObject);
begin
  s:=m_bm.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_bm,f_bm);
  f_bm.ShowModal;
end;

procedure Tf_GL.m_SPExecute(Sender: TObject);
begin
  s:=m_sp.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_sp,f_sp);
  f_sp.ShowModal;
end;

procedure Tf_GL.m_spflExecute(Sender: TObject);
begin
  s:=m_spfl.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_spfl,f_spfl);
  f_spfl.ShowModal;
end;

procedure Tf_GL.Button3Click(Sender: TObject);
begin
  application.CreateForm(tf_menuinfo,f_menuinfo);
  f_menuinfo.ShowModal;
end;

procedure Tf_GL.m_yhExecute(Sender: TObject);
begin
  s:=m_yh.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_yh,f_yh);
  f_yh.ShowModal;
end;

procedure Tf_GL.m_ghExecute(Sender: TObject);
begin
  s:=m_gh.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_gh,f_gh);
  f_gh.ShowModal;
end;

procedure Tf_GL.Button4Click(Sender: TObject);
begin
  open.Execute;
  image1.Picture.LoadFromFile(open.FileName);
end;

procedure Tf_GL.m_rkExecute(Sender: TObject);
begin
  s:=m_rk.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_rk,f_rk);
  f_rk.ShowModal;
end;

procedure Tf_GL.m_ckExecute(Sender: TObject);
begin
  s:=m_ck.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_ck,f_ck);
  f_ck.ShowModal;
end;

procedure Tf_GL.Button5Click(Sender: TObject);
begin
  with dm do
  begin
    query.SQL.Clear;
    query.SQL.Add('delete from rk_info');
    query.ExecSQL;
    query.SQL.Clear;
    query.SQL.Add('delete from ck_info');
    query.ExecSQL;
    query.SQL.Clear;
    query.SQL.Add('delete from crkd_info');
    query.ExecSQL;
    query.SQL.Clear;
    query.SQL.Add('delete from kc_info');
    query.ExecSQL;
  end;
end;

procedure Tf_GL.m_tkExecute(Sender: TObject);
begin
  s:=m_tk.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_tk,f_tk);
  f_tk.ShowModal;
end;

procedure Tf_GL.m_fkExecute(Sender: TObject);
begin
  s:=m_fk.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_fk,f_fk);
  f_fk.ShowModal;
end;

procedure Tf_GL.m_kccxExecute(Sender: TObject);
begin
  s:=m_kccx.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_kccx,f_kccx);
  f_kccx.ShowModal;
end;

procedure Tf_GL.m_ckcxExecute(Sender: TObject);
begin
  s:=m_ckcx.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_ckcx,f_ckcx);
  f_ckcx.ShowModal;
end;

procedure Tf_GL.m_rkcxExecute(Sender: TObject);
begin
  s:=m_rkcx.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_rkcx,f_rkcx);
  f_rkcx.ShowModal;
end;

procedure Tf_GL.m_cshExecute(Sender: TObject);
begin
  s:=m_csh.Caption;
  f_gl.JR_rz(s);
  application.CreateForm(tf_csh,f_csh);
  f_csh.ShowModal;
end;

procedure Tf_GL.barChangeActiveGroup(Sender: TObject);
begin
  if bar.ActiveGroup=nil then exit;
end;

procedure Tf_GL.barItemClick(Sender: TObject; Item: TdxSideBarItem);
begin
{  if item.Caption='入库管理' then
     m_rk.OnExecute(self);
  if item.Caption='出库管理' then
     m_ck.OnExecute(self);
  if item.Caption='出货付款' then
     m_fk.OnExecute(self);
  if item.Caption='退货、客户实收数量管理' then
     m_tk.OnExecute(self);
  if item.Caption='更改密码' then
     m_ggmm.OnExecute(self);
  if item.Caption='操作员管理' then
     m_czygl.OnExecute(self);
  if item.Caption='数据初始化' then
     m_csh.OnExecute(self);
  if item.Caption='系统日志' then
     m_xtrz.OnExecute(self);
  if item.Caption='用户注销' then
     m_yhzx.OnExecute(self);
  if item.Caption='退出系统' then
     m_quit.OnExecute(self);
  if item.Caption='数据库备份' then
     m_bak.OnExecute(self);
  if item.Caption='库存明细查询' then
     m_kccx.OnExecute(self);
  if item.Caption='出库明细查询' then
     m_ckcx.OnExecute(self);
  if item.Caption='入库明细查询' then
     m_rkcx.OnExecute(self);
  if item.Caption='本厂员工部门、职位信息' then
     m_bm.OnExecute(self);
  if item.Caption='本厂员工信息' then
     m_ffry.OnExecute(self);
  if item.Caption='商品分类、型号信息' then
     m_spfl.OnExecute(self);
  if item.Caption='商品信息' then
     m_sp.OnExecute(self);
  if item.Caption='客户开户银行信息' then
     m_yh.OnExecute(self);
  if item.Caption='客户信息设置' then
     m_gh.OnExecute(self);
  if item.Caption='帮助' then
     m_help.OnExecute(self);
  if item.Caption='关于' then
     m_about.OnExecute(self);   }
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -