EBS 财务辅助工具开发手记--类设计

13 篇文章 0 订阅
2 篇文章 0 订阅

目前系统内先设定以下几个类:

用户类,部门类,事区类

预算类型类,预算类

传票类

 

使用ModelMaker 生成 代码如下:

unit EBSMainClass;

interface

uses
  SysUtils, Windows, Messages, Classes, Graphics, Controls, Forms, Dialogs;

type
  TUser = class(TObject)
  private
    FDept: TDept;
    FEMail: string;
    FID: string;
    FName: string;
    FPassword: string;
    FPhone: string;
    FStatus: Integer;
  public
    property Dept: TDept read FDept write FDept;
    property EMail: string read FEMail write FEMail;
    property ID: string read FID write FID;
    property Name: string read FName write FName;
    property Password: string read FPassword write FPassword;
    property Phone: string read FPhone write FPhone;
    property Status: Integer read FStatus write FStatus;
  end;

  TDept = class(TObject)
  private
    FArea: TArea;
    FCWType: Integer;
    FDummyFlag: Integer;
    FName: string;
    FParent: string;
  public
    property Area: TArea read FArea write FArea;
    property CWType: Integer read FCWType write FCWType;
    property DummyFlag: Integer read FDummyFlag write FDummyFlag;
    property Name: string read FName write FName;
    property Parent: string read FParent write FParent;
  end;

  TVoucher = class(TObject)
  private
    FArea: TArea;
    FAuditDate: string;
    FAuditor: TUser;
    FCDFlag: Integer;
    FCreateDate: string;
    FCreator: TUser;
    FCurType: string;
    FDate: Integer;
    FID: string;
    FKMCode: Integer;
    FMXCode: string;
    FOraAmt: Double;
    FRadio: Double;
    FStatus: string;
    FSummary: string;
    FType: string;
    FTZType: string;
    FUSDAmt: Double;
  public
    constructor Create;
    property Area: TArea read FArea write FArea;
    property AuditDate: string read FAuditDate write FAuditDate;
    property Auditor: TUser read FAuditor write FAuditor;
    property CDFlag: Integer read FCDFlag write FCDFlag;
    property CreateDate: string read FCreateDate write FCreateDate;
    property Creator: TUser read FCreator write FCreator;
    property CurType: string read FCurType write FCurType;
    property Date: Integer read FDate write FDate;
    property ID: string read FID write FID;
    property KMCode: Integer read FKMCode write FKMCode;
    property MXCode: string read FMXCode write FMXCode;
    property OraAmt: Double read FOraAmt write FOraAmt;
    property Radio: Double read FRadio write FRadio;
    property Status: string read FStatus write FStatus;
    property Summary: string read FSummary write FSummary;
    property Type: string read FType write FType;
    property TZType: string read FTZType write FTZType;
    property USDAmt: Double read FUSDAmt write FUSDAmt;
  end;

  TArea = class(TObject)
  private
    FCode: string;
    FDummyDept: string;
    FName: string;
  public
    property Code: string read FCode write FCode;
    property DummyDept: string read FDummyDept write FDummyDept;
    property Name: string read FName write FName;
  end;

  TBudType = class(TObject)
  private
    FBeginMonth: Integer;
    FBudTypeID: Integer;
    FBudTypeName: string;
    FEndMonth: Integer;
  public
    property BeginMonth: Integer read FBeginMonth write FBeginMonth;
    property BudTypeID: Integer read FBudTypeID write FBudTypeID;
    property BudTypeName: string read FBudTypeName write FBudTypeName;
    property EndMonth: Integer read FEndMonth write FEndMonth;
  end;

  TBudget = class(TObject)
  private
    FBeginDate: Integer;
    FEndDate: Integer;
    FID: Integer;
    FName: string;
    FStatus: Integer;
    FType: TBudType;
    FYear: Integer;
  public
    property BeginDate: Integer read FBeginDate write FBeginDate;
    property EndDate: Integer read FEndDate write FEndDate;
    property ID: Integer read FID write FID;
    property Name: string read FName write FName;
    property Status: Integer read FStatus write FStatus;
    property Type: TBudType read FType write FType;
    property Year: Integer read FYear write FYear;
  end;


implementation

{
*********************************** TVoucher ***********************************
}
constructor TVoucher.Create;
begin
  inherited Create;
  FID := 'A0000';
end;

end.


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值