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)
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)