stgGclImportHint.pas 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. unit stgGclImportHint;
  2. interface
  3. uses
  4. Classes, ZhAPI;
  5. type
  6. TstgGclFail = class
  7. private
  8. FDealQuantity: Double;
  9. FUnits: string;
  10. FPrice: Double;
  11. FName: string;
  12. FB_Code: string;
  13. public
  14. property B_Code: string read FB_Code write FB_Code;
  15. property Name: string read FName write FName;
  16. property Units: string read FUnits write FUnits;
  17. property Price: Double read FPrice write FPrice;
  18. property DealQuantity: Double read FDealQuantity write FDealQuantity;
  19. end;
  20. TstgGclFailList = class
  21. private
  22. FList: TList;
  23. function GetCount: Integer;
  24. function GetGcl(AIndex: Integer): TstgGclFail;
  25. public
  26. constructor Create;
  27. destructor Destroy; override;
  28. function AddFailGcl(const AB_Code, AName, AUnits: string; APrice, ADealQuantity: Double): TstgGclFail;
  29. property Count: Integer read GetCount;
  30. property Gcl[AIndex: Integer]: TstgGclFail read GetGcl;
  31. end;
  32. implementation
  33. { TstgGclFailList }
  34. function TstgGclFailList.AddFailGcl(const AB_Code, AName, AUnits: string; APrice, ADealQuantity: Double): TstgGclFail;
  35. begin
  36. Result := TstgGclFail.Create;
  37. Result.B_Code := AB_Code;
  38. Result.Name := AName;
  39. Result.Units := AUnits;
  40. Result.Price := APrice;
  41. Result.DealQuantity := ADealQuantity;
  42. FList.Add(Result);
  43. end;
  44. constructor TstgGclFailList.Create;
  45. begin
  46. FList := TList.Create;
  47. end;
  48. destructor TstgGclFailList.Destroy;
  49. begin
  50. ClearObjects(FList);
  51. FList.Free;
  52. inherited;
  53. end;
  54. function TstgGclFailList.GetCount: Integer;
  55. begin
  56. Result := FList.Count;
  57. end;
  58. function TstgGclFailList.GetGcl(AIndex: Integer): TstgGclFail;
  59. begin
  60. Result := TstgGclFail(FList.Items[AIndex]);
  61. end;
  62. end.