uvmadgpcomedicine.pas
来自「一整套的源代码」· PAS 代码 · 共 89 行
PAS
89 行
unit UVMADGPCOMedicine;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, UMasterAdapterDataGridView, cxStyles, cxCustomData, cxGraphics,
cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, dxPSGlbl, dxPSUtl,
dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider,
dxPSFillPatterns, dxPSEdgePatterns, dxPSCore, RzCommon, cxGridLevel,
cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGrid, jpeg, RzBckgnd, ExtCtrls,
RzPanel, UView, UCloneDataModel, UPrimaryDataModel, Factory, cxCheckBox,
cxDBLookupComboBox;
type
TVMADGPCOMedicine = class(TMasterAdapterDataGridView)
MaterialStockDetailID: TDataSource;
ApproveBY: TDataSource;
UpdateBY: TDataSource;
CreateBY: TDataSource;
GridDBTableViewPCOMEDICINEID: TcxGridDBColumn;
GridDBTableViewAPPROVEDATE: TcxGridDBColumn;
GridDBTableViewNEWPRICE: TcxGridDBColumn;
GridDBTableViewOLDPRICE: TcxGridDBColumn;
GridDBTableViewCREATED: TcxGridDBColumn;
GridDBTableViewUPDATED: TcxGridDBColumn;
GridDBTableViewISAPPROVE: TcxGridDBColumn;
GridDBTableViewMEDICINESTOCKDETAILID: TcxGridDBColumn;
GridDBTableViewCREATEBY: TcxGridDBColumn;
GridDBTableViewUPDATEBY: TcxGridDBColumn;
GridDBTableViewAPPROVEBY: TcxGridDBColumn;
private
CreateBYModel: TCloneDataModel;
UpdateBYModel: TCloneDataModel;
ApproveBYModel: TCloneDataModel;
MaterialStockDetailIDModel: TCloneDataModel;
protected
procedure InitModel; override;
public
function GetCaption: string; override;
function GetDetailView: TView; override;
end;
implementation
uses
UMADPCOMedicine, UMADMedicineStockDetail, UMADEmployee, UVADIPCOMedicine;
{$R *.dfm}
{ TVMADGPCOMedicine }
function TVMADGPCOMedicine.GetCaption: string;
begin
Result := '药品调价单';
end;
function TVMADGPCOMedicine.GetDetailView: TView;
var
View : TVADIPCOMedicine;
begin
View := TVADIPCOMedicine.Create(Self);
View.SetModel(GetModel);
Result := View;
end;
procedure TVMADGPCOMedicine.InitModel;
begin
inherited;
CreateBYModel := TCloneDataModel.Create(Self);
TPrimaryDataModel(EmployeeFactory.GetModel).Clone(CreateBYModel);
CreateBY.DataSet := CreateBYModel.GetDataSet;
UpdateBYModel := TCloneDataModel.Create(Self);
TPrimaryDataModel(EmployeeFactory.GetModel).Clone(UpdateBYModel);
UpdateBY.DataSet := UpdateBYModel.GetDataSet;
ApproveBYModel := TCloneDataModel.Create(Self);
TPrimaryDataModel(EmployeeFactory.GetModel).Clone(ApproveBYModel);
ApproveBY.DataSet := ApproveBYModel.GetDataSet;
MaterialStockDetailIDModel := TCloneDataModel.Create(Self);
TPrimaryDataModel(MaterialStockDetailFactory.GetModel).Clone(MaterialStockDetailIDModel);
MaterialStockDetailID.DataSet := MaterialStockDetailIDModel.GetDataSet;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?