📄 uvmadgscomedicine.pas
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -