毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

PB教务管理系统(开题报告+任务书+英文文献翻译) 第18页

更新时间:2010-3-18:  来源:毕业论文
PB教务管理系统(开题报告+任务书+英文文献翻译) 第18页
 dw_course.filter()
end if
完成教室安排的”确定” 按钮的clicked事件代码如下:
string week_start,week_end,course_name,name
int n,i,j,week1,time1,week2,time2
boolean canwritetotable
string weeks[6]={"","星期一","星期二","星期三","星期四","星期五"}
string class[5]={"","第1讲","第2讲","第3讲","第4讲"}
week_start=sle_n1.text
week_end=sle_n2.text
name=ddlb_week1.text
week1=ddlb_week1.finditem(name,0)
name=ddlb_time1.text
time1=ddlb_time1.finditem(name,0)
name=ddlb_week2.text
week2=ddlb_week2.finditem(name,0)
name=ddlb_time2.text
time2=ddlb_time2.finditem(name,0)
if week1=week2 and time1=time2 and ddlb_room1.text=ddlb_room2.text then
 messagebox("制定课程表","两次上课时间不能相同",Exclamation!)
 ddlb_week2.setfocus()
 return
end if
if not isnumber(week_start) then
 messagebox("制定课程表","请输入有效的课程开始周!",Exclamation!)
 sle_n1.setfocus()
 return
end if
if not isnumber(week_end) then
 messagebox("制定课程表","请输入有效的课程结束周!",Exclamation!)
 sle_n2.setfocus()
 return
end if
if week1<=1 then
 messagebox("制定课程表","请选择第一次课在哪一天上!",Exclamation!)
 ddlb_week1.setfocus()
 return
end if
if time1<=1 then
 messagebox("制定课程表","请选择第一次课在哪一节上!",Exclamation!)
 ddlb_time1.setfocus()
 return
end if
if week2>=1 then
 if time2<=1 then
  messagebox("制定课程表","请选择第二次课在哪一节上!",Exclamation!)
  ddlb_time2.setfocus()
  return
 end if
end if
//清除当前课程原安排
n=dw_course.getrow()
course_name=dw_course.getitemstring(n,2)
for i=1 to dw_ctabletemp.rowcount()
 for j=2 to 6
  name=dw_ctabletemp.getitemstring(i,j)
  if pos(name,course_name)>0 then
   dw_ctabletemp.setitem(i,j,"")
  end if  
 next
next
//检验当前课程表相同位置是否安排其他课程
name=dw_ctabletemp.getitemstring(time1 - 1,week1)
if pos(name,course_name)=0 and name<>"" then
 messagebox("制定课程表",weeks[week1]+class[time1]+"已安排其他课程")
 return
end if
if week2>1 then
 name=dw_ctabletemp.getitemstring(time2 - 1,week2)
 if pos(name,course_name)=0 and name<>"" then
  messagebox("制定课程表",weeks[week2]+class[time2]+"已安排其他课程")
  return
 end if 
end if
//检验教室相同位置是否安排其他课程
n=ddlb_room1.finditem(ddlb_room1.text,0)
ddlb_room1.event selectionchanged(n)
n=dw_roomtemp.getitemnumber(time1 - 1,week1)
if n=1 then
 messagebox("制定课程表",ddlb_room1.text+weeks[week1]+class[time1]+"已安排其他课程")
 return
end if
n=ddlb_room2.finditem(ddlb_room2.text,0)
ddlb_room2.event selectionchanged(n)
n=dw_roomtemp.getitemnumber(time2 - 1,week2)
if n=1 then
 messagebox("制定课程表",ddlb_room2.text+weeks[week2]+class[time2]+"已安排其他课程")
 return
end if
//将当前课程安排写入课程表 
name=course_name+"~r~n"+ddlb_room1.text
name=name+","+week_start+"-"+week_end+"周"
dw_ctabletemp.setitem(time1 - 1,week1,name)
if week2>=1 then
 name=course_name+"~r~n"+ddlb_room2.text
 name=name+","+week_start+"-"+week_end+"周"
 dw_ctabletemp.setitem(time2 - 1,week2,name)
end if

 << 上一页  [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]  ... 下一页  >> 

PB教务管理系统(开题报告+任务书+英文文献翻译) 第18页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。