uvmadgscomedicine.pas
来自「一整套的源代码」· PAS 代码 · 共 89 行
PAS
89 行
unit UVMADGSCOMedicine;
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
TVMADGSCOMedicine = class(TMasterAdapterDataGridView)
MedicineStockDetail: TDataSource;
GridDBTableViewSCOMEDICINEID: TcxGridDBColumn;
GridDBTableViewISAPPROVE: TcxGridDBColumn;
GridDBTableViewOAMOUNT: TcxGridDBColumn;
GridDBTableViewCQUANTITY: TcxGridDBColumn;
GridDBTableViewCREATED: TcxGridDBColumn;
GridDBTableViewUPDATED: TcxGridDBColumn;
GridDBTableViewMEDICINESTOCKDETAILID: TcxGridDBColumn;
GridDBTableViewCREATEBY: TcxGridDBColumn;
GridDBTableViewUPDATEBY: TcxGridDBColumn;
GridDBTableViewAPPROVEBY: TcxGridDBColumn;
GridDBTableViewAPPROVEDATE: TcxGridDBColumn;
UpdateBy: TDataSource;
ApproveBy: TDataSource;
CreateBy: TDataSource;
private
CreateByModel: TCloneDataModel;
UpdateByModel: TCloneDataModel;
ApproveByModel: TCloneDataModel;
MedicineStockDetailModel: TCloneDataModel;
protected
procedure InitModel; override;
public
function GetCaption: string; override;
function GetDetailView: TView; override;
end;
implementation
uses UMADSCOMedicine, UMADEmployee, UMADMedicineStockDetail,
UVADISCOMedicine;
{$R *.dfm}
{ TVMADGSCOMedicine }
function TVMADGSCOMedicine.GetCaption: string;
begin
Result := '医药库存变更单';
end;
function TVMADGSCOMedicine.GetDetailView: TView;
var
View : TVADISCOMedicine;
begin
View := TVADISCOMedicine.Create(Self);
View.SetModel(GetModel);
Result := View;
end;
procedure TVMADGSCOMedicine.InitModel;
begin
inherited;
CreateByModel := TCloneDataModel.Create(Self);
TPrimaryDataModel(EmployeeFactory.GetModel).Clone(CreateByModel);
CreateBy.DataSet := CreateByModel.GetDataSet;
ApproveByModel := TCloneDataModel.Create(Self);
TPrimaryDataModel(EmployeeFactory.GetModel).Clone(ApproveByModel);
ApproveBy.DataSet := ApproveByModel.GetDataSet;
UpdateByModel := TCloneDataModel.Create(Self);
TPrimaryDataModel(EmployeeFactory.GetModel).Clone(UpdateByModel);
UpdateBy.DataSet := UpdateByModel.GetDataSet;
MedicineStockDetailModel := TCloneDataModel.Create(Self);
TPrimaryDataModel(MedicineStockDetailFactory.GetModel).Clone(MedicineStockDetailModel);
MedicineStockDetail.DataSet := MedicineStockDetailModel.GetDataSet;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?