(
//
procedure TMRPCal
var
//調用儲存過程時的參數
v
i:integer;
begin
//考慮庫存
if checkbox
v
else
v
//是否考慮提前期
if checkbox
v
else
v
//是否考慮損耗
if checkbox
v
else
v
//調用儲存過程
adocommand
+v
adocommand
//刷新數據
adoquery
adoquery
//允許發布計算結果
bitbtn
end;
procedure TMRPCal
begin
//設置列寬度
dbgrid
dbgrid
dbgrid
dbgrid
dbgrid
dbgrid
dbgrid
dbgrid
dbgrid
dbgrid
dbgrid
dbgrid
end;
right
From:http://tw.wingwit.com/Article/program/Delphi/201311/24932.html