if strtoint(lab_order_result) < 130 then
begin
value := 'A';
end
else begin
if strtoint(lab_order_result) >= 180 then
begin
value := 'C';
end
else begin
value := 'B';
end;
end;
ผมลองใช้ strtoint แล้วไม่ผ่านครับ
if GetSQLStringData('select lab_order_result from lab_order where lab_order_number = "'+DBPipeline['lab_order_number']+'"') < '130' then
begin
Value := 'A' ;
end
else
if (GetSQLStringData('select lab_order_result from lab_order where lab_order_number = "'+DBPipeline['lab_order_number']+'"') > '130') and (GetSQLStringData('select lab_order_result from lab_order where lab_order_number = "'+DBPipeline['lab_order_number']+'"') < '180') then
begin
Value := 'B' ;
end
else
if GetSQLStringData('select lab_order_result from lab_order where lab_order_number = "'+DBPipeline['lab_order_number']+'"') > '180' then
begin
Value := 'C' ;
end
ผมเขียนแบบนี้ครับ แนะนำหน่อยครับ