Com Project
Com Project
The sales management system is basically a database based project done with help of
python language. This project is very usefull for the shopkeepers to keep a count on what
project they have and how much they sold. This project is multifield project ,so that it can be
modified for various purposes.
OBJECTIVES:
The objectives of this project is to let the students apply the programming knowledge
into a real – world situation / problem and exposed the students how programming skills
helps in developing a good software.
One has to use the data management software. Software has been an ascent in
atomization various organisations. Many software products working are now in
markets, which have helped in making the organisations work easier and efficiently.
Data management initially had to maintain a lot of ledgers and a lot of paper work has
to be done but now software product on this organization has made their work faster
and easier. Now only this software has to be loaded on the computer and work can be
done.
This prevents a lot of time and money. The work becomes fully automated and
any information regarding the organization can be obtained by clicking the button.
Moreover, now it’s an age of computers of and automating such an organization gives
the better look.
SOURCE CODE:
Importmysql.connector as sql
conn=sql.connect(host=’localhost’,user=’root’,passwd=’manager’,database=’auto_mo
bile_station’)
ifconn.is_connected():
print(“Successfully Connected”)
c1=conn.cursor()
#c1.execute(‘create table customer_details(snoint primary
key,cnamevarchar(25),cdetailvarchar(30),caddressvarchar(30),cpincodeint,cpuramtint
,cdisc float)’)
print(‘table created’)parp comman
conn=sql.connect(host=’localhost’,user=’root’,passwd=’manager’,database=’auto_mo
bile_station’)
ifconn.is_connected():
print(“Successfully Connected”)
c1=conn.cursor()
#c1.execute(‘create table customer_details(snoint primary
key,cnamevarchar(25),cdetailvarchar(30),caddressvarchar(30),cpincodeint,cpuramtint
,cdisc float)’)
print(‘table created’)
c1=conn.cursor()
print(“Automobile”)
print(“1.service station”)
print(“2.source”)
print(“3.selling”)
print(“4.Exit”)
choice=int(input(“Enter the Choice-“))
if choice==1:
v_sno=int(input(“Enter the serial Number:”))
v_cname=intput(“Enter the customer name:”)
v_cdetails=input(“Enter the customer details:”)
v_caddress=input(“Enter the customer address:”)
v_cpincode=int(input(“Enter the pincode:”))
v_puramt=int(input(“Enter the puramt:”))
v_cdisc=float(input(“Enter the discount:”))
v_sql_Insert=”insert into customer_details values(“+str(v_sno)
+”,’’’+v_cname+”,’’’+v_cdetails+’’’,”+’’’’’+v_caddress+’’’,”++str(v_cpincode)+
+str(v_cpurant)++str(v_cdisc)+”)”
c1.execute(v_sql_Insert)
print(“CUSTOMER Created Congrats!!!”)
conn.commit()
username=input(‘USERNAME:’)
password=input(‘PASSWORD:’)
c1.execute(“select*from user where username=”and
passwd+””.format(username,password))
data=c1.fetchall()
if any (data):
import main
else:
print(‘’’try again’’’)
if choice==2:
if choice==3:
mycursor.execute(“select*from customer_details”)
data=mycursor.fetchall()
print(data)
if choice==4:
v_acctno=int(input(“Enter the Account Number:”)
c1.execute(“Select*from customer_details where sno=”+str(v_sno))
data=c1.fetchall()
v_count=c1.rowcount
print(“rec count=”,v_count)
ifv_count==0:
print(“Account Number Invalid Sorry Try again later!!!”)
else:
v_amt=int(input(“Enter withdrawal amount”))
v_sqlUpdate=”update customer_details set v_pamt=pamt-“+str(v_amt)+”where
acct_no=”+str(v_acctno)
print(v_sqlUpdate)
c1.execute(v_sqlUpdate)
conn.commit()
print(“Account updated successfully!!!”)
HARDWARE AND SOFTWARE REQUIREMENTS:
SOFTWARE REQUIREMENTS:
Windows OS
Python
Mysql connector mudulle
BIBLOGRAPHY:
https://www.scribd.com/document/534623546/Auto-Mobile-Service-Station-converted