⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uvadimedicinestockdetail.pas

📁 Delphi6开发的HIS程序
💻 PAS
字号:
unit UVADIMedicineStockDetail;

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, UDialogDataItemsView,
  UDataItemsView, MyTools, UQueryDataModel;

type
  TVADIMedicineStockDetail = class(TAdapterDataItemView)
    RzDBEdit2: TRzDBEdit;
    RzLabel2: TRzLabel;
    SIOMedicineDetail: TDataSource;
    MedicineStock: TDataSource;
    MedicineID: TDataSource;
    ManufacturerID: TDataSource;
    ProviderID: TDataSource;
    RzLabel5: TRzLabel;
    RzLabel6: TRzLabel;
    RzLabel7: TRzLabel;
    RzLabel8: TRzLabel;
    RzLabel9: TRzLabel;
    RzLabel10: TRzLabel;
    RzLabel11: TRzLabel;
    RzLabel12: TRzLabel;
    RzLabel13: TRzLabel;
    RzLabel14: TRzLabel;
    RzLabel15: TRzLabel;
    RzDBLookupComboBox3: TRzDBLookupComboBox;
    RzDBLookupComboBox4: TRzDBLookupComboBox;
    RzDBLookupComboBox5: TRzDBLookupComboBox;
    RzDBLookupComboBox6: TRzDBLookupComboBox;
    RzDBLookupComboBox7: TRzDBLookupComboBox;
    RzDBLookupComboBox8: TRzDBLookupComboBox;
    RzDBLookupComboBox9: TRzDBLookupComboBox;
    RzDBLookupComboBox10: TRzDBLookupComboBox;
    RzDBLookupComboBox11: TRzDBLookupComboBox;
    RzDBLookupComboBox12: TRzDBLookupComboBox;
    RzDBLookupComboBox13: TRzDBLookupComboBox;
  private
    SIOMedicineDetailModel: TQueryDataModel;
    MedicineStockModel: TCloneDataModel;
    ManufacturerIDModel: TCloneDataModel;
    ProviderIDModel: TCloneDataModel;
    MedicineIDModel: TCloneDataModel;
  protected
    procedure InitModel; override;
  public
    function GetCaption: string; override;
  end;

implementation

uses
  UQMedicineStockDetail, UMADSIOMedicineDetail, UVMADGSIOMedicineDetail,
  UMADMedicineStock, UMADManufacturer, UMADProvider, UMADMedicine;

{$R *.dfm}

{ TVADIMedicineStockDetail }

function TVADIMedicineStockDetail.GetCaption: string;
begin
  Result := '库存详细信息';
end;

procedure TVADIMedicineStockDetail.InitModel;
var
  IntKey: IIntegerKey;
begin
  inherited;

  SIOMedicineDetailModel := TQueryDataModel(SIOMedicineDetailByPKFactory.GetModel);
  SIOMedicineDetail.DataSet := SIOMedicineDetailModel.GetDataSet;

  IntKey := TIntegerKey.Create;
  IntKey.SetKey(GetDataModel.GetDataSet.FieldByName('SIOMEDICINEDETAILID').AsInteger);
  TQueryDataModel(SIOMedicineDetailModel).Query(IQueryParameters(IntKey));

  MedicineStockModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(MedicineStockFactory.GetModel).Clone(MedicineStockModel);
  MedicineStock.DataSet := MedicineStockModel.GetDataSet;

  MedicineIDModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(MedicineFactory.GetModel).Clone(MedicineIDModel);
  MedicineID.DataSet := MedicineIDModel.GetDataSet;

  ManufacturerIDModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(ManufacturerFactory.GetModel).Clone(ManufacturerIDModel);
  ManufacturerID.DataSet := ManufacturerIDModel.GetDataSet;

  ProviderIDModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(ProviderFactory.GetModel).Clone(ProviderIDModel);
  ProviderID.DataSet := ProviderIDModel.GetDataSet;
end;

end.

⌨️ 快捷键说明

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