📄 unit11.pas
字号:
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''622%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=6221;
end;
end;
end;
end;
if TreeView1.Selected.text='第三知识点 一维数组和运算' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''623%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=6231;
end;
end;
end;
end;
if TreeView1.Selected.text='第四知识点 二维数组和运算' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''624%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=6241;
end;
end;
end;
end;
if TreeView1.Selected.text='第五知识点 字符指针和字符串' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''625%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=6251;
end;
end;
end;
end;
if TreeView1.Selected.text='第六知识点 多级指针' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''626%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=6261;
end;
end;
end;
end;
if TreeView1.Selected.text='第七知识点 指针型函数' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''627%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=6271;
end;
end;
end;
end;
if TreeView1.Selected.text='第八知识点 指向函数的指针' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''628%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=6281;
end;
end;
end;
end;
{
if TreeView1.Selected.text='第七章 函数 结构体与共用体 ' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_choose where tno like ''7%%%''');
query1.Open;
end;
end;
if TreeView1.Selected.text='第一节 ' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_choose where tno like ''71%%''');
query1.Open;
end;
end; }
if TreeView1.Selected.text='第一知识点 函数设计' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''711%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7111;
end;
end;
end;
end;
if TreeView1.Selected.text='第二知识点 函数的存储类型' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''712%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7121;
end;
end;
end;
end;
if TreeView1.Selected.text='第三知识点 变量的作用域和存储类型' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''713%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7131;
end;
end;
end;
end;
if TreeView1.Selected.text='第四知识点 函数的数据传递' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''714%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7141;
end;
end;
end;
end;
if TreeView1.Selected.text='第五知识点 数组在函数间的传递' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''715%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7151;
end;
end;
end;
end;
if TreeView1.Selected.text='第六知识点 递归函数' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''716%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7161;
end;
end;
end;
end;
if TreeView1.Selected.text='第七知识点 传递main()函数的参数' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''717%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7171;
end;
end;
end;
end;
{
if TreeView1.Selected.text='第二节 ' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_choose where tno like ''72%%''');
query1.Open;
end;
end; }
if TreeView1.Selected.text='第一知识点 结构体定义和变量说明' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''721%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7211;
end;
end;
end;
end;
if TreeView1.Selected.text='第二知识点 结构体变量的引用和初始化' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''722%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7221;
end;
end;
end;
end;
if TreeView1.Selected.text='第三知识点 结构体数组' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''723%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7231;
end;
end;
end;
end;
if TreeView1.Selected.text='第四知识点 结构体指针' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''724%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7241;
end;
end;
end;
end;
if TreeView1.Selected.text='第五知识点 函数之间结构体变量的数据传递' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''725%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7251;
end;
end;
end;
end;
if TreeView1.Selected.text='第六知识点 结构体嵌套' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''726%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7261;
end;
end;
end;
end;
if TreeView1.Selected.text='第七知识点 链表' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''727%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7271;
end;
end;
end;
end;
if TreeView1.Selected.text='第八知识点 共用体' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''728%'' order by tno');
query1.Open;
begin
if query1.RecordCount<>0 then
begin
query1.Last;
temp:=query1.FieldValues['tno']+1;
end
else if query1.RecordCount=0 then
begin
temp:=7281;
end;
end;
end;
end;
if TreeView1.Selected.text='第九知识点 枚举类型' then
begin
query1.Active:=false;
query1.Active:=true;
if(query1.Active=true)then
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from ti_procedure where tno like ''729%'' order by tno');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -