def deleteFeedback():
    if session['loginRole'] == 'admin':
        return redirect(url_for('login'))
    else:
        feedbackVO = FeedbackVO()
        feedbackDAO = FeedbackDAO()
        feedbackVO.feedbackId = request.args.get('feedbackId')
        feedbackVO.feedbackActiveStatus = 'deactive'
        feedbackDAO.deleteFeedback(feedbackVO)
        return redirect(url_for('viewFeedback'))
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'))
Beispiel #3
0
def userDeleteFeedback():
    try:
        if adminLoginSession() == 'user':

            feedbackVO = FeedbackVO()
            feedbackDAO = FeedbackDAO()
            feedbackId = request.args.get('feedbackId')
            feedbackVO.feedbackId = feedbackId
            feedbackDAO.deleteFeedback(feedbackVO)

            return redirect(url_for('userViewFeedback'))
        else:
            return adminLogoutSession()
    except Exception as ex:
        print(ex)
def deleteFeedback():
    if session['loginDictrole'] == 'seller':
        feedbackDAO = FeedbackDAO()
        feedbackVO = FeedbackVO()

        feedbackVO.feedbackActiveStatus = 'deactivate'

        feedbackVO.feedbackId = request.args.get('feedbackId')

        feedbackDAO.deleteFeedback(feedbackVO)

        return redirect('/viewuserFeedback')
    else:
        return render_template('admin/login.html',
                               loginerrorDict='Please login first')
Beispiel #5
0
def userDeleteFeedback():
    try:
        feedbackVO = FeedbackVO()
        feedbackDAO = FeedbackDAO()

        feedbackId = request.args.get("feedbackId")

        feedbackVO.feedbackId = feedbackId

        feedbackDAO.deleteFeedback(feedbackVO)

        return redirect(url_for('userViewFeedback'))

    except Exception as ex:
        print(ex)
Beispiel #6
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)
Beispiel #7
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)
Beispiel #8
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)
Beispiel #9
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)