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