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

来源:互联网 发布:淘宝运营每日工作内容 编辑:程序博客网 时间:2024/05/17 09:11

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

用户类,部门类,事区类

预算类型类,预算类

传票类

 

使用ModelMaker 生成 代码如下:

unit EBSMainClass;interfaceuses  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.


 

原创粉丝点击