C
czly
Unregistered / Unconfirmed
GUEST, unregistred user!
rdgOption:为Tradiogroup动态数组
var
i, j, k: Integer;
begin
inherited;
for k := low(rdgOption) to high(rdgOption) do
begin
rdgOption[k].Free;
rdgOption[k] := nil;
end;
itemSysID := rgItemSys.ItemIndex + 1;
openDataSetEx(DM_Frm.AdoConn, adsEval,'SELECT COUNT(*)'
+' FROM EVALUATE_SYSTEM_DETAIL WHERE EVAL_SYS_ID ='+quotedstr(intToStr(ItemSysID)));
{ TODO : 得到题数 }
evaluate_basic_Count := adsEval.Fields[0].AsInteger;
setLength(rdgOption, evaluate_basic_Count);
openDataSetEx(DM_Frm.AdoConn, adsEval,'select k.id,k.name as lkey,k.eval_id,'
+ 'k.percentage,b.name,s.Percentage as mark from evaluate_key as k,'
+ 'evaluate_basic as b, EVALUATE_SYSTEM_DETAIL as s where b.id ='
+ ' k.Eval_id and b.id =S.Eval_Id and Eval_Sys_id ='+ quotedstr(intToStr(ItemSysID)));
{ TODO : 创建题目和答案 }
for j := 1 to evaluate_basic_Count do
begin
dataSetLocate(adsEval,'eval_id',j);
rdgOption[j] := TRadioGroup.Create(self);
rdgOption[j].Width := 420;
rdgOption[j].Height := 50;
rdgOption[j].Columns := 4;
rdgOption[j].Left := (sbcontainer.Width - rdgOption[j].Width) div 2;
rdgOption[j].Top := RdgOption[j].Height * j;
rdgOption[j].Caption := intToStr(j)+'. ' + adsEval['name'];
rdgOption[j].Tag := adsEval['eval_id'];
rdgOption[j].ItemIndex := -1;
rdgOption[j].Parent := sbcontainer;
for i := 1 to 4 do
begin
rdgOption[j].Items.Add(adsEval['lkey']);
adsEval.Next;
end;
end;
end;
var
i, j, k: Integer;
begin
inherited;
for k := low(rdgOption) to high(rdgOption) do
begin
rdgOption[k].Free;
rdgOption[k] := nil;
end;
itemSysID := rgItemSys.ItemIndex + 1;
openDataSetEx(DM_Frm.AdoConn, adsEval,'SELECT COUNT(*)'
+' FROM EVALUATE_SYSTEM_DETAIL WHERE EVAL_SYS_ID ='+quotedstr(intToStr(ItemSysID)));
{ TODO : 得到题数 }
evaluate_basic_Count := adsEval.Fields[0].AsInteger;
setLength(rdgOption, evaluate_basic_Count);
openDataSetEx(DM_Frm.AdoConn, adsEval,'select k.id,k.name as lkey,k.eval_id,'
+ 'k.percentage,b.name,s.Percentage as mark from evaluate_key as k,'
+ 'evaluate_basic as b, EVALUATE_SYSTEM_DETAIL as s where b.id ='
+ ' k.Eval_id and b.id =S.Eval_Id and Eval_Sys_id ='+ quotedstr(intToStr(ItemSysID)));
{ TODO : 创建题目和答案 }
for j := 1 to evaluate_basic_Count do
begin
dataSetLocate(adsEval,'eval_id',j);
rdgOption[j] := TRadioGroup.Create(self);
rdgOption[j].Width := 420;
rdgOption[j].Height := 50;
rdgOption[j].Columns := 4;
rdgOption[j].Left := (sbcontainer.Width - rdgOption[j].Width) div 2;
rdgOption[j].Top := RdgOption[j].Height * j;
rdgOption[j].Caption := intToStr(j)+'. ' + adsEval['name'];
rdgOption[j].Tag := adsEval['eval_id'];
rdgOption[j].ItemIndex := -1;
rdgOption[j].Parent := sbcontainer;
for i := 1 to 4 do
begin
rdgOption[j].Items.Add(adsEval['lkey']);
adsEval.Next;
end;
end;
end;