uvadipstockmedicine.pas

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

PAS
76
字号
unit UVADIPStockMedicine;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UAdapterDataItemView, dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg,
  dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
  dxPSEdgePatterns, DB, dxPSCore, RzCommon, RzButton, jpeg, RzBckgnd,
  ExtCtrls, RzPanel, DBCtrls, RzDBCmbo, StdCtrls, Mask, RzEdit, RzDBEdit,
  RzLabel, UCloneDataModel, UPrimaryDataModel, Factory;

type
  TVADIPStockMedicine = class(TAdapterDataItemView)
    RzLabel1: TRzLabel;
    RzDBEdit1: TRzDBEdit;
    RzDBEdit2: TRzDBEdit;
    RzLabel2: TRzLabel;
    MedicineStock: TDataSource;
    RzDBLookupComboBox2: TRzDBLookupComboBox;
    RzLabel4: TRzLabel;
    RzDBLookupComboBox3: TRzDBLookupComboBox;
    RzDBLookupComboBox5: TRzDBLookupComboBox;
    RzLabel5: TRzLabel;
    RzDBLookupComboBox4: TRzDBLookupComboBox;
    RzLabel6: TRzLabel;
    RzLabel7: TRzLabel;
    RzDBLookupComboBox6: TRzDBLookupComboBox;
    RzLabel8: TRzLabel;
    RzDBLookupComboBox7: TRzDBLookupComboBox;
    RzLabel9: TRzLabel;
    Medicine: TDataSource;
    Units: TDataSource;
  private
    MedicineStockModel: TCloneDataModel;
    MedicineModel: TCloneDataModel;
    UnitsModel: TCloneDataModel;
  protected
    procedure InitModel; override;
  public
    function GetCaption: string; override;
  end;

implementation

uses
  UMADMedicineStock, UMADPstockmedicine, UMADMedicine, UMADUnits,
  UDataView;
  
{$R *.dfm}

{ TVADIPStockMedicine }

function TVADIPStockMedicine.GetCaption: string;
begin
  Result := '药房库存';
end;

procedure TVADIPStockMedicine.InitModel;
begin
  inherited;
  MedicineStockModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(MedicineStockFactory.GetModel).Clone(MedicineStockModel);
  MedicineStock.DataSet := MedicineStockModel.GetDataSet;

  MedicineModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(MedicineFactory.GetModel).Clone(MedicineModel);
  Medicine.DataSet := MedicineModel.GetDataSet;

  UnitsModel := GetCloneDataModel(TPrimaryDataModel(UnitsFactory.GetModel));
  Units.DataSet := UnitsModel.GetDataSet;
end;

end.

⌨️ 快捷键说明

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