Exemple #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')
Exemple #2
0
def getUserPenaltyById(id):
    return proxy.px_UserPenalty().getUserPenaltyById(id)
Exemple #3
0
def getUserPenaltyList():
    return proxy.px_UserPenalty().getUserPenaltyList()
Exemple #4
0
def getUserPenaltyById(id):
    return proxy.px_UserPenalty().getUserPenaltyById(id)
Exemple #5
0
def getUserPenaltyList():
    return proxy.px_UserPenalty().getUserPenaltyList()