umaddoctortoll.pas

来自「一整套的源代码」· PAS 代码 · 共 56 行

PAS
56
字号
unit UMADDoctorToll;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UQueryDataModel, Provider, OraProvider, MemDS, DBAccess, Ora,
  OraSmart, DB, DBClient, UModel, MyFactory, MyTools, UAdapterDataModel;

type
  TMADDoctorToll = class(TQueryDataModel)
    DataSetDOCTORID: TFloatField;
    DataSetSECTIONOFFICEID: TFloatField;
    DataSetDOCTORCATALOGID: TFloatField;
    DataSetCNAME: TStringField;
    DataSetTOLLSTATIONID: TFloatField;
  private
  protected
    procedure PrepareQuery(Parameters: MyTools.IQueryParameters); override;
  public
    function GetKey :IKey; override;
  end;

  TDoctorTollFactory = class (TModelFactory)
    function NewModel : TModel; override;
  end;

implementation

uses UDataModel;

{$R *.dfm}

{ TDoctorTollFactory }

function TDoctorTollFactory.NewModel: TModel;
begin
  Result  := TMADDoctorToll.Create(GetOwner);
end;


{ TMADDoctorToll }

function TMADDoctorToll.GetKey: IKey;
begin
  Result := NewKey('DOCTORID');
end;

procedure TMADDoctorToll.PrepareQuery(Parameters: IQueryParameters);
begin
  DataSet.ParamByName('TollStationID').AsInteger := IIntegerKey(Parameters).GetKey;
end;

end.

⌨️ 快捷键说明

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