def updateFeedback():

    if session['loginRole'] != 'admin':
        return redirect(url_for('login'))

    else:
        feedbackDAO = FeedbackDAO()
        feedbackVO = FeedbackVO()
        feedbackVO.feedbackId = request.args.get('feedbackId')
        feedbackVO.feedbackTo_LoginId = session['loginId']
        feedbackDAO.updateFeedback(feedbackVO)
        return redirect(url_for('viewFeedback'))
Пример #2
0
def adminReviewFeedback():
    try:
        feedbackVO = FeedbackVO()
        feedbackDAO = FeedbackDAO()

        feedbackId = request.args.get("feedbackId")
        feedbackTo_LoginId = session['session_loginId']

        feedbackVO.feedbackId = feedbackId
        feedbackVO.feedbackTo_LoginId = feedbackTo_LoginId

        feedbackDAO.adminReviewFeedback(feedbackVO)

        return redirect(url_for('adminViewFeedback'))
    except Exception as ex:
        print(ex)
Пример #3
0
def adminUpdateFeedback():
    try:
        if adminLoginSession() == 'admin':
            feedbackId = request.args.get('feedbackId')
            feedbackTo_LoginId = session['session_loginId']

            feedbackVO = FeedbackVO()
            feedbackDAO = FeedbackDAO()

            feedbackVO.feedbackId = feedbackId
            feedbackVO.feedbackTo_LoginId = feedbackTo_LoginId

            feedbackDAO.adminUpdateFeedback(feedbackVO)
            return redirect(url_for('adminViewFeedback'))
        else:
            return adminLogoutSession()
    except Exception as ex:
        print(ex)
Пример #4
0
def adminViewFeedbackReview():
    try:
        if adminLoginSession() == "admin":
            feedbackId = request.args.get('feedbackId')
            feedbackTo_LoginId = session['session_loginId']

            print(feedbackId)

            feedbackVO = FeedbackVO()
            feedbackDAO = FeedbackDAO()

            feedbackVO.feedbackId = feedbackId
            feedbackVO.feedbackTo_LoginId = feedbackTo_LoginId

            feedbackDAO.viewAdminFeedbackReview(feedbackVO)

            return redirect(url_for('adminViewFeedback'))
        else:
            return adminLogoutSession()
    except Exception as ex:
        print(ex)
Пример #5
0
def ViewFeedbackReview():
    try:
        if adminLoginSession() == "bloodbank":
            feedbackId = request.args.get('feedbackId')
            feedbackTo_LoginId = session['session_loginId']

            print(feedbackId)

            feedbackVO = FeedbackVO()
            feedbackDAO = FeedbackDAO()
            print("####################@@@@@@@@@@@@@@@@@@@@@@@@@")
            feedbackVO.feedbackId = feedbackId
            feedbackVO.feedbackTo_LoginId = feedbackTo_LoginId
            print("@@@@@@@@@@@@@@@@@@@@$$$$$$$$$$$$$$$$$$$$$$$$$")
            feedbackDAO.viewBloodbankFeedbackReview(feedbackVO)
            print("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
            return redirect(url_for('bloodbankViewUserFeedback'))
        else:
            return adminLogoutSession()
    except Exception as ex:
        print(ex)