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

📄 inv120_01.pas.svn-base

📁 这是一个功能齐全的,代码完整的ERP企业信息管理系统,现在上传和大家分享
💻 SVN-BASE
字号:
unit Inv120_01;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Bas200_14, dxExEdtr, DB, ADODB, ActnList, Menus, dxCntner, dxTL,
  dxDBCtrl, dxDBTL, ComCtrls, ToolWin, ExtCtrls, dxDBTLCl;

type
  TInv120_01Form = class(TBas200_14Form)
    ADOQuery1I120_001: TAutoIncField;
    ADOQuery1I120_002: TWideStringField;
    ADOQuery1I120_003: TWideStringField;
    ADOQuery1I120_004: TIntegerField;
    ADOQuery1I120_011: TBooleanField;
    ADOQuery1I120_012: TBooleanField;
    dxDBTreeList1I120_002: TdxDBTreeListColumn;
    dxDBTreeList1I120_003: TdxDBTreeListColumn;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    procedure SetInterface; override;
    procedure InsertEvent; override;
    procedure UpdateEvent; override;
    procedure DeleteEvent; override;
    procedure ReportGetValue(const ParName: String; var ParValue: Variant); override;
    { Public declarations }
  end;

var
  Inv120_01Form: TInv120_01Form;

implementation

uses SYSDATA, CommFun, Inv120_02;

{$R *.dfm}

procedure TInv120_01Form.SetInterface;
begin
  inherited;
  Caption:=GetDBString('INV12001001');  //料品分类维护
  ADOQuery1I120_002.DisplayLabel:=GetDBString('INV12001002');  //类别编号
  ADOQuery1I120_003.DisplayLabel:=GetDBString('INV12001003');  //类别名称
end;

procedure TInv120_01Form.FormCreate(Sender: TObject);
begin
  inherited;
//
end;

procedure TInv120_01Form.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
//
end;

procedure TInv120_01Form.DeleteEvent;
var
  ACode:String;
begin
  ACode:=ADOQuery1I120_002.AsString;
  //删除相关的权限记录
  SYSDM.qryQuery.Close;
  SYSDM.qryQuery.SQL.Clear;
  SYSDM.qryQuery.SQL.Add('delete from SYS500C where S500C_003=''ICS'' and S500C_002='+ACode);
  SYSDM.qryQuery.ExecSQL;
  DeleteTableRecord(ADOQuery1,'INV120','I120_002='+''''+ACode+'''');
end;

procedure TInv120_01Form.InsertEvent;
begin
  Inv120_02Form:=TInv120_02Form.Create(Application);
  Inv120_02Form.OpenData(0);
  Inv120_02Form.ShowModal;
  //插入权限表
  SYSDM.qryQuery.Close;
  SYSDM.qryQuery.SQL.Clear;
  SYSDM.qryQuery.SQL.Add('insert into SYS500C(S500C_001,S500C_002,S500C_003,S500C_004)');
  SYSDM.qryQuery.SQL.Add('select S500A_001,I120_001,''ICS'',0 from INV120,SYS500A');
  SYSDM.qryQuery.SQL.Add('where not exists(select 1 from SYS500C where S500C_001=S500A_001 and S500C_003=''ICS'' and S500C_002=I120_001)');
  SYSDM.qryQuery.ExecSQL;
end;

procedure TInv120_01Form.ReportGetValue(const ParName: String;
  var ParValue: Variant);
begin

end;

procedure TInv120_01Form.UpdateEvent;
begin
  Inv120_02Form:=TInv120_02Form.Create(Application);
  Inv120_02Form.OpenData(ADOQuery1I120_001.Value);
  Inv120_02Form.ShowModal;
end;

initialization
  RegisterClass(TInv120_01Form);

finalization
  UnRegisterClass(TInv120_01Form);

end.

⌨️ 快捷键说明

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