📄 uvadirmedicine.pas
字号:
unit UVADIRmedicine;
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, UMADRmedicine, UCloneDataModel, UDialogDataItemsView, UDataItemsView,
MyTools;
type
TVADIRmedicine = class(TAdapterDataItemView)
PStockMedicine: TDataSource;
RzLabel2: TRzLabel;
RzLabel3: TRzLabel;
RzDBEdit3: TRzDBEdit;
RzDBEdit4: TRzDBEdit;
RzLabel4: TRzLabel;
RzDBLookupComboBox2: TRzDBLookupComboBox;
RzLabel7: TRzLabel;
RzLabel11: TRzLabel;
RzDBLookupComboBox6: TRzDBLookupComboBox;
RzBitBtn1: TRzBitBtn;
Medicine: TDataSource;
RzDBLookupComboBox1: TRzDBLookupComboBox;
RzLabel1: TRzLabel;
RzDBLookupComboBox3: TRzDBLookupComboBox;
RzDBLookupComboBox4: TRzDBLookupComboBox;
RzLabel5: TRzLabel;
UnitsID: TDataSource;
procedure RzBitBtn1Click(Sender: TObject);
private
PStockMedicineModel: TCloneDataModel;
MedicineModel: TCloneDataModel;
UnitsIDModel: TCloneDataModel;
protected
procedure InitModel; override;
public
function GetCaption: string; override;
end;
implementation
uses UMADVPStockMedicine, Factory, UPrimaryDataModel, UMADMedicine,
UVADGVPStockMedicine, UMADUnits;
{$R *.dfm}
{ TVADIRmedicine }
function TVADIRmedicine.GetCaption: string;
begin
Result := '物资账单';
end;
procedure TVADIRmedicine.InitModel;
begin
inherited;
PStockMedicineModel := GetCloneDataModel(TPrimaryDataModel(VPStockmedicineFactory.GetModel));
PStockMedicine.DataSet := PStockMedicineModel.GetDataSet;
MedicineModel := GetCloneDataModel(TPrimaryDataModel(MedicineFactory.GetModel));
Medicine.DataSet := MedicineModel.GetDataSet;
UnitsIDModel := GetCloneDataModel(TPrimaryDataModel(UnitsFactory.GetModel));
UnitsID.DataSet := UnitsIDModel.GetDataSet;
end;
procedure TVADIRmedicine.RzBitBtn1Click(Sender: TObject);
var
Dialog : TDialogDataItemsView;
begin
GetDataModel.GetDataSet.Edit;
Dialog := TDialogDataItemsView.Create(Self, TDataItemsView(TVADGVPStockMedicine.Create(Self, VPStockmedicineFactory)));
if Dialog.ShowModal = mrOk then
GetDataModel.GetDataSet.FieldByName('PStockmedicineID').AsInteger := IIntegerKey(Dialog.GetKey).GetKey;
Dialog.Free;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -