搜索
首页 电脑/网络 软件 网络软件

我想用ASP来做个值班表,请大家看看,帮帮忙

  我想做个值班表,要求如下: 日期 星期 1组 2组 3组 4组 2008年4月7日 星期一 a1 b1 c1 d1 2008年4月8日 星期二 a1 b2 c2 d2 2008年4月9日 星期三 a2 b3 c3 d3 2008年4月10日 星期四 a2 b1 c4 d4 2008年4月11日 星期五 a3 b2 c5 d5 2008年4月12日 星期六 a3 b3 c6 d6 2008年4月13日 星期日 a1 b1 c1 d1 就这样, 1组中有三个人,一人两天轮流值班 2组中有三个人,一人一天轮流值班 3组中有六个人,一人一天轮流值班 4组中有六个人,一人一天轮流值班 大家帮我想个思路 用ASP怎么做出这个值班表来呀,。
  

全部回答

2008-04-12

0 0

    我的思路: 值班数据库 ,zdate(值班时间),person(值班人),sign(标志,如果为2,a组换人) 1。先读出上一条值班的数据: dim person,sign dim p,n,pp,maxp,newp rs。
  open "select top 1 * from zhiban order by id desc",conn,1,1 if rs。  eof then person="a1,b1,c1,d1," sign=1 n=1 else person=rs("person") sign=rs("sign") end if ose p=split(person,",") n=int(replace(p(i),pp)))+1 for i=0 to ubound(p) pp=left(p(i),1) if pp="a" then if sign=1 then n=n-1 sign=sign+1 else sign=1 end if maxp=3 end if if pp="b" then maxp=3 if pp="c" then maxp=6 if pp="d" then maxp=6 if n>maxp or n="" then n=1 newp=newp&pp&n&"," next '数据处理完存进数据库 rs。
    open "select * from zhiban where id is null",conn,1,3 dnew rs("person")=newp rs("zdate")=now() '或其他时间 rs。
  update ose >>>数据处理好了,建个表把a1-d6对应每个人的名字,调出来就好了 >>>人在外面,代码在记事本上随手打的,没调试,不过按这个思路应该没问题的 >>>当然感觉这不是最好的方法,应该还有更好的。
    。

类似问题换一批

热点推荐

热度TOP

相关推荐
加载中...

热点搜索 换一换

电脑/网络
网络软件
程序设计
电脑装机
操作系统/系统故障
硬件
笔记本电脑
百度
互联网
反病毒
软件
软件
网络软件
多媒体软件
系统软件
办公软件
图像处理软件
网络软件
网络软件
举报
举报原因(必选):
取消确定举报