예제 #1
0
    def __handleInsertPenalty(self):
        insertType = self.Request.REQUEST.get('type', '')

        penalty_para = self.__getPenaltyDictionaryData()

        if (insertType == 'user'):
            userPanaltyVO = proxy.px_UserPenalty().createUserPenaltyObject(
                penalty_para)
            if not proxy.px_UserPenalty().insert_model_object(userPanaltyVO):
                raise exception.AppDbValidationError('db insert error')
        elif (insertType == 'admin'):
            adminPanaltyVO = proxy.px_AdminPenalty().createAdminPenaltyObject(
                penalty_para)
            if not proxy.px_AdminPenalty().insert_model_object(adminPanaltyVO):
                raise exception.AppDbValidationError('db insert error')
        else:
            raise exception.AppValidationError('null allow this type')
예제 #2
0
def getUserPenaltyById(id):
    return proxy.px_UserPenalty().getUserPenaltyById(id)
예제 #3
0
def getUserPenaltyList():
    return proxy.px_UserPenalty().getUserPenaltyList()
예제 #4
0
def getUserPenaltyById(id):
    return proxy.px_UserPenalty().getUserPenaltyById(id)
예제 #5
0
def getUserPenaltyList():
    return proxy.px_UserPenalty().getUserPenaltyList()