mainform1.pas

来自「思微POS连锁超市管理系统 (商业代码),几年前的东西了」· PAS 代码 · 共 2,254 行 · 第 1/5 页

PAS
2,254
字号
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '销售单明细查询';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('xsdcx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Txsdcx, xsdcx);
    xsdcx.show;
  end
  else
  begin //存在则将其拖到前台。
    xsdcx.BringToFront;
    xsdcx.SetFocus;
  end;
end;

procedure TMainForm.N66Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '会员销费查询';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('hyxfcx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Thyxfcx, hyxfcx);
    hyxfcx.show;
  end
  else
  begin //存在则将其拖到前台。
    hyxfcx.BringToFront;
    hyxfcx.SetFocus;
  end;
end;

procedure TMainForm.N98Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '时段销售查询';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('sdxscx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tsdxscx, sdxscx);
    sdxscx.show;
  end
  else
  begin //存在则将其拖到前台。
    sdxscx.BringToFront;
    sdxscx.SetFocus;
  end;
end;

procedure TMainForm.N99Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '商品时段销售查询';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('spxshz') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tspxshz, spxshz);
    spxshz.show;
  end
  else
  begin //存在则将其拖到前台。
    spxshz.BringToFront;
    spxshz.SetFocus;
  end;
end;

procedure TMainForm.N100Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '商品销售毛利查询';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('spxsml') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tspxsml, spxsml);
    spxsml.show;
  end
  else
  begin //存在则将其拖到前台。
    spxsml.BringToFront;
    spxsml.SetFocus;
  end;
end;

procedure TMainForm.N7Click(Sender: TObject);
begin
  if not MainForm.ExistForm('xgczypass') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Txgczypass, xgczypass);
    xgczypass.show;
  end
  else
  begin //存在则将其拖到前台。
    xgczypass.BringToFront;
    xgczypass.SetFocus;
  end;
end;

procedure TMainForm.N67Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '修改收银员密码';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('Editsyypass') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(TEditsyypass, Editsyypass);
    Editsyypass.show;
  end
  else
  begin //存在则将其拖到前台。
    Editsyypass.BringToFront;
    Editsyypass.SetFocus;
  end;
end;

procedure TMainForm.N2Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '操作员档案';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('czydawh') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tczydawh, czydawh);
    czydawh.show;
  end
  else
  begin //存在则将其拖到前台。
    czydawh.BringToFront;
    czydawh.SetFocus;
  end;
end;

procedure TMainForm.N54Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '应收款汇总';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('yskhz') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tyskhz, yskhz);
    yskhz.show;
  end
  else
  begin //存在则将其拖到前台。
    yskhz.BringToFront;
    yskhz.SetFocus;
  end;
end;

procedure TMainForm.N56Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '应付款汇总';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('yfkhz') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tyfkhz, yfkhz);
    yfkhz.show;
  end
  else
  begin //存在则将其拖到前台。
    yfkhz.BringToFront;
    yfkhz.SetFocus;
  end;
end;

procedure TMainForm.N60Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '货品销售汇总表';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('xschhz') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Txschhz, xschhz);
    xschhz.show;
  end
  else
  begin //存在则将其拖到前台。
    xschhz.BringToFront;
    xschhz.SetFocus;
  end;
end;

procedure TMainForm.N57Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '货品采购汇总表';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('cgshhz') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tcgshhz, cgshhz);
    cgshhz.show;
  end
  else
  begin //存在则将其拖到前台。
    cgshhz.BringToFront;
    cgshhz.SetFocus;
  end;
end;

procedure TMainForm.N61Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '货品销售明细表';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('xschmx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Txschmx, xschmx);
    xschmx.show;
  end
  else
  begin //存在则将其拖到前台。
    xschmx.BringToFront;
    xschmx.SetFocus;
  end;
end;

procedure TMainForm.N58Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '货品采购明细表';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('cgshmx') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tcgshmx, cgshmx);
    cgshmx.show;
  end
  else
  begin //存在则将其拖到前台。
    cgshmx.BringToFront;
    cgshmx.SetFocus;
  end;
end;

procedure TMainForm.N83Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '销售订单执行情况';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('xsddzxqk') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Txsddzxqk, xsddzxqk);
    xsddzxqk.show;
  end
  else
  begin //存在则将其拖到前台。
    xsddzxqk.BringToFront;
    xsddzxqk.SetFocus;
  end;
end;

procedure TMainForm.N84Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '采购订单执行情况';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('cgddzxqk') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tcgddzxqk, cgddzxqk);
    cgddzxqk.show;
  end
  else
  begin //存在则将其拖到前台。
    cgddzxqk.BringToFront;
    cgddzxqk.SetFocus;
  end;
end;

procedure TMainForm.N86Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '库存金额报表';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('kcjeb') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tkcjeb, kcjeb);
    kcjeb.show;
  end
  else
  begin //存在则将其拖到前台。
    kcjeb.BringToFront;
    kcjeb.SetFocus;
  end;
end;

procedure TMainForm.N65Click(Sender: TObject);
begin
  Query1.close;
  Query1.sql.Clear;
  Query1.sql.add('select * from menu where czyid=:czyid and menuname=:menuname');
  Query1.Parameters[0].Value := Label4.Caption;
  Query1.Parameters[1].Value := '库存预警报表';
  Query1.open;
  if Query1.RecordCount = 0 then
  begin
    Application.MessageBox('您无权执行该功能。', '提示', MB_OK + MB_ICONWARNING);
    exit;
  end;
  if not MainForm.ExistForm('spkcyjb') then //判断窗体是否存在。
  begin
  //不存在则建立。
    Application.CreateForm(Tspkcyjb, spkcyjb);
    spkcyjb.show;
  end
  else
  begin //存在则将其拖到前台。
    spkcyjb.BringToFront;
    spkcyjb.SetFocus;
  end;
end;

⌨️ 快捷键说明

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