Esempio n. 1
0
def userInsertFeedback():
    try:
        if adminLoginSession() == 'user':
            feedbackSubject = request.form['feedbackSubject']
            feedbackDescription = request.form['feedbackDescription']
            feedbackRating = request.form['feedbackRating']
            feedbackDate = date.today()
            feedbackTime = datetime.now().strftime("%H:%M:%S")
            feedbackFrom_LoginId = session['session_loginId']

            feedbackVO = FeedbackVO()
            feedbackDAO = FeedbackDAO()

            feedbackVO.feedbackSubject = feedbackSubject
            feedbackVO.feedbackDescription = feedbackDescription
            feedbackVO.feedbackRating = feedbackRating
            feedbackVO.feedbackDate = feedbackDate
            feedbackVO.feedbackTime = feedbackTime
            feedbackVO.feedbackFrom_LoginId = feedbackFrom_LoginId

            feedbackDAO.insertFeedback(feedbackVO)

            return redirect(url_for('userViewFeedback'))

        else:
            return adminLogoutSession()

    except Exception as ex:
        print(ex)
Esempio n. 2
0
def userInsertFeedback():
    try:

        feedbackSubject = request.form['feedbackSubject']
        feedbackDescription = request.form['feedbackDescription']
        feedbackRating = request.form['feedbackRating']

        feedbackVO = FeedbackVO()
        feedbackDAO = FeedbackDAO()

        todayDate = str(datetime.now().date())
        timeNow = datetime.now().strftime("%H:%M:%S")

        feedbackVO.feedbackFrom_LoginId = session['session_loginId']
        feedbackVO.feedbackSubject = feedbackSubject
        feedbackVO.feedbackDescription = feedbackDescription
        feedbackVO.feedbackRating = feedbackRating
        feedbackVO.feedbackDate = todayDate
        feedbackVO.feedbackTime = timeNow

        feedbackDAO.insertFeedback(feedbackVO)

        return redirect(url_for('userViewFeedback'))

    except Exception as ex:
        print(ex)
def insertfeedback():
    if session['loginDictrole'] == 'seller':

        feedbackDAO = FeedbackDAO()
        feedbackVO = FeedbackVO()

        feedbackVO.feedbackSubject = str(request.form["feedbackSubject"])

        feedbackVO.feedbackDescription = str(
            request.form["feedbackDescription"])

        feedbackVO.feedbackRating = str(request.form["feedbackRating"])

        datetime = time.ctime().split(" ")
        feedbackVO.feedbackTime = datetime[-2]
        feedbackVO.feedbackDate = " ".join(
            [datetime[1], datetime[2], datetime[4]])

        feedbackVO.feedbackActivestatus = "active"

        feedbackVO.feedbackFrom_loginId = str(session['loginDictId'])

        #feedbackVO.feedback_loginId = str(session['loginDictId'])
        #print feedbackVO.feedback_loginId

        feedbackDAO.insertFeedback(feedbackVO)

        return "vffd"
Esempio n. 4
0
def insertFeedback():
    try:
        if session['sessionloginDict']['loginRole'] == 'user':
            feedbackDAO = FeedbackDAO()
            feedbackVO = FeedbackVO()

            feedbackDescription = request.form['feedbackDescription']
            feedbackRating = request.form['feedbackRating']

            feedbackVO.feedbackDescription = feedbackDescription
            feedbackVO.feedbackRating = feedbackRating
            feedbackVO.feedbackActiveStatus = 'active'
            return render_template('admin/addFeedback.html')
        else:
            flash('Plese Login First !', 'danger')
            return redirect(url_for('loadLogin'))
    except:
        flash('Plese Login First !', 'danger')
        return redirect(url_for('loadLogin'))