예제 #1
0
def attend(sid):

    schedule = FinalScheduleTable.select(sid, 'id')
    name = schedule[0].s_name
    user = FinalUserTable.select(name, 'name')
    actual = user[0].time_actual + 1

    FinalUserTable.update(name, actual, 'Vars')
    FinalScheduleTable.update(sid, 0, 0, '1', 'Fs')
예제 #2
0
def coverPerson(sid):
    myperson = web.input().get('person')

    result = FinalUserTable.select(myperson, 'name')
    if not result:
        return False

    FinalScheduleTable.update(sid, 0, myperson, '1', 'PFs')
    schedule = FinalScheduleTable.select(sid, 'id')
    user = FinalUserTable.select(myperson, 'name')
    actual = user[0].time_actual + 1
    FinalUserTable.update(myperson, actual, 'Vars')

    return True
예제 #3
0
def undo(sid):

    schedule = FinalScheduleTable.select(sid, 'id')
    myschedule = schedule[0]
    change = myschedule.ischange
    if not change:
        name = myschedule.s_name
    else:
        name = myschedule.person
    

    user = FinalUserTable.select(name, 'name')
    actual = user[0].time_actual - 1
    FinalUserTable.update(name, actual, 'Vars')
    FinalScheduleTable.update(sid, '0', 0, '0', 'FsCh')
예제 #4
0
def userclear():

    users = FinalUserTable.select(0, 'all')

    for user in users:
        FinalUserTable.update(user.s_name, '0', 'Nov')