.grid2.setfocus
endif
endif
endif
借书按钮:用户输入和书籍号,单击借书,在借书信息表中显示该学生借书的详细信息。其CLICK
()代码如下:
num1=alltrim(thisform.text1.value)
num2=alltrim(thisform.text2.value)
if num1=="".and.num2==""
messagebox("请输入借书的和书籍号")
else
select s
locate for s.=num1
if .not.found()
messagebox("此不存在请重新输入")
else
num1=alltrim(thisform.text1.value)
select course
locate for course.书籍编号=num2
if .not.found()
messagebox("此书籍号不存在请重新输入书籍号")
else
num2=alltrim(thisform.text2.value)
thisform.grid3.linkmaster=" "
thisform.grid3.recordsource=""
thisform.grid3.recordsourcetype=1
thisform.grid3.relationalexpr=" "
thisform.grid3.childorder=" "
thisform.refresh
select sc
locate for sc.=num1 and sc.书籍编号=num2
if found()
messagebox("此借书记录已存在")
else
insert into sc(,书籍编号) values(num1,num2)
thisform.grid3.linkmaster=" "
thisform.grid3.recordsource="sc"
thisform.grid3.recordsourcetype=1
thisform.grid3.relationalexpr=" "
thisform.grid3.childorder=" "
thisform.refresh
thisform.grid3.setfocus
endif
endif
endif
endif
退书按钮:用户输入相应的和书籍号,单击退书,可实现学生的退书。其CLICK()代码如下:
num1=alltrim(thisform.text1.value)
num2=alltrim(thisform.text2.value)
if num1=="".and.num2==""
messagebox("请输入退书的和书籍号")
else
num1=alltrim(thisform.text1.va