示例#1
0
def userAjaxAreaAppointment():
    try:
        areaVO = AreaVO()
        areaDAO = AreaDAO()

        area_CityId = request.args.get('appointment_CityId')
        print('area_CityId::', area_CityId)

        areaVO.area_CityId = area_CityId

        ajaxBloodBankAreaList = areaDAO.ajaxArea(areaVO)

        ajaxBloodBankAreaJson = [i.as_dict() for i in ajaxBloodBankAreaList]

        return jsonify(ajaxBloodBankAreaJson)

    except Exception as ex:
        print(ex)
示例#2
0
def userAjaxAreaUser():
    try:
        areaVO = AreaVO()

        areaDAO = AreaDAO()

        area_CityId = request.args.get('user_CityId')
        print('area_CityId::', area_CityId)

        areaVO.area_CityId = area_CityId

        ajaxUserAreaList = areaDAO.ajaxArea(areaVO)
        print('ajaxUserAreaList::', ajaxUserAreaList)

        ajaxUserAreaJson = [i.as_dict() for i in ajaxUserAreaList]
        print('ajaxUserAreaJson::', ajaxUserAreaJson)

        return jsonify(ajaxUserAreaJson)

    except Exception as ex:
        print(ex)
示例#3
0
def adminInsertArea():
    try:
        if adminLoginSession() == "admin":
            areaName = request.form['areaName']
            areaPincode = request.form['areaPincode']

            area_CityId = request.form['area_CityId']

            areaVO = AreaVO()
            areaDAO = AreaDAO()

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

            areaDAO.insertArea(areaVO)

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