Example #1
0
	def insert(self, userName, password):
		'''
		插入数据
		'''
		value = 0;
		if DBUserInfo.select(userName) == None:
			value = DBUserInfo.insert(userName, password)
		return value
Example #2
0
    def insert(self, userName, password):
        '''
		插入数据
		'''
        value = 0
        if DBUserInfo.select(userName) == None:
            value = DBUserInfo.insert(userName, password)
        return value
Example #3
0
	def login(self, userName, password):
		"""
		用户登录
		returns:
			true:登录成功
			false:登录失败
		"""
		
		if DBUserInfo.login(userName, password):
			Logger.info("用户验证成功")
			userInfo = UserInfo(userName, 0);
			from webapp.Common import Common
			Common.session.userInfo = userInfo
			# 初始化菜单数据
			from MenuManagement import MenuManagement
			Common.session.menu = MenuManagement(userName)
			return True
		else:
			Logger.info("用户验证失败")
			return False;
Example #4
0
	def select(self, userName):
		'''
		查找指定用户
		'''
		value = DBUserInfo.select(userName)
		return value
Example #5
0
	def selectAll(self, userName):
		'''
		查找用户
		'''
		value = DBUserInfo.selectAll(userName)
		return value
Example #6
0
    def select(self, userName):
        '''
		查找指定用户
		'''
        value = DBUserInfo.select(userName)
        return value
Example #7
0
    def selectAll(self, userName):
        '''
		查找用户
		'''
        value = DBUserInfo.selectAll(userName)
        return value