def adminInsertArea(): try: areaName = request.form['areaName'] areaPincode = request.form['areaPincode'] areaVO = AreaVO() areaDAO = AreaDAO() areaVO.areaName = areaName areaVO.areaPincode = areaPincode areaDAO.insertArea(areaVO) return redirect(url_for('adminViewArea')) except Exception as ex: print(ex)
def adminInsertArea(): try: if adminLoginSession() == 'admin': areaName = request.form['areaName'] areaPincode = request.form['areaPincode'] areaVO = AreaVO() areaDAO = AreaDAO() areaVO.areaName = areaName areaVO.areaPincode = areaPincode areaDAO.insertArea(areaVO) return redirect(url_for('adminViewArea')) else: return adminLogoutSession() except Exception as ex: print(ex)