def deletecust(val): #Delete customer if val == 1: Customer.deleteCustomer(custinfo.get()) messagebox.showinfo("DELETE CUSTOMER", "Customer Deleted Successfully") fr2gen() fra.destroy() else: notFound() fr2gen()
def searchcust(val): # Retrive data from database global values if val == 1: values = Customer.searchcust(cuInfo.get()) displayData(values) fra.destroy() fr2gen() else: notFound() fr2gen()
def checkCustExistence(): # Check whether cust exist or not for searching val = Customer.checkexits(cuInfo.get()) searchcust(val)
def addCustData(): "Creating object of customer class and save data in the object and call add method of customer class" cus = Customer() cus.firstName = varfirstName.get() cus.lastName = varLastName.get() cus.age = varAge.get() cus.mobileNo = varMobile.get() cus.emailId = varEmail.get() cus.address = varAdd.get() cus.city = varCity.get() cus.state = varState.get() cus.pincode = varPincode.get() cus.country = varCountry.get() cus.addCustomer() #calling of add method of customer class messagebox.showinfo("AJT CMS", "Customer Added successfully") fr3.destroy() fr2gen()
def displaybut_click(): #Retriveing data from DB for display val = Customer.displayAllCustomer() displayData(val)
def deletecustcheck(): #Check whether cust is in DB or not for deletion val = Customer.checkexits(custinfo.get()) deletecust(val)
def modifycustcheck( ): # Check whether cust data avialable or not for modification val = Customer.checkexits(custData.get()) modifyCust(val)