📄 uvadirecipe.pas
字号:
unit UVADIRecipe;
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, StdCtrls, Mask, RzEdit, RzDBEdit, RzLabel, DBCtrls,
RzDBCmbo, RzRadChk, RzDBChk, UCloneDataModel, UPrimaryDataModel, Factory;
type
TVADIRecipe = class(TAdapterDataItemView)
RzDBEdit1: TRzDBEdit;
RzLabel1: TRzLabel;
RzLabel5: TRzLabel;
RzLabel8: TRzLabel;
RzLabel9: TRzLabel;
RzDBLookupComboBox2: TRzDBLookupComboBox;
RzDBLookupComboBox3: TRzDBLookupComboBox;
Sick: TDataSource;
Doctor: TDataSource;
Reckoning: TDataSource;
RzDBLookupComboBox4: TRzDBLookupComboBox;
RzBitBtn1: TRzBitBtn;
procedure RzBitBtn1Click(Sender: TObject);
private
ReckoningModel: TCloneDataModel;
DoctorModel: TCloneDataModel;
SickModel: TCloneDataModel;
protected
procedure InitModel; override;
public
function GetCaption: string; override;
end;
implementation
uses
UMADRecipe, UMADEmployee, UMADDoctor, UMADReckoning ,
UMADSick, UDialogDataItemsView, UVMADGSick, UDataItemsView, MyTools;
{$R *.dfm}
{ TVADIRecipe }
function TVADIRecipe.GetCaption: string;
begin
Result := '处方';
end;
procedure TVADIRecipe.InitModel;
begin
inherited;
SickModel := GetCloneDataModel(TPrimaryDataModel(SickFactory.GetModel));
Sick.DataSet := SickModel.GetDataSet;
ReckoningModel := GetCloneDataModel(TPrimaryDataModel(ReckoningFactory.GetModel));
Reckoning.DataSet := ReckoningModel.GetDataSet;
DoctorModel := GetCloneDataModel(TPrimaryDataModel(DoctorFactory.GetModel));
Doctor.DataSet := DoctorModel.GetDataSet;
end;
procedure TVADIRecipe.RzBitBtn1Click(Sender: TObject);
var
Dialog: TDialogDataItemsView;
begin
inherited;
Dialog := TDialogDataItemsView.Create(Self, TDataItemsView(TVMADGSick.Create(Self, SickTodayFactory)));
if Dialog.ShowModal = mrOk then
begin
GetDataModel.GetDataSet.FieldByName('SickID').AsInteger := IIntegerKey(Dialog.GetKey).GetKey;
end;
Dialog.Free;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -