Contact Managment
Contact Managment
This programme helps the user to manage the contacts of their friends and relatives. After
adding information this programme automatically store the contact details in the database.the
user can view ,add the contact details anytime.
In recruiting, you can use a contact management tool to keep track of candidate and client
contact information. The application integrates all your contact information for different job
orders.
Contact management is the process of storing and tracking data on customers and leads.
In addition to providing quick access to customer data, investing in contact management can
help you grow and diversify your customer base.
Upgrading to customer relationship management software can provide advanced data that
allows you to increase engagement between your company and its customers.
This article is for business owners who want to improve their customer relationships using
contact management software.
Gone are the days of exchanging napkin notes and business cards. In today’s fast-paced
business world, it can be hard to remember every customer’s name and their individual
preferences. That’s why it’s essential to store data electronically, share it with team members
when needed and continuously gather information to successfully interact with clients and
customers.
Track communication data
The main purpose of contact management is to record and organize your contacts. Details
within the software could include calls, tasks, job orders, and opportunities. All verbal and
email communications can be documented in a CM system. This makes it easy to see who
you’ve talked to and what you’ve talked about.
Along with basic contacts, you can keep notes about your interactions within the software.
This allows you to keep a full record of all your recruiting communications. Instead of losing
data in stacks of paper or spreadsheets, all your information is in one, streamlined database.
System development life cycle (sdlc):
An effective System Development Life Cycle (SDLC) should result in a high quality system
that meets customer expectations, reaches completion within time and cost evaluations, and
works effectively and efficiently in the current and planned Information Technology
infrastructure.
System Development Life Cycle (SDLC) is a conceptual model which includes policies and
procedures for developing or altering systems throughout their life cycles.
SDLC is used by analysts to develop an information system. SDLC includes the following
activities −
requirements
Design
Implementation
Testing
Deployment
Operations
Maintenance
System Design
Includes the design of application, network, databases, user interfaces, and system
interfaces.
Transform the SRS document into logical structure, which contains detailed and
complete set of specifications that can be implemented in a programming language.
Tkinter Programming
Tkinter is the standard GUI library for Python. Python when combined with Tkinter provides
a fast and easy way to create GUI applications. Tkinter provides a powerful object-oriented
interface to the Tk GUI toolkit.
Creating a GUI application using Tkinter is an easy task. All you need to do is perform the
following steps −
Import the Tkinter module.
Create the GUI application main window.
Add one or more of the above-mentioned widgets to the GUI application.
Enter the main event loop to take action against each event triggered by the user.
Example
#!/usr/bin/python
import Tkinter
top = Tkinter.Tk()
# Code to add widgets will go here...
top.mainloop()
This would create a following window −
Declaring the variables for the contact management system python program
# Variables required for storing the values
f_name = StringVar()
m_name = StringVar()
l_name = StringVar()
age = StringVar()
home_address = StringVar()
gender = StringVar()
phone_number = StringVar()
Code for exit function of a system
#Function for exiting the system
def Exit():
O = tkinter.messagebox.askyesno("Contact Management System", "Do you want to exit the
system")
if O > 0:
root.destroy()
return
Code for database and table creation
def Database():
connectn = sqlite3.connect("contactdata.db")
cursor = connectn.cursor()
cursor.execute("CREATE TABLE IF NOT EXISTS `contactinformation` (id INTEGER
NOT NULL PRIMARY KEY AUTOINCREMENT, first_name TEXT, middle_name TEXT,
last_name TE# For creating the database and the table
XT, gender TEXT, age TEXT, home_address TEXT, phone_number TEXT)")
cursor.execute("SELECT * FROM `contactinformation` ORDER BY `last_name` ASC")
fetchinfo = cursor.fetchall()
for data in fetchinfo:
Resetting the values in the system
#Function for resetting the values
def Reset():
f_name.set("")
m_name.set("")
l_name.set("")
gender.set("")
age.set("")
home_address.set("")
phone_number.set("")
Code for database and table creation
# For creating the database and the table
def Database():
connectn = sqlite3.connect("contactdata.db")
cursor = connectn.cursor()
cursor.execute("CREATE TABLE IF NOT EXISTS `contactinformation` (id INTEGER
NOT NULL PRIMARY KEY AUTOINCREMENT, first_name TEXT, middle_name TEXT,
last_name TEXT, gender TEXT, age TEXT, home_address TEXT, phone_number TEXT)")
cursor.execute("SELECT * FROM `contactinformation` ORDER BY `last_name` ASC")
fetchinfo = cursor.fetchall()
for data in fetchinfo:
tree.insert('', 'end', values=(data))
cursor.close()
connectn.close()
connectn.commit()
cursor.execute("SELECT * FROM `contactinformation` ORDER BY `last_name` ASC")
fetchinfo = cursor.fetchall()
Opennewwindow = Toplevel()
Opennewwindow.title("Contact Details")
Opennewwindow.resizable(0, 0)
Opennewwindow.geometry("500x500+0+0")
if 'UpdateWindow' in globals():
UpdateWindow.destroy()
#############Frames####################
FormTitle = Frame(Opennewwindow)
FormTitle.pack(side=TOP)
ContactForm = Frame(Opennewwindow)
ContactForm.pack(side=TOP, pady=10)
RadioGroup = Frame(ContactForm)
Male = Radiobutton(RadioGroup, text="Male", variable=gender, value="Male",
font=('Calibri', 14)).pack(side=LEFT)
Female = Radiobutton(RadioGroup, text="Female", variable=gender, value="Female",
font=('Calibri', 14)).pack(side=LEFT)
# ===================LABELS==============================
label_title = Label(FormTitle, text="Adding New Contacts", bd=12, fg="black",
bg="Lightgreen",
font=("Calibri", 15, "bold"), pady=2)
label_title.pack(fill=X)
label_FirstName = Label(ContactForm, text="First Name", font=('Calibri', 14), bd=5)
label_FirstName.grid(row=0, sticky=W)
RadioGroup.grid(row=3, column=1)
# ==================BUTTONS==============================
ButtonAddContact = Button(ContactForm, text='Please Save', bd=5, font=('Calibri', 12,
'bold'), fg="black",
bg="lightgreen", command=Submit)
ButtonAddContact.grid(row=7, columnspan=2, pady=10)
code for updating the contacts in the system
Update Query for updating the database
#Update Query for updating the table in the database
def Update():
if gender.get() == "":
msgg = tkMessageBox.showwarning('', 'Please Complete The Required Field',
icon="warning")
else:
tree.delete(*tree.get_children())
connectn = sqlite3.connect("contactdata.db")
cursor = connectn.cursor()
cursor.execute("UPDATE `contactinformation` SET `first_name` = ?, `middle_name` = ? ,
`last_name` = ?, `gender` =?, `age` = ?, `home_address` = ?, `phone_number` = ? WHERE
`id` = ?",
(str(f_name.get()), str(m_name.get()), str(l_name.get()), str(gender.get()), int(age.get()),
str(home_address.get()),
str(phone_number.get()), int(id)))
connectn.commit()
cursor.execute("SELECT * FROM `contactinformation` ORDER BY `last_name` ASC")
fetchinfo = cursor.fetchall()
for data in fetchinfo:
tree.insert('', 'end', values=(data))
gender1 = gender.get()
if not gender1:
tkMessageBox.showerror("Please select the gender")
cursor.close()
connectn.close()
f_name.set("")
m_name.set("")
l_name.set("")
gender.set("")
age.set("")
home_address.set("")
phone_number.set("")
Module to update contact form window
#Module for the update contact form window
def UpdateContact(event):
global id, UpdateWindow
curItem = tree.focus()
contents = (tree.item(curItem))
item = contents['values']
id = item[0]
f_name.set("")
m_name.set("")
l_name.set("")
gender.set("")
age.set("")
home_address.set("")
phone_number.set("")
f_name.set(item[1])
m_name.set(item[2])
l_name.set(item[3])
age.set(item[5])
home_address.set(item[6])
phone_number.set(item[7])
UpdateWindow = Toplevel()
UpdateWindow.title("Contact Information")
UpdateWindow.geometry("500x520+0+0")
UpdateWindow.resizable(0, 0)
if 'Opennewwindow' in globals():
Opennewwindow.destroy()
tree.pack()
tree.bind('<Double-Button-1>', Update tree.insert('', 'end', values=(data))
cursor.close() connectn.close()
Bibliography
https://itsourcecode.com
https://www.wikipedia.org/
https://realpython.com/python-idle/
https://opensource.com/