def adminDeleteArea():
    try:
        areaVO = AreaVO()

        areaDAO = AreaDAO()

        areaId = request.args.get('areaId')

        areaVO.areaId = areaId

        areaDAO.deleteArea(areaVO)

        return redirect(url_for('adminViewArea'))
    except Exception as ex:
        print(ex)
Exemplo n.º 2
0
def adminDeleteArea():
    try:
        if adminLoginSession() == 'admin':

            areaVO = AreaVO()
            areaDAO = AreaDAO()

            areaId = request.args.get('areaId')

            areaVO.areaId = areaId

            areaDAO.deleteArea(areaVO)

            return redirect(url_for('adminViewArea'))
        else:
            return adminLogoutSession()
    except Exception as ex:
        print(ex)
def adminUpdateArea():
    try:

        areaId = request.form['areaId']
        areaName = request.form['areaName']
        areaPincode = request.form['areaPincode']

        areaVO = AreaVO()
        areaDAO = AreaDAO()

        areaVO.areaId = areaId
        areaVO.areaName = areaName
        areaVO.areaPincode = areaPincode

        areaDAO.updateArea(areaVO)

        return redirect(url_for('adminViewArea'))
    except Exception as ex:
        print(ex)
def adminEditArea():
    try:
        areaVO = AreaVO()

        areaDAO = AreaDAO()

        areaId = request.args.get('areaId')

        areaVO.areaId = areaId

        areaVOList = areaDAO.editArea(areaVO)

        print("=======areaVOList=======", areaVOList)

        print("=======type of areaVOList=======", type(areaVOList))

        return render_template('admin/editArea.html', areaVOList=areaVOList)
    except Exception as ex:
        print(ex)
Exemplo n.º 5
0
def adminEditArea():
    try:
        if adminLoginSession() == 'admin':
            areaVO = AreaVO()

            areaDAO = AreaDAO()

            areaId = request.args.get('areaId')

            areaVO.areaId = areaId

            areaVOList = areaDAO.editArea(areaVO)

            return render_template('admin/editArea.html',
                                   areaVOList=areaVOList)
        else:
            adminLogoutSession()

    except Exception as ex:
        print(ex)
Exemplo n.º 6
0
def adminUpdateArea():
    try:
        if adminLoginSession() == "admin":
            areaName = request.form['areaName']
            areaPincode = request.form['areaPincode']
            area_CityId = request.form['area_CityId']
            areaId = request.form['areaId']

            areaVO = AreaVO()
            areaDAO = AreaDAO()

            areaVO.areaId = areaId
            areaVO.areaName = areaName
            areaVO.areaPincode = areaPincode
            areaVO.area_CityId = area_CityId

            areaDAO.updateArea(areaVO)

            return redirect(url_for('adminViewArea'))
        else:
            return adminLogoutSession()
    except Exception as ex:
        print(ex)
Exemplo n.º 7
0
def adminEditArea():
    try:
        if adminLoginSession() == "admin":
            areaVO = AreaVO()

            areaDAO = AreaDAO()

            cityDAO = CityDAO()

            areaId = request.args.get('areaId')

            areaVO.areaId = areaId

            areaVOList = areaDAO.editArea(areaVO)

            cityVOList = cityDAO.viewCity()

            return render_template('admin/editArea.html',
                                   cityVOList=cityVOList,
                                   areaVOList=areaVOList)
        else:
            return adminLogoutSession()
    except Exception as ex:
        print(ex)