?? 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 + -