1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- unit stgGclImportHint;
- interface
- uses
- Classes, ZhAPI;
- type
- TstgGclFail = class
- private
- FDealQuantity: Double;
- FUnits: string;
- FPrice: Double;
- FName: string;
- FB_Code: string;
- public
- property B_Code: string read FB_Code write FB_Code;
- property Name: string read FName write FName;
- property Units: string read FUnits write FUnits;
- property Price: Double read FPrice write FPrice;
- property DealQuantity: Double read FDealQuantity write FDealQuantity;
- end;
- TstgGclFailList = class
- private
- FList: TList;
- function GetCount: Integer;
- function GetGcl(AIndex: Integer): TstgGclFail;
- public
- constructor Create;
- destructor Destroy; override;
- function AddFailGcl(const AB_Code, AName, AUnits: string; APrice, ADealQuantity: Double): TstgGclFail;
- property Count: Integer read GetCount;
- property Gcl[AIndex: Integer]: TstgGclFail read GetGcl;
- end;
- implementation
- { TstgGclFailList }
- function TstgGclFailList.AddFailGcl(const AB_Code, AName, AUnits: string; APrice, ADealQuantity: Double): TstgGclFail;
- begin
- Result := TstgGclFail.Create;
- Result.B_Code := AB_Code;
- Result.Name := AName;
- Result.Units := AUnits;
- Result.Price := APrice;
- Result.DealQuantity := ADealQuantity;
- FList.Add(Result);
- end;
- constructor TstgGclFailList.Create;
- begin
- FList := TList.Create;
- end;
- destructor TstgGclFailList.Destroy;
- begin
- ClearObjects(FList);
- FList.Free;
- inherited;
- end;
- function TstgGclFailList.GetCount: Integer;
- begin
- Result := FList.Count;
- end;
- function TstgGclFailList.GetGcl(AIndex: Integer): TstgGclFail;
- begin
- Result := TstgGclFail(FList.Items[AIndex]);
- end;
- end.
|