uvadisoomedicinedetail.pas

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

PAS
113
字号
unit UVADISOOMedicineDetail;

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, cxDBLookupComboBox;

type
  TVADISOOMedicineDetail = class(TAdapterDataItemView)
    RzLabel1: TRzLabel;
    RzLabel2: TRzLabel;
    RzLabel3: TRzLabel;
    RzLabel4: TRzLabel;
    RzLabel6: TRzLabel;
    RzDBEdit1: TRzDBEdit;
    RzDBEdit2: TRzDBEdit;
    RzDBEdit3: TRzDBEdit;
    RzDBEdit4: TRzDBEdit;
    StockoutorderID: TDataSource;
    MedicineStockID: TDataSource;
    RzDBLookupComboBox2: TRzDBLookupComboBox;
    RzBitBtn1: TRzBitBtn;
    RzPanel5: TRzPanel;
    RzLabel5: TRzLabel;
    RzDBLookupComboBox1: TRzDBLookupComboBox;
    RzLabel7: TRzLabel;
    RzDBLookupComboBox3: TRzDBLookupComboBox;
    RzLabel8: TRzLabel;
    RzDBLookupComboBox4: TRzDBLookupComboBox;
    RzLabel9: TRzLabel;
    RzDBLookupComboBox5: TRzDBLookupComboBox;
    RzLabel10: TRzLabel;
    RzDBLookupComboBox6: TRzDBLookupComboBox;
    RzLabel11: TRzLabel;
    RzDBLookupComboBox7: TRzDBLookupComboBox;
    RzLabel12: TRzLabel;
    RzDBLookupComboBox8: TRzDBLookupComboBox;
    RzLabel13: TRzLabel;
    RzDBLookupComboBox9: TRzDBLookupComboBox;
    MedicineID: TDataSource;
    procedure RzBitBtn1Click(Sender: TObject);
  private
    MedicineStockIDModel: TCloneDataModel;
    StockoutorderIDModel: TCloneDataModel;
    MedicineIDModel: TCloneDataModel;
  protected
    procedure InitModel; override;
  public
    function GetCaption: string; override;
  end;


implementation

uses UMADSOOMedicineDetail, UMADMedicine, UMADStockoutorder, UDialogDataItemsView,
  UVADGMedicineStock, UDataItemsView, MyTools, UMADMedicineStock,
  UDataView;

{$R *.dfm}

{ TVADISOOMedicineDetail }
function TVADISOOMedicineDetail.GetCaption: string;
begin
  Result := '医药出库单明细';
end;

procedure TVADISOOMedicineDetail.InitModel;
begin
  inherited;
  MedicineStockIDModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(MedicineStockFactory.GetModel).Clone(MedicineStockIDModel);
  MedicineStockID.DataSet := MedicineStockIDModel.GetDataSet;

  StockoutorderIDModel := TCloneDataModel.Create(Self);
  TPrimaryDataModel(StockoutorderFactory.GetModel).Clone(StockoutorderIDModel);
  StockoutorderID.DataSet := StockoutorderIDModel.GetDataSet;

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

procedure TVADISOOMedicineDetail.RzBitBtn1Click(Sender: TObject);
var
  Dialog: TDialogDataItemsView;
begin
  GetDataModel.GetDataSet.Edit;
  Dialog := TDialogDataItemsView.Create(Self, TDataItemsView(TVADGMedicineStock.Create(Self, MedicineStockGTZFactory)));
  if Dialog.ShowModal = mrOK then
    GetDataModel.GetDataSet.FieldByName('MEDICINESTOCKID').ASInteger := IIntegerKey(Dialog.GetKey).GetKey;
  Dialog.Free;

end;

end.












⌨️ 快捷键说明

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