uvadimedicinestock.pas

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

PAS
95
字号
unit UVADIMedicineStock;

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, UView, UControllerView, UPagesView,
  UAdapterDataPagesView, RzTabs, UQueryDataModel, UVADGMedicineStockDetail;

type
  TVADIMedicineStock = class(TAdapterDataItemView)
    Units: TDataSource;
    Medicine: TDataSource;
    RzLabel1: TRzLabel;
    RzLabel2: TRzLabel;
    RzLabel3: TRzLabel;
    RzLabel4: TRzLabel;
    RzLabel6: TRzLabel;
    RzLabel8: TRzLabel;
    RzDBEdit1: TRzDBEdit;
    RzDBEdit2: TRzDBEdit;
    RzDBEdit3: TRzDBEdit;
    RzDBEdit4: TRzDBEdit;
    RzDBLookupComboBox1: TRzDBLookupComboBox;
    RzDBLookupComboBox2: TRzDBLookupComboBox;
    RzPanel5: TRzPanel;
    RzLabel9: TRzLabel;
    RzLabel10: TRzLabel;
    RzLabel11: TRzLabel;
    RzLabel12: TRzLabel;
    RzLabel13: TRzLabel;
    RzLabel14: TRzLabel;
    RzDBLookupComboBox3: TRzDBLookupComboBox;
    RzDBLookupComboBox4: TRzDBLookupComboBox;
    RzDBLookupComboBox5: TRzDBLookupComboBox;
    RzDBLookupComboBox6: TRzDBLookupComboBox;
    RzDBLookupComboBox7: TRzDBLookupComboBox;
    RzDBLookupComboBox8: TRzDBLookupComboBox;
    PagesView: TAdapterDataPagesView;
  private
    MedicineModel: TCloneDataModel;
    UnitsModel: TCloneDataModel;
    MedicineStockDetailView: TVADGMedicineStockDetail;
  protected
    procedure InitModel; override;
    procedure InitView; override;
  public
    function GetCaption: string; override;
  end;

implementation
uses
  UMADMedicineStock,UMADMedicine,UMADUnits, UVMADGMedicine;
{$R *.dfm}

{ TVADIMedicineStockModify }

function TVADIMedicineStock.GetCaption: string;
begin
  Result := '物资库存';
end;

procedure TVADIMedicineStock.InitModel;
begin
  inherited;
  MedicineModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(MedicineFactory.GetModel).Clone(MedicineModel);
  Medicine.DataSet := MedicineModel.GetDataSet;

  UnitsModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(UnitsFactory.GetModel).Clone(UnitsModel);
  Units.DataSet := UnitsModel.GetDataSet;
end;

procedure TVADIMedicineStock.InitView;
var
  Page: TRzTabSheet;
  Key: IKey;
begin
  inherited;
  Page := PagesView.NewPage;
  MedicineStockDetailView := TVADGMedicineStockDetail.Create(Page,MedicineStockDetailFactory);
  PagesView.BandView(Page, MedicineStockDetailView);
  Key := GetDataModel.GetKey;
  TQueryDataModel(MedicineStockDetailView.GetDataModel).Query(Key);
end;

end.

⌨️ 快捷键说明

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